From 5e4e63835e61e559621fc2286f18fa7df08eb00c Mon Sep 17 00:00:00 2001 From: George Hodgkins Date: Wed, 15 Apr 2026 18:05:08 -0600 Subject: [PATCH 01/11] Support debug info in qis-compiler, update snapshots --- Cargo.lock | 158 ++++--- Cargo.toml | 8 +- justfile | 2 +- .../discard_qb_array_aarch64-apple-darwin | 106 ++--- .../measure_qb_array_aarch64-apple-darwin | 210 ++++----- .../discard_qb_array_x86_64-apple-darwin | 90 ++-- .../measure_qb_array_x86_64-apple-darwin | 442 +++++++++--------- .../discard_qb_array_x86_64-unknown-linux-gnu | 90 ++-- .../measure_qb_array_x86_64-unknown-linux-gnu | 442 +++++++++--------- .../discard_qb_array_x86_64-windows-msvc | 90 ++-- .../measure_qb_array_x86_64-windows-msvc | 442 +++++++++--------- qis-compiler/rust/gpu.rs | 2 +- qis-compiler/rust/lib.rs | 45 +- ...u__test__gpu_codegen@llvm21_call_args.snap | 73 +-- ...st__gpu_codegen@llvm21_call_ret_float.snap | 41 +- ...test__gpu_codegen@llvm21_call_ret_int.snap | 41 +- ...t__gpu_codegen@llvm21_dispose_context.snap | 39 +- ..._test__gpu_codegen@llvm21_get_context.snap | 66 ++- ...test__gpu_codegen@llvm21_lookup_by_id.snap | 16 +- ...st__gpu_codegen@llvm21_lookup_by_name.snap | 81 ++-- ..._gpu_codegen@llvm21_read_result_float.snap | 46 +- ...t__gpu_codegen@llvm21_read_result_int.snap | 45 +- ..._codegen@pre-mem2reg@llvm21_call_args.snap | 75 +-- ...gen@pre-mem2reg@llvm21_call_ret_float.snap | 43 +- ...degen@pre-mem2reg@llvm21_call_ret_int.snap | 43 +- ...en@pre-mem2reg@llvm21_dispose_context.snap | 39 +- ...odegen@pre-mem2reg@llvm21_get_context.snap | 68 +-- ...degen@pre-mem2reg@llvm21_lookup_by_id.snap | 19 +- ...gen@pre-mem2reg@llvm21_lookup_by_name.snap | 83 ++-- ...@pre-mem2reg@llvm21_read_result_float.snap | 50 +- ...en@pre-mem2reg@llvm21_read_result_int.snap | 49 +- tket-qsystem/src/llvm/debug.rs | 2 +- tket-qsystem/src/llvm/futures.rs | 2 +- tket-qsystem/src/llvm/prelude.rs | 4 +- tket-qsystem/src/llvm/random.rs | 2 +- tket-qsystem/src/llvm/result.rs | 2 +- ...ug__test__emit_debug_codegen@llvm21_2.snap | 54 ++- ...it_debug_codegen@pre-mem2reg@llvm21_2.snap | 56 ++- ...__test__emit_futures_codegen@llvm21_1.snap | 22 +- ...__test__emit_futures_codegen@llvm21_2.snap | 19 +- ...__test__emit_futures_codegen@llvm21_3.snap | 17 +- ...__test__emit_futures_codegen@llvm21_4.snap | 19 +- ...__test__emit_futures_codegen@llvm21_5.snap | 19 +- ...__test__emit_futures_codegen@llvm21_6.snap | 17 +- ..._futures_codegen@pre-mem2reg@llvm21_1.snap | 24 +- ..._futures_codegen@pre-mem2reg@llvm21_2.snap | 23 +- ..._futures_codegen@pre-mem2reg@llvm21_3.snap | 17 +- ..._futures_codegen@pre-mem2reg@llvm21_4.snap | 21 +- ..._futures_codegen@pre-mem2reg@llvm21_5.snap | 23 +- ..._futures_codegen@pre-mem2reg@llvm21_6.snap | 17 +- ...vm__prelude__test__exit_emit@llvm21_0.snap | 23 +- ..._test__exit_emit@pre-mem2reg@llvm21_0.snap | 27 +- ...m__prelude__test__panic_emit@llvm21_0.snap | 25 +- ...test__panic_emit@pre-mem2reg@llvm21_0.snap | 29 +- ...__test__emit_qsystem_codegen@llvm21_1.snap | 18 +- ..._test__emit_qsystem_codegen@llvm21_10.snap | 19 +- ...__test__emit_qsystem_codegen@llvm21_2.snap | 20 +- ...__test__emit_qsystem_codegen@llvm21_3.snap | 18 +- ...__test__emit_qsystem_codegen@llvm21_4.snap | 22 +- ...__test__emit_qsystem_codegen@llvm21_5.snap | 19 +- ...__test__emit_qsystem_codegen@llvm21_6.snap | 32 +- ...__test__emit_qsystem_codegen@llvm21_7.snap | 17 +- ...__test__emit_qsystem_codegen@llvm21_8.snap | 17 +- ...__test__emit_qsystem_codegen@llvm21_9.snap | 24 +- ..._qsystem_codegen@pre-mem2reg@llvm21_1.snap | 20 +- ...qsystem_codegen@pre-mem2reg@llvm21_10.snap | 21 +- ..._qsystem_codegen@pre-mem2reg@llvm21_2.snap | 24 +- ..._qsystem_codegen@pre-mem2reg@llvm21_3.snap | 20 +- ..._qsystem_codegen@pre-mem2reg@llvm21_4.snap | 24 +- ..._qsystem_codegen@pre-mem2reg@llvm21_5.snap | 21 +- ..._qsystem_codegen@pre-mem2reg@llvm21_6.snap | 34 +- ..._qsystem_codegen@pre-mem2reg@llvm21_7.snap | 17 +- ..._qsystem_codegen@pre-mem2reg@llvm21_8.snap | 19 +- ..._qsystem_codegen@pre-mem2reg@llvm21_9.snap | 28 +- ...dom__test__emit_random_codegen@llvm21.snap | 19 +- ...m__test__emit_random_codegen@llvm21_1.snap | 21 +- ...m__test__emit_random_codegen@llvm21_2.snap | 21 +- ...m__test__emit_random_codegen@llvm21_3.snap | 21 +- ...m__test__emit_random_codegen@llvm21_4.snap | 18 +- ...m__test__emit_random_codegen@llvm21_5.snap | 15 +- ...mit_random_codegen@pre-mem2reg@llvm21.snap | 21 +- ...t_random_codegen@pre-mem2reg@llvm21_1.snap | 25 +- ...t_random_codegen@pre-mem2reg@llvm21_2.snap | 25 +- ...t_random_codegen@pre-mem2reg@llvm21_3.snap | 25 +- ...t_random_codegen@pre-mem2reg@llvm21_4.snap | 20 +- ...t_random_codegen@pre-mem2reg@llvm21_5.snap | 15 +- ...t__test__emit_result_codegen@llvm21_1.snap | 21 +- ...__test__emit_result_codegen@llvm21_11.snap | 54 ++- ...__test__emit_result_codegen@llvm21_12.snap | 21 +- ...__test__emit_result_codegen@llvm21_13.snap | 21 +- ...__test__emit_result_codegen@llvm21_15.snap | 21 +- ...__test__emit_result_codegen@llvm21_16.snap | 21 +- ...t__test__emit_result_codegen@llvm21_2.snap | 21 +- ...t__test__emit_result_codegen@llvm21_3.snap | 21 +- ...t__test__emit_result_codegen@llvm21_4.snap | 21 +- ...t__test__emit_result_codegen@llvm21_5.snap | 54 ++- ...t__test__emit_result_codegen@llvm21_7.snap | 54 ++- ...t__test__emit_result_codegen@llvm21_9.snap | 54 ++- ...t_result_codegen@pre-mem2reg@llvm21_1.snap | 21 +- ..._result_codegen@pre-mem2reg@llvm21_11.snap | 54 ++- ..._result_codegen@pre-mem2reg@llvm21_12.snap | 21 +- ..._result_codegen@pre-mem2reg@llvm21_13.snap | 21 +- ..._result_codegen@pre-mem2reg@llvm21_15.snap | 21 +- ..._result_codegen@pre-mem2reg@llvm21_16.snap | 21 +- ...t_result_codegen@pre-mem2reg@llvm21_2.snap | 21 +- ...t_result_codegen@pre-mem2reg@llvm21_3.snap | 21 +- ...t_result_codegen@pre-mem2reg@llvm21_4.snap | 21 +- ...t_result_codegen@pre-mem2reg@llvm21_5.snap | 54 ++- ...t_result_codegen@pre-mem2reg@llvm21_7.snap | 54 ++- ...t_result_codegen@pre-mem2reg@llvm21_9.snap | 54 ++- ...ls__test__emit_utils_codegen@llvm21_1.snap | 17 +- ...it_utils_codegen@pre-mem2reg@llvm21_1.snap | 19 +- tket-qsystem/src/llvm/utils.rs | 2 +- tket/src/llvm/bool.rs | 2 +- tket/src/llvm/rotation.rs | 4 +- ...vm__bool__test__emit_all_ops@llvm21_1.snap | 17 +- ...vm__bool__test__emit_all_ops@llvm21_2.snap | 14 +- ...vm__bool__test__emit_all_ops@llvm21_3.snap | 17 +- ...vm__bool__test__emit_all_ops@llvm21_4.snap | 17 +- ...vm__bool__test__emit_all_ops@llvm21_5.snap | 17 +- ...vm__bool__test__emit_all_ops@llvm21_6.snap | 17 +- ...vm__bool__test__emit_all_ops@llvm21_7.snap | 17 +- ...st__emit_all_ops@pre-mem2reg@llvm21_1.snap | 19 +- ...st__emit_all_ops@pre-mem2reg@llvm21_2.snap | 17 +- ...st__emit_all_ops@pre-mem2reg@llvm21_3.snap | 19 +- ...st__emit_all_ops@pre-mem2reg@llvm21_4.snap | 19 +- ...st__emit_all_ops@pre-mem2reg@llvm21_5.snap | 19 +- ...st__emit_all_ops@pre-mem2reg@llvm21_6.snap | 19 +- ...st__emit_all_ops@pre-mem2reg@llvm21_7.snap | 19 +- ...rotation__test__emit_all_ops@llvm21_0.snap | 48 +- ...st__emit_all_ops@pre-mem2reg@llvm21_0.snap | 59 ++- 131 files changed, 3495 insertions(+), 1859 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0a2f62a3e..c4454db91 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -238,9 +238,9 @@ checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" [[package]] name = "bitflags" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af" +checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3" [[package]] name = "bitmaps" @@ -321,9 +321,9 @@ checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" [[package]] name = "capnp" -version = "0.25.3" +version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c82ec25a9501d60e22eef4be1b2c271769b5a96e224d0875baef28529cf30" +checksum = "63da65e5e9ffc3b8f993d4ad222a548152549351a643f6b850a7773cb6ff2809" dependencies = [ "embedded-io", ] @@ -355,9 +355,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.59" +version = "1.2.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7a4d3ec6524d28a329fc53654bbadc9bdd7b0431f5d65f1a56ffb28a1ee5283" +checksum = "43c5703da9466b66a946814e1adf53ea2c90f10063b86290cc9eb67ce3478a20" dependencies = [ "find-msvc-tools", "jobserver", @@ -397,6 +397,17 @@ dependencies = [ "serde", ] +[[package]] +name = "chacha20" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f8d983286843e49675a4b7a2d174efe136dc93a18d69130dd18198a6c167601" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.0", + "rand_core 0.10.1", +] + [[package]] name = "chrono" version = "0.4.44" @@ -451,9 +462,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.6.0" +version = "4.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b193af5b67834b676abd72466a96c1024e6a6ad978a1f484bd90b85c94041351" +checksum = "1ddb117e43bbf7dacf0a4190fef4d345b9bad68dfc649cb349e7d17d28428e51" dependencies = [ "clap_builder", "clap_derive", @@ -483,9 +494,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.6.0" +version = "4.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1110bd8a634a1ab8cb04345d8d878267d57c3cf1b38d91b71af6686408bbca6a" +checksum = "f2ce8604710f6733aa641a2b3731eaa1e8b3d9973d5e3565da11800813f997a9" dependencies = [ "heck", "proc-macro2", @@ -593,6 +604,15 @@ dependencies = [ "libc", ] +[[package]] +name = "cpufeatures" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201" +dependencies = [ + "libc", +] + [[package]] name = "criterion" version = "0.8.2" @@ -924,9 +944,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.3.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" +checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6" [[package]] name = "find-msvc-tools" @@ -1046,6 +1066,7 @@ dependencies = [ "cfg-if", "libc", "r-efi 6.0.0", + "rand_core 0.10.1", "wasip2", "wasip3", ] @@ -1129,8 +1150,7 @@ dependencies = [ [[package]] name = "hugr" version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c016d3b51aa136190cd5ff125a96ec32a94e0f2a736a3a668bfe084ec9d9a9e" +source = "git+https://github.com/quantinuum/hugr?branch=george%2Fdebuginfo#806fb94ce459bed6faf7f3d4dbdb5a942c5b2a00" dependencies = [ "hugr-core", "hugr-llvm", @@ -1140,8 +1160,7 @@ dependencies = [ [[package]] name = "hugr-cli" version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6f210455279ec319e42263cb1d9890295cd5a53fdc2f1f34cf4f6901453377" +source = "git+https://github.com/quantinuum/hugr?branch=george%2Fdebuginfo#806fb94ce459bed6faf7f3d4dbdb5a942c5b2a00" dependencies = [ "anyhow", "clap", @@ -1161,8 +1180,7 @@ dependencies = [ [[package]] name = "hugr-core" version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "827c0827ea0e1f6c606a17ba9926d3867b008d975688a6d4357d5847eb5826e5" +source = "git+https://github.com/quantinuum/hugr?branch=george%2Fdebuginfo#806fb94ce459bed6faf7f3d4dbdb5a942c5b2a00" dependencies = [ "base64", "cgmath", @@ -1177,7 +1195,7 @@ dependencies = [ "ordered-float", "pastey", "petgraph 0.8.3", - "portgraph 0.16.0", + "portgraph 0.16.1", "regex", "relrc", "rustc-hash 2.1.2", @@ -1199,8 +1217,7 @@ dependencies = [ [[package]] name = "hugr-llvm" version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aac6e08f12883f1d69c1f145c70251e755dde89821719741193c1f51259a59e" +source = "git+https://github.com/quantinuum/hugr?branch=george%2Fdebuginfo#806fb94ce459bed6faf7f3d4dbdb5a942c5b2a00" dependencies = [ "anyhow", "cc", @@ -1211,7 +1228,8 @@ dependencies = [ "insta", "itertools 0.14.0", "petgraph 0.8.3", - "portgraph 0.16.0", + "portgraph 0.16.1", + "rand 0.10.1", "rstest", "strum", ] @@ -1219,8 +1237,7 @@ dependencies = [ [[package]] name = "hugr-model" version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7878f4cb16c1f8d69ea9e832ff77694d9647aa5b963cb242b10969550b2d6e08" +source = "git+https://github.com/quantinuum/hugr?branch=george%2Fdebuginfo#806fb94ce459bed6faf7f3d4dbdb5a942c5b2a00" dependencies = [ "base64", "bumpalo", @@ -1433,9 +1450,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.93" +version = "0.3.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "797146bb2677299a1eb6b7b50a890f4c361b29ef967addf5b2fa45dae1bb6d7d" +checksum = "2964e92d1d9dc3364cae4d718d93f227e3abb088e747d92e0395bfdedf1c12ca" dependencies = [ "once_cell", "wasm-bindgen", @@ -1455,9 +1472,9 @@ checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" [[package]] name = "libc" -version = "0.2.184" +version = "0.2.185" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48f5d2a454e16a5ea0f4ced81bd44e4cfc7bd3a507b61887c99fd3538b28e4af" +checksum = "52ff2c0fe9bc6cb6b14a0592c2ff4fa9ceb83eea9db979b0487cd054946a2b8f" [[package]] name = "libloading" @@ -1477,9 +1494,9 @@ checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" [[package]] name = "llvm-sys" -version = "211.0.0" +version = "211.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "108b3ad2b2eaf2a561fc74196273b20e3436e4a688b8b44e250d83974dc1b2e2" +checksum = "44007a7a44b73bdd877fa9c9ccef256036511220e90f65b4d50e7a15773c0ee3" dependencies = [ "anyhow", "cc", @@ -1744,9 +1761,9 @@ checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" [[package]] name = "pkg-config" -version = "0.3.32" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" +checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e" [[package]] name = "plotters" @@ -1798,9 +1815,9 @@ dependencies = [ [[package]] name = "portgraph" -version = "0.16.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4d6244193810d114467998a979f0f763e5422ea546586d309fb70a68c036fb5" +checksum = "6a1395575e261a0c0dd2d360ac4e3b14a4c9f68647ee12e59d96af959e4c0f79" dependencies = [ "bitvec", "delegate 0.13.5", @@ -1926,7 +1943,7 @@ dependencies = [ "bit-vec", "bitflags", "num-traits", - "rand 0.9.2", + "rand 0.9.4", "rand_chacha", "rand_xorshift", "regex-syntax", @@ -2059,14 +2076,25 @@ dependencies = [ [[package]] name = "rand" -version = "0.9.2" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +checksum = "44c5af06bb1b7d3216d91932aed5265164bf384dc89cd6ba05cf59a35f5f76ea" dependencies = [ "rand_chacha", "rand_core 0.9.5", ] +[[package]] +name = "rand" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2e8e8bcc7961af1fdac401278c6a831614941f6164ee3bf4ce61b7edb162207" +dependencies = [ + "chacha20", + "getrandom 0.4.2", + "rand_core 0.10.1", +] + [[package]] name = "rand_chacha" version = "0.9.0" @@ -2095,6 +2123,12 @@ dependencies = [ "getrandom 0.3.4", ] +[[package]] +name = "rand_core" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" + [[package]] name = "rand_xorshift" version = "0.4.0" @@ -2115,9 +2149,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f" +checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d" dependencies = [ "either", "rayon-core", @@ -2463,9 +2497,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "876ac351060d4f882bb1032b6369eb0aef79ad9df1ea8bc404874d8cc3d0cd98" +checksum = "6662b5879511e06e8999a8a235d848113e942c9124f211511b16466ee2995f26" dependencies = [ "serde_core", ] @@ -2508,7 +2542,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" dependencies = [ "cfg-if", - "cpufeatures", + "cpufeatures 0.2.17", "digest", ] @@ -2828,7 +2862,7 @@ dependencies = [ "pest", "pest_derive", "petgraph 0.8.3", - "portgraph 0.16.0", + "portgraph 0.16.1", "portmatching", "priority-queue", "proptest", @@ -2969,39 +3003,39 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "1.1.0+spec-1.1.0" +version = "1.1.1+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97251a7c317e03ad83774a8752a7e81fb6067740609f75ea2b585b569a59198f" +checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7" dependencies = [ "serde_core", ] [[package]] name = "toml_edit" -version = "0.25.8+spec-1.1.0" +version = "0.25.11+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16bff38f1d86c47f9ff0647e6838d7bb362522bdf44006c7068c2b1e606f1f3c" +checksum = "0b59c4d22ed448339746c59b905d24568fcbb3ab65a500494f7b8c3e97739f2b" dependencies = [ "indexmap 2.14.0", - "toml_datetime 1.1.0+spec-1.1.0", + "toml_datetime 1.1.1+spec-1.1.0", "toml_parser", "winnow 1.0.1", ] [[package]] name = "toml_parser" -version = "1.1.0+spec-1.1.0" +version = "1.1.2+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2334f11ee363607eb04df9b8fc8a13ca1715a72ba8662a26ac285c98aabb4011" +checksum = "a2abe9b86193656635d2411dc43050282ca48aa31c2451210f4202550afb7526" dependencies = [ "winnow 1.0.1", ] [[package]] name = "toml_writer" -version = "1.1.0+spec-1.1.0" +version = "1.1.1+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d282ade6016312faf3e41e57ebbba0c073e4056dab1232ab1cb624199648f8ed" +checksum = "756daf9b1013ebe47a8776667b466417e2d4c5679d441c26230efd9ef78692db" [[package]] name = "tracing" @@ -3225,9 +3259,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.116" +version = "0.2.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dc0882f7b5bb01ae8c5215a1230832694481c1a4be062fd410e12ea3da5b631" +checksum = "0bf938a0bacb0469e83c1e148908bd7d5a6010354cf4fb73279b7447422e3a89" dependencies = [ "cfg-if", "once_cell", @@ -3238,9 +3272,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.116" +version = "0.2.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75973d3066e01d035dbedaad2864c398df42f8dd7b1ea057c35b8407c015b537" +checksum = "eeff24f84126c0ec2db7a449f0c2ec963c6a49efe0698c4242929da037ca28ed" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3248,9 +3282,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.116" +version = "0.2.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91af5e4be765819e0bcfee7322c14374dc821e35e72fa663a830bbc7dc199eac" +checksum = "9d08065faf983b2b80a79fd87d8254c409281cf7de75fc4b773019824196c904" dependencies = [ "bumpalo", "proc-macro2", @@ -3261,9 +3295,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.116" +version = "0.2.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9bf0406a78f02f336bf1e451799cca198e8acde4ffa278f0fb20487b150a633" +checksum = "5fd04d9e306f1907bd13c6361b5c6bfc7b3b3c095ed3f8a9246390f8dbdee129" dependencies = [ "unicode-ident", ] @@ -3304,9 +3338,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.93" +version = "0.3.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "749466a37ee189057f54748b200186b59a03417a117267baf3fd89cecc9fb837" +checksum = "4f2dfbb17949fa2088e5d39408c48368947b86f7834484e87b73de55bc14d97d" dependencies = [ "js-sys", "wasm-bindgen", diff --git a/Cargo.toml b/Cargo.toml index 6b86aa45b..6c80c690e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,10 +44,10 @@ large_enum_variant = "allow" [patch.crates-io] # Uncomment to use unreleased versions of hugr -# hugr = { git = "https://github.com/quantinuum/hugr", "rev" = "de7b9f7581ae02cd80dff7b12794b55635903304" } -# hugr-core = { git = "https://github.com/quantinuum/hugr", "rev" = "de7b9f7581ae02cd80dff7b12794b55635903304" } -# hugr-cli = { git = "https://github.com/quantinuum/hugr", "rev" = "de7b9f7581ae02cd80dff7b12794b55635903304" } -# hugr-llvm = { git = "https://github.com/quantinuum/hugr", "rev" = "de7b9f7581ae02cd80dff7b12794b55635903304" } +hugr = { git = "https://github.com/quantinuum/hugr", branch = "george/debuginfo" } +hugr-core = { git = "https://github.com/quantinuum/hugr", branch = "george/debuginfo" } +hugr-cli = { git = "https://github.com/quantinuum/hugr", branch = "george/debuginfo" } +hugr-llvm = { git = "https://github.com/quantinuum/hugr", branch = "george/debuginfo" } # portgraph = { git = "https://github.com/quantinuum/portgraph", rev = "68b96ac737e0c285d8c543b2d74a7aa80a18202c" } [workspace.dependencies] diff --git a/justfile b/justfile index 151ef196c..4b47b3e61 100644 --- a/justfile +++ b/justfile @@ -33,7 +33,7 @@ build: test: test-rust test-python # Run all rust tests. test-rust *TEST_ARGS: _check_nextest_installed - uv run cargo nextest r --all-features {{TEST_ARGS}} + uv run cargo nextest r --all-features {{TEST_ARGS}} --no-fail-fast # Run all python tests. test-python *TEST_ARGS: uv run maturin develop --uv diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-discard_qb_array/discard_qb_array_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-discard_qb_array/discard_qb_array_aarch64-apple-darwin index ee1bcede5..e8e680467 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-discard_qb_array/discard_qb_array_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-discard_qb_array/discard_qb_array_aarch64-apple-darwin @@ -31,7 +31,7 @@ entry: %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 br i1 %not_max.not.not.i.i, label %cond_213_case_0.i.i, label %__hugr__.__tk2_qalloc.218.exit.i -cond_213_case_0.i.i: ; preds = %cond_exit_20.8.i, %cond_exit_20.7.i, %cond_exit_20.6.i, %cond_exit_20.5.i, %cond_exit_20.4.i, %cond_exit_20.3.i, %cond_exit_20.2.i, %cond_exit_20.1.i, %cond_exit_20.i, %entry +cond_213_case_0.i.i: ; preds = %__barray_mask_return.exit.8.i, %__barray_mask_return.exit.7.i, %__barray_mask_return.exit.6.i, %__barray_mask_return.exit.5.i, %__barray_mask_return.exit.4.i, %__barray_mask_return.exit.3.i, %__barray_mask_return.exit.2.i, %__barray_mask_return.exit.1.i, %__barray_mask_return.exit.i, %entry tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable @@ -39,13 +39,13 @@ __hugr__.__tk2_qalloc.218.exit.i: ; preds = %entry tail call void @___reset(i64 %qalloc.i.i) %3 = load i64, ptr %2, align 4 %4 = trunc i64 %3 to i1 - br i1 %4, label %cond_exit_20.i, label %panic.i.i + br i1 %4, label %__barray_mask_return.exit.i, label %panic.i.i panic.i.i: ; preds = %__barray_check_bounds.exit.9.i, %__hugr__.__tk2_qalloc.218.exit.8.i, %__hugr__.__tk2_qalloc.218.exit.7.i, %__hugr__.__tk2_qalloc.218.exit.6.i, %__hugr__.__tk2_qalloc.218.exit.5.i, %__hugr__.__tk2_qalloc.218.exit.4.i, %__hugr__.__tk2_qalloc.218.exit.3.i, %__hugr__.__tk2_qalloc.218.exit.2.i, %__hugr__.__tk2_qalloc.218.exit.1.i, %__hugr__.__tk2_qalloc.218.exit.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -cond_exit_20.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.i +__barray_mask_return.exit.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.i %5 = and i64 %3, -2 store i64 %5, ptr %2, align 4 store i64 %qalloc.i.i, ptr %1, align 4 @@ -53,14 +53,14 @@ cond_exit_20.i: ; preds = %__hugr__.__tk2_qall %not_max.not.not.i.1.i = icmp eq i64 %qalloc.i.1.i, -1 br i1 %not_max.not.not.i.1.i, label %cond_213_case_0.i.i, label %__hugr__.__tk2_qalloc.218.exit.1.i -__hugr__.__tk2_qalloc.218.exit.1.i: ; preds = %cond_exit_20.i +__hugr__.__tk2_qalloc.218.exit.1.i: ; preds = %__barray_mask_return.exit.i tail call void @___reset(i64 %qalloc.i.1.i) %6 = load i64, ptr %2, align 4 %7 = and i64 %6, 2 %.not.i = icmp eq i64 %7, 0 - br i1 %.not.i, label %panic.i.i, label %cond_exit_20.1.i + br i1 %.not.i, label %panic.i.i, label %__barray_mask_return.exit.1.i -cond_exit_20.1.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.1.i +__barray_mask_return.exit.1.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.1.i %8 = and i64 %6, -3 store i64 %8, ptr %2, align 4 %9 = getelementptr inbounds nuw i8, ptr %1, i64 8 @@ -69,14 +69,14 @@ cond_exit_20.1.i: ; preds = %__hugr__.__tk2_qall %not_max.not.not.i.2.i = icmp eq i64 %qalloc.i.2.i, -1 br i1 %not_max.not.not.i.2.i, label %cond_213_case_0.i.i, label %__hugr__.__tk2_qalloc.218.exit.2.i -__hugr__.__tk2_qalloc.218.exit.2.i: ; preds = %cond_exit_20.1.i +__hugr__.__tk2_qalloc.218.exit.2.i: ; preds = %__barray_mask_return.exit.1.i tail call void @___reset(i64 %qalloc.i.2.i) %10 = load i64, ptr %2, align 4 %11 = and i64 %10, 4 - %.not106.i = icmp eq i64 %11, 0 - br i1 %.not106.i, label %panic.i.i, label %cond_exit_20.2.i + %.not104.i = icmp eq i64 %11, 0 + br i1 %.not104.i, label %panic.i.i, label %__barray_mask_return.exit.2.i -cond_exit_20.2.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.2.i +__barray_mask_return.exit.2.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.2.i %12 = and i64 %10, -5 store i64 %12, ptr %2, align 4 %13 = getelementptr inbounds nuw i8, ptr %1, i64 16 @@ -85,14 +85,14 @@ cond_exit_20.2.i: ; preds = %__hugr__.__tk2_qall %not_max.not.not.i.3.i = icmp eq i64 %qalloc.i.3.i, -1 br i1 %not_max.not.not.i.3.i, label %cond_213_case_0.i.i, label %__hugr__.__tk2_qalloc.218.exit.3.i -__hugr__.__tk2_qalloc.218.exit.3.i: ; preds = %cond_exit_20.2.i +__hugr__.__tk2_qalloc.218.exit.3.i: ; preds = %__barray_mask_return.exit.2.i tail call void @___reset(i64 %qalloc.i.3.i) %14 = load i64, ptr %2, align 4 %15 = and i64 %14, 8 - %.not107.i = icmp eq i64 %15, 0 - br i1 %.not107.i, label %panic.i.i, label %cond_exit_20.3.i + %.not105.i = icmp eq i64 %15, 0 + br i1 %.not105.i, label %panic.i.i, label %__barray_mask_return.exit.3.i -cond_exit_20.3.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.3.i +__barray_mask_return.exit.3.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.3.i %16 = and i64 %14, -9 store i64 %16, ptr %2, align 4 %17 = getelementptr inbounds nuw i8, ptr %1, i64 24 @@ -101,14 +101,14 @@ cond_exit_20.3.i: ; preds = %__hugr__.__tk2_qall %not_max.not.not.i.4.i = icmp eq i64 %qalloc.i.4.i, -1 br i1 %not_max.not.not.i.4.i, label %cond_213_case_0.i.i, label %__hugr__.__tk2_qalloc.218.exit.4.i -__hugr__.__tk2_qalloc.218.exit.4.i: ; preds = %cond_exit_20.3.i +__hugr__.__tk2_qalloc.218.exit.4.i: ; preds = %__barray_mask_return.exit.3.i tail call void @___reset(i64 %qalloc.i.4.i) %18 = load i64, ptr %2, align 4 %19 = and i64 %18, 16 - %.not108.i = icmp eq i64 %19, 0 - br i1 %.not108.i, label %panic.i.i, label %cond_exit_20.4.i + %.not106.i = icmp eq i64 %19, 0 + br i1 %.not106.i, label %panic.i.i, label %__barray_mask_return.exit.4.i -cond_exit_20.4.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.4.i +__barray_mask_return.exit.4.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.4.i %20 = and i64 %18, -17 store i64 %20, ptr %2, align 4 %21 = getelementptr inbounds nuw i8, ptr %1, i64 32 @@ -117,14 +117,14 @@ cond_exit_20.4.i: ; preds = %__hugr__.__tk2_qall %not_max.not.not.i.5.i = icmp eq i64 %qalloc.i.5.i, -1 br i1 %not_max.not.not.i.5.i, label %cond_213_case_0.i.i, label %__hugr__.__tk2_qalloc.218.exit.5.i -__hugr__.__tk2_qalloc.218.exit.5.i: ; preds = %cond_exit_20.4.i +__hugr__.__tk2_qalloc.218.exit.5.i: ; preds = %__barray_mask_return.exit.4.i tail call void @___reset(i64 %qalloc.i.5.i) %22 = load i64, ptr %2, align 4 %23 = and i64 %22, 32 - %.not109.i = icmp eq i64 %23, 0 - br i1 %.not109.i, label %panic.i.i, label %cond_exit_20.5.i + %.not107.i = icmp eq i64 %23, 0 + br i1 %.not107.i, label %panic.i.i, label %__barray_mask_return.exit.5.i -cond_exit_20.5.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.5.i +__barray_mask_return.exit.5.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.5.i %24 = and i64 %22, -33 store i64 %24, ptr %2, align 4 %25 = getelementptr inbounds nuw i8, ptr %1, i64 40 @@ -133,14 +133,14 @@ cond_exit_20.5.i: ; preds = %__hugr__.__tk2_qall %not_max.not.not.i.6.i = icmp eq i64 %qalloc.i.6.i, -1 br i1 %not_max.not.not.i.6.i, label %cond_213_case_0.i.i, label %__hugr__.__tk2_qalloc.218.exit.6.i -__hugr__.__tk2_qalloc.218.exit.6.i: ; preds = %cond_exit_20.5.i +__hugr__.__tk2_qalloc.218.exit.6.i: ; preds = %__barray_mask_return.exit.5.i tail call void @___reset(i64 %qalloc.i.6.i) %26 = load i64, ptr %2, align 4 %27 = and i64 %26, 64 - %.not110.i = icmp eq i64 %27, 0 - br i1 %.not110.i, label %panic.i.i, label %cond_exit_20.6.i + %.not108.i = icmp eq i64 %27, 0 + br i1 %.not108.i, label %panic.i.i, label %__barray_mask_return.exit.6.i -cond_exit_20.6.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.6.i +__barray_mask_return.exit.6.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.6.i %28 = and i64 %26, -65 store i64 %28, ptr %2, align 4 %29 = getelementptr inbounds nuw i8, ptr %1, i64 48 @@ -149,14 +149,14 @@ cond_exit_20.6.i: ; preds = %__hugr__.__tk2_qall %not_max.not.not.i.7.i = icmp eq i64 %qalloc.i.7.i, -1 br i1 %not_max.not.not.i.7.i, label %cond_213_case_0.i.i, label %__hugr__.__tk2_qalloc.218.exit.7.i -__hugr__.__tk2_qalloc.218.exit.7.i: ; preds = %cond_exit_20.6.i +__hugr__.__tk2_qalloc.218.exit.7.i: ; preds = %__barray_mask_return.exit.6.i tail call void @___reset(i64 %qalloc.i.7.i) %30 = load i64, ptr %2, align 4 %31 = and i64 %30, 128 - %.not111.i = icmp eq i64 %31, 0 - br i1 %.not111.i, label %panic.i.i, label %cond_exit_20.7.i + %.not109.i = icmp eq i64 %31, 0 + br i1 %.not109.i, label %panic.i.i, label %__barray_mask_return.exit.7.i -cond_exit_20.7.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.7.i +__barray_mask_return.exit.7.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.7.i %32 = and i64 %30, -129 store i64 %32, ptr %2, align 4 %33 = getelementptr inbounds nuw i8, ptr %1, i64 56 @@ -165,14 +165,14 @@ cond_exit_20.7.i: ; preds = %__hugr__.__tk2_qall %not_max.not.not.i.8.i = icmp eq i64 %qalloc.i.8.i, -1 br i1 %not_max.not.not.i.8.i, label %cond_213_case_0.i.i, label %__hugr__.__tk2_qalloc.218.exit.8.i -__hugr__.__tk2_qalloc.218.exit.8.i: ; preds = %cond_exit_20.7.i +__hugr__.__tk2_qalloc.218.exit.8.i: ; preds = %__barray_mask_return.exit.7.i tail call void @___reset(i64 %qalloc.i.8.i) %34 = load i64, ptr %2, align 4 %35 = and i64 %34, 256 - %.not112.i = icmp eq i64 %35, 0 - br i1 %.not112.i, label %panic.i.i, label %cond_exit_20.8.i + %.not110.i = icmp eq i64 %35, 0 + br i1 %.not110.i, label %panic.i.i, label %__barray_mask_return.exit.8.i -cond_exit_20.8.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.8.i +__barray_mask_return.exit.8.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.8.i %36 = and i64 %34, -257 store i64 %36, ptr %2, align 4 %37 = getelementptr inbounds nuw i8, ptr %1, i64 64 @@ -181,14 +181,14 @@ cond_exit_20.8.i: ; preds = %__hugr__.__tk2_qall %not_max.not.not.i.9.i = icmp eq i64 %qalloc.i.9.i, -1 br i1 %not_max.not.not.i.9.i, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.9.i -__barray_check_bounds.exit.9.i: ; preds = %cond_exit_20.8.i +__barray_check_bounds.exit.9.i: ; preds = %__barray_mask_return.exit.8.i tail call void @___reset(i64 %qalloc.i.9.i) %38 = load i64, ptr %2, align 4 %39 = and i64 %38, 512 - %.not113.i = icmp eq i64 %39, 0 - br i1 %.not113.i, label %panic.i.i, label %cond_exit_20.9.i + %.not111.i = icmp eq i64 %39, 0 + br i1 %.not111.i, label %panic.i.i, label %__barray_mask_return.exit.9.i -cond_exit_20.9.i: ; preds = %__barray_check_bounds.exit.9.i +__barray_mask_return.exit.9.i: ; preds = %__barray_check_bounds.exit.9.i %40 = and i64 %38, -513 store i64 %40, ptr %2, align 4 %41 = getelementptr inbounds nuw i8, ptr %1, i64 72 @@ -240,15 +240,15 @@ mask_block_err.i.i.i.i: ; preds = %mask_block_ok.i.i.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit.i.i.i: ; preds = %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i", %cond_exit_20.9.i - %.fca.2.extract82.i185.i.i = phi i64 [ 0, %cond_exit_20.9.i ], [ %.fca.1.0.0.2.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %.fca.1.extract81.i184.i.i = phi ptr [ %2, %cond_exit_20.9.i ], [ %.fca.1.0.0.1.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %.fca.0.extract80.i183.i.i = phi ptr [ %1, %cond_exit_20.9.i ], [ %.fca.1.0.0.0.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %"294_0.0182.i.i" = phi i64 [ 0, %cond_exit_20.9.i ], [ %72, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %.pn181.i.i = phi { { ptr, ptr, i64 }, i64 } [ %42, %cond_exit_20.9.i ], [ %80, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %65 = add i64 %"294_0.0182.i.i", %.fca.2.extract82.i185.i.i +__barray_check_bounds.exit.i.i.i: ; preds = %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i", %__barray_mask_return.exit.9.i + %.fca.2.extract82.i172.i.i = phi i64 [ 0, %__barray_mask_return.exit.9.i ], [ %.fca.1.0.0.2.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] + %.fca.1.extract81.i171.i.i = phi ptr [ %2, %__barray_mask_return.exit.9.i ], [ %.fca.1.0.0.1.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] + %.fca.0.extract80.i170.i.i = phi ptr [ %1, %__barray_mask_return.exit.9.i ], [ %.fca.1.0.0.0.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] + %"294_0.0169.i.i" = phi i64 [ 0, %__barray_mask_return.exit.9.i ], [ %72, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] + %.pn168.i.i = phi { { ptr, ptr, i64 }, i64 } [ %42, %__barray_mask_return.exit.9.i ], [ %80, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] + %65 = add i64 %"294_0.0169.i.i", %.fca.2.extract82.i172.i.i %66 = lshr i64 %65, 6 - %67 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i184.i.i, i64 %66 + %67 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i171.i.i, i64 %66 %68 = load i64, ptr %67, align 4 %69 = and i64 %65, 63 %70 = lshr i64 %68, %69 @@ -260,21 +260,21 @@ panic.i.i.i.i: ; preds = %__barray_check_boun unreachable "__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i": ; preds = %__barray_check_bounds.exit.i.i.i - %72 = add nuw nsw i64 %"294_0.0182.i.i", 1 + %72 = add nuw nsw i64 %"294_0.0169.i.i", 1 %73 = shl nuw i64 1, %69 %74 = xor i64 %73, %68 store i64 %74, ptr %67, align 4 - %75 = getelementptr inbounds i64, ptr %.fca.0.extract80.i183.i.i, i64 %65 + %75 = getelementptr inbounds i64, ptr %.fca.0.extract80.i170.i.i, i64 %65 %76 = load i64, ptr %75, align 4 - %.fca.1.0.0.0.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 0 - %.fca.1.0.0.1.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 1 - %.fca.1.0.0.2.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 2 - %77 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, i64 %72, 1 + %.fca.1.0.0.0.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn168.i.i, 0, 0 + %.fca.1.0.0.1.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn168.i.i, 0, 1 + %.fca.1.0.0.2.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn168.i.i, 0, 2 + %77 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn168.i.i, i64 %72, 1 %78 = insertvalue { { ptr, ptr, i64 }, i64 } %77, ptr %.fca.1.0.0.0.extract.i.i.i, 0, 0 %79 = insertvalue { { ptr, ptr, i64 }, i64 } %78, ptr %.fca.1.0.0.1.extract.i.i.i, 0, 1 %80 = insertvalue { { ptr, ptr, i64 }, i64 } %79, i64 %.fca.1.0.0.2.extract.i.i.i, 0, 2 tail call void @___qfree(i64 %76) - %.not.i.i = icmp eq i64 %"294_0.0182.i.i", 9 + %.not.i.i = icmp eq i64 %"294_0.0169.i.i", 9 br i1 %.not.i.i, label %43, label %__barray_check_bounds.exit.i.i.i __hugr__.main.1.exit: ; preds = %61, %43 diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-measure_qb_array/measure_qb_array_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-measure_qb_array/measure_qb_array_aarch64-apple-darwin index 2d34acc98..b911a5f86 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-measure_qb_array/measure_qb_array_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-measure_qb_array/measure_qb_array_aarch64-apple-darwin @@ -37,7 +37,7 @@ entry: %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 br i1 %not_max.not.not.i.i, label %cond_207_case_0.i.i, label %__hugr__.__tk2_qalloc.210.exit.i -cond_207_case_0.i.i: ; preds = %cond_exit_20.8.i, %cond_exit_20.7.i, %cond_exit_20.6.i, %cond_exit_20.5.i, %cond_exit_20.4.i, %cond_exit_20.3.i, %cond_exit_20.2.i, %cond_exit_20.1.i, %cond_exit_20.i, %entry +cond_207_case_0.i.i: ; preds = %__barray_mask_return.exit.8.i, %__barray_mask_return.exit.7.i, %__barray_mask_return.exit.6.i, %__barray_mask_return.exit.5.i, %__barray_mask_return.exit.4.i, %__barray_mask_return.exit.3.i, %__barray_mask_return.exit.2.i, %__barray_mask_return.exit.1.i, %__barray_mask_return.exit.i, %entry tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable @@ -45,13 +45,13 @@ __hugr__.__tk2_qalloc.210.exit.i: ; preds = %entry tail call void @___reset(i64 %qalloc.i.i) %3 = load i64, ptr %2, align 4 %4 = trunc i64 %3 to i1 - br i1 %4, label %cond_exit_20.i, label %panic.i.i + br i1 %4, label %__barray_mask_return.exit.i, label %panic.i.i panic.i.i: ; preds = %__barray_check_bounds.exit.9.i, %__hugr__.__tk2_qalloc.210.exit.8.i, %__hugr__.__tk2_qalloc.210.exit.7.i, %__hugr__.__tk2_qalloc.210.exit.6.i, %__hugr__.__tk2_qalloc.210.exit.5.i, %__hugr__.__tk2_qalloc.210.exit.4.i, %__hugr__.__tk2_qalloc.210.exit.3.i, %__hugr__.__tk2_qalloc.210.exit.2.i, %__hugr__.__tk2_qalloc.210.exit.1.i, %__hugr__.__tk2_qalloc.210.exit.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -cond_exit_20.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.i +__barray_mask_return.exit.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.i %5 = and i64 %3, -2 store i64 %5, ptr %2, align 4 store i64 %qalloc.i.i, ptr %1, align 4 @@ -59,14 +59,14 @@ cond_exit_20.i: ; preds = %__hugr__.__tk2_qall %not_max.not.not.i.1.i = icmp eq i64 %qalloc.i.1.i, -1 br i1 %not_max.not.not.i.1.i, label %cond_207_case_0.i.i, label %__hugr__.__tk2_qalloc.210.exit.1.i -__hugr__.__tk2_qalloc.210.exit.1.i: ; preds = %cond_exit_20.i +__hugr__.__tk2_qalloc.210.exit.1.i: ; preds = %__barray_mask_return.exit.i tail call void @___reset(i64 %qalloc.i.1.i) %6 = load i64, ptr %2, align 4 %7 = and i64 %6, 2 - %.not280.i = icmp eq i64 %7, 0 - br i1 %.not280.i, label %panic.i.i, label %cond_exit_20.1.i + %.not277.i = icmp eq i64 %7, 0 + br i1 %.not277.i, label %panic.i.i, label %__barray_mask_return.exit.1.i -cond_exit_20.1.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.1.i +__barray_mask_return.exit.1.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.1.i %8 = and i64 %6, -3 store i64 %8, ptr %2, align 4 %9 = getelementptr inbounds nuw i8, ptr %1, i64 8 @@ -75,14 +75,14 @@ cond_exit_20.1.i: ; preds = %__hugr__.__tk2_qall %not_max.not.not.i.2.i = icmp eq i64 %qalloc.i.2.i, -1 br i1 %not_max.not.not.i.2.i, label %cond_207_case_0.i.i, label %__hugr__.__tk2_qalloc.210.exit.2.i -__hugr__.__tk2_qalloc.210.exit.2.i: ; preds = %cond_exit_20.1.i +__hugr__.__tk2_qalloc.210.exit.2.i: ; preds = %__barray_mask_return.exit.1.i tail call void @___reset(i64 %qalloc.i.2.i) %10 = load i64, ptr %2, align 4 %11 = and i64 %10, 4 - %.not281.i = icmp eq i64 %11, 0 - br i1 %.not281.i, label %panic.i.i, label %cond_exit_20.2.i + %.not278.i = icmp eq i64 %11, 0 + br i1 %.not278.i, label %panic.i.i, label %__barray_mask_return.exit.2.i -cond_exit_20.2.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.2.i +__barray_mask_return.exit.2.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.2.i %12 = and i64 %10, -5 store i64 %12, ptr %2, align 4 %13 = getelementptr inbounds nuw i8, ptr %1, i64 16 @@ -91,14 +91,14 @@ cond_exit_20.2.i: ; preds = %__hugr__.__tk2_qall %not_max.not.not.i.3.i = icmp eq i64 %qalloc.i.3.i, -1 br i1 %not_max.not.not.i.3.i, label %cond_207_case_0.i.i, label %__hugr__.__tk2_qalloc.210.exit.3.i -__hugr__.__tk2_qalloc.210.exit.3.i: ; preds = %cond_exit_20.2.i +__hugr__.__tk2_qalloc.210.exit.3.i: ; preds = %__barray_mask_return.exit.2.i tail call void @___reset(i64 %qalloc.i.3.i) %14 = load i64, ptr %2, align 4 %15 = and i64 %14, 8 - %.not282.i = icmp eq i64 %15, 0 - br i1 %.not282.i, label %panic.i.i, label %cond_exit_20.3.i + %.not279.i = icmp eq i64 %15, 0 + br i1 %.not279.i, label %panic.i.i, label %__barray_mask_return.exit.3.i -cond_exit_20.3.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.3.i +__barray_mask_return.exit.3.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.3.i %16 = and i64 %14, -9 store i64 %16, ptr %2, align 4 %17 = getelementptr inbounds nuw i8, ptr %1, i64 24 @@ -107,14 +107,14 @@ cond_exit_20.3.i: ; preds = %__hugr__.__tk2_qall %not_max.not.not.i.4.i = icmp eq i64 %qalloc.i.4.i, -1 br i1 %not_max.not.not.i.4.i, label %cond_207_case_0.i.i, label %__hugr__.__tk2_qalloc.210.exit.4.i -__hugr__.__tk2_qalloc.210.exit.4.i: ; preds = %cond_exit_20.3.i +__hugr__.__tk2_qalloc.210.exit.4.i: ; preds = %__barray_mask_return.exit.3.i tail call void @___reset(i64 %qalloc.i.4.i) %18 = load i64, ptr %2, align 4 %19 = and i64 %18, 16 - %.not283.i = icmp eq i64 %19, 0 - br i1 %.not283.i, label %panic.i.i, label %cond_exit_20.4.i + %.not280.i = icmp eq i64 %19, 0 + br i1 %.not280.i, label %panic.i.i, label %__barray_mask_return.exit.4.i -cond_exit_20.4.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.4.i +__barray_mask_return.exit.4.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.4.i %20 = and i64 %18, -17 store i64 %20, ptr %2, align 4 %21 = getelementptr inbounds nuw i8, ptr %1, i64 32 @@ -123,14 +123,14 @@ cond_exit_20.4.i: ; preds = %__hugr__.__tk2_qall %not_max.not.not.i.5.i = icmp eq i64 %qalloc.i.5.i, -1 br i1 %not_max.not.not.i.5.i, label %cond_207_case_0.i.i, label %__hugr__.__tk2_qalloc.210.exit.5.i -__hugr__.__tk2_qalloc.210.exit.5.i: ; preds = %cond_exit_20.4.i +__hugr__.__tk2_qalloc.210.exit.5.i: ; preds = %__barray_mask_return.exit.4.i tail call void @___reset(i64 %qalloc.i.5.i) %22 = load i64, ptr %2, align 4 %23 = and i64 %22, 32 - %.not284.i = icmp eq i64 %23, 0 - br i1 %.not284.i, label %panic.i.i, label %cond_exit_20.5.i + %.not281.i = icmp eq i64 %23, 0 + br i1 %.not281.i, label %panic.i.i, label %__barray_mask_return.exit.5.i -cond_exit_20.5.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.5.i +__barray_mask_return.exit.5.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.5.i %24 = and i64 %22, -33 store i64 %24, ptr %2, align 4 %25 = getelementptr inbounds nuw i8, ptr %1, i64 40 @@ -139,14 +139,14 @@ cond_exit_20.5.i: ; preds = %__hugr__.__tk2_qall %not_max.not.not.i.6.i = icmp eq i64 %qalloc.i.6.i, -1 br i1 %not_max.not.not.i.6.i, label %cond_207_case_0.i.i, label %__hugr__.__tk2_qalloc.210.exit.6.i -__hugr__.__tk2_qalloc.210.exit.6.i: ; preds = %cond_exit_20.5.i +__hugr__.__tk2_qalloc.210.exit.6.i: ; preds = %__barray_mask_return.exit.5.i tail call void @___reset(i64 %qalloc.i.6.i) %26 = load i64, ptr %2, align 4 %27 = and i64 %26, 64 - %.not285.i = icmp eq i64 %27, 0 - br i1 %.not285.i, label %panic.i.i, label %cond_exit_20.6.i + %.not282.i = icmp eq i64 %27, 0 + br i1 %.not282.i, label %panic.i.i, label %__barray_mask_return.exit.6.i -cond_exit_20.6.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.6.i +__barray_mask_return.exit.6.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.6.i %28 = and i64 %26, -65 store i64 %28, ptr %2, align 4 %29 = getelementptr inbounds nuw i8, ptr %1, i64 48 @@ -155,14 +155,14 @@ cond_exit_20.6.i: ; preds = %__hugr__.__tk2_qall %not_max.not.not.i.7.i = icmp eq i64 %qalloc.i.7.i, -1 br i1 %not_max.not.not.i.7.i, label %cond_207_case_0.i.i, label %__hugr__.__tk2_qalloc.210.exit.7.i -__hugr__.__tk2_qalloc.210.exit.7.i: ; preds = %cond_exit_20.6.i +__hugr__.__tk2_qalloc.210.exit.7.i: ; preds = %__barray_mask_return.exit.6.i tail call void @___reset(i64 %qalloc.i.7.i) %30 = load i64, ptr %2, align 4 %31 = and i64 %30, 128 - %.not286.i = icmp eq i64 %31, 0 - br i1 %.not286.i, label %panic.i.i, label %cond_exit_20.7.i + %.not283.i = icmp eq i64 %31, 0 + br i1 %.not283.i, label %panic.i.i, label %__barray_mask_return.exit.7.i -cond_exit_20.7.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.7.i +__barray_mask_return.exit.7.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.7.i %32 = and i64 %30, -129 store i64 %32, ptr %2, align 4 %33 = getelementptr inbounds nuw i8, ptr %1, i64 56 @@ -171,14 +171,14 @@ cond_exit_20.7.i: ; preds = %__hugr__.__tk2_qall %not_max.not.not.i.8.i = icmp eq i64 %qalloc.i.8.i, -1 br i1 %not_max.not.not.i.8.i, label %cond_207_case_0.i.i, label %__hugr__.__tk2_qalloc.210.exit.8.i -__hugr__.__tk2_qalloc.210.exit.8.i: ; preds = %cond_exit_20.7.i +__hugr__.__tk2_qalloc.210.exit.8.i: ; preds = %__barray_mask_return.exit.7.i tail call void @___reset(i64 %qalloc.i.8.i) %34 = load i64, ptr %2, align 4 %35 = and i64 %34, 256 - %.not287.i = icmp eq i64 %35, 0 - br i1 %.not287.i, label %panic.i.i, label %cond_exit_20.8.i + %.not284.i = icmp eq i64 %35, 0 + br i1 %.not284.i, label %panic.i.i, label %__barray_mask_return.exit.8.i -cond_exit_20.8.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.8.i +__barray_mask_return.exit.8.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.8.i %36 = and i64 %34, -257 store i64 %36, ptr %2, align 4 %37 = getelementptr inbounds nuw i8, ptr %1, i64 64 @@ -187,14 +187,14 @@ cond_exit_20.8.i: ; preds = %__hugr__.__tk2_qall %not_max.not.not.i.9.i = icmp eq i64 %qalloc.i.9.i, -1 br i1 %not_max.not.not.i.9.i, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.9.i -__barray_check_bounds.exit.9.i: ; preds = %cond_exit_20.8.i +__barray_check_bounds.exit.9.i: ; preds = %__barray_mask_return.exit.8.i tail call void @___reset(i64 %qalloc.i.9.i) %38 = load i64, ptr %2, align 4 %39 = and i64 %38, 512 - %.not288.i = icmp eq i64 %39, 0 - br i1 %.not288.i, label %panic.i.i, label %cond_exit_20.9.i + %.not285.i = icmp eq i64 %39, 0 + br i1 %.not285.i, label %panic.i.i, label %__barray_mask_return.exit.9.i -cond_exit_20.9.i: ; preds = %__barray_check_bounds.exit.9.i +__barray_mask_return.exit.9.i: ; preds = %__barray_check_bounds.exit.9.i %40 = and i64 %38, -513 store i64 %40, ptr %2, align 4 %41 = getelementptr inbounds nuw i8, ptr %1, i64 72 @@ -206,11 +206,11 @@ cond_exit_20.9.i: ; preds = %__barray_check_boun %43 = trunc i64 %42 to i1 br i1 %43, label %panic.i238.i, label %__barray_mask_borrow.exit.i -panic.i238.i: ; preds = %cond_exit_20.9.i +panic.i238.i: ; preds = %__barray_mask_return.exit.9.i tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_mask_borrow.exit.i: ; preds = %cond_exit_20.9.i +__barray_mask_borrow.exit.i: ; preds = %__barray_mask_return.exit.9.i %44 = or disjoint i64 %42, 1 store i64 %44, ptr %2, align 4 %45 = load i64, ptr %1, align 4 @@ -243,8 +243,8 @@ __barray_mask_borrow.exit242.i: ; preds = %__barray_mask_retur tail call void @___rxy(i64 %52, double 0x400921FB54442D18, double 0.000000e+00) %53 = load i64, ptr %2, align 4 %54 = and i64 %53, 4 - %.not268.i = icmp eq i64 %54, 0 - br i1 %.not268.i, label %panic.i243.i, label %__barray_mask_return.exit244.i + %.not265.i = icmp eq i64 %54, 0 + br i1 %.not265.i, label %panic.i243.i, label %__barray_mask_return.exit244.i panic.i243.i: ; preds = %__barray_mask_borrow.exit242.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") @@ -256,8 +256,8 @@ __barray_mask_return.exit244.i: ; preds = %__barray_mask_borro store i64 %52, ptr %13, align 4 %56 = load i64, ptr %2, align 4 %57 = and i64 %56, 8 - %.not269.i = icmp eq i64 %57, 0 - br i1 %.not269.i, label %__barray_mask_borrow.exit246.i, label %panic.i245.i + %.not266.i = icmp eq i64 %57, 0 + br i1 %.not266.i, label %__barray_mask_borrow.exit246.i, label %panic.i245.i panic.i245.i: ; preds = %__barray_mask_return.exit244.i tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") @@ -270,8 +270,8 @@ __barray_mask_borrow.exit246.i: ; preds = %__barray_mask_retur tail call void @___rxy(i64 %59, double 0x400921FB54442D18, double 0.000000e+00) %60 = load i64, ptr %2, align 4 %61 = and i64 %60, 8 - %.not270.i = icmp eq i64 %61, 0 - br i1 %.not270.i, label %panic.i247.i, label %__barray_mask_return.exit248.i + %.not267.i = icmp eq i64 %61, 0 + br i1 %.not267.i, label %panic.i247.i, label %__barray_mask_return.exit248.i panic.i247.i: ; preds = %__barray_mask_borrow.exit246.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") @@ -283,8 +283,8 @@ __barray_mask_return.exit248.i: ; preds = %__barray_mask_borro store i64 %59, ptr %17, align 4 %63 = load i64, ptr %2, align 4 %64 = and i64 %63, 512 - %.not271.i = icmp eq i64 %64, 0 - br i1 %.not271.i, label %__barray_mask_borrow.exit250.i, label %panic.i249.i + %.not268.i = icmp eq i64 %64, 0 + br i1 %.not268.i, label %__barray_mask_borrow.exit250.i, label %panic.i249.i panic.i249.i: ; preds = %__barray_mask_return.exit248.i tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") @@ -297,8 +297,8 @@ __barray_mask_borrow.exit250.i: ; preds = %__barray_mask_retur tail call void @___rxy(i64 %66, double 0x400921FB54442D18, double 0.000000e+00) %67 = load i64, ptr %2, align 4 %68 = and i64 %67, 512 - %.not272.i = icmp eq i64 %68, 0 - br i1 %.not272.i, label %panic.i251.i, label %__barray_mask_return.exit252.i + %.not269.i = icmp eq i64 %68, 0 + br i1 %.not269.i, label %panic.i251.i, label %__barray_mask_return.exit252.i panic.i251.i: ; preds = %__barray_mask_borrow.exit250.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") @@ -314,7 +314,7 @@ __barray_mask_return.exit252.i: ; preds = %__barray_mask_borro store i64 -1, ptr %72, align 1 br label %__barray_check_bounds.exit.i.i.i -73: ; preds = %loop_body.i.i +73: ; preds = %__barray_mask_return.exit.i.i %74 = lshr i64 %.fca.2.extract82.i.i.i, 6 %75 = getelementptr i64, ptr %.fca.1.extract81.i.i.i, i64 %74 %76 = load i64, ptr %75, align 4 @@ -355,16 +355,17 @@ mask_block_err.i.i.i.i: ; preds = %mask_block_ok.i.i.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit.i.i.i: ; preds = %loop_body.i.i, %__barray_mask_return.exit252.i - %.fca.2.extract82.i187.i.i = phi i64 [ 0, %__barray_mask_return.exit252.i ], [ %.fca.2.extract82.i.i.i, %loop_body.i.i ] - %.fca.1.extract81.i186.i.i = phi ptr [ %2, %__barray_mask_return.exit252.i ], [ %.fca.1.extract81.i.i.i, %loop_body.i.i ] - %.fca.0.extract80.i185.i.i = phi ptr [ %1, %__barray_mask_return.exit252.i ], [ %.fca.0.extract80.i.i.i, %loop_body.i.i ] - %"306_0.sroa.15.0184.i.i" = phi i64 [ 0, %__barray_mask_return.exit252.i ], [ %95, %loop_body.i.i ] - %.pn165183.i.i = phi { { ptr, ptr, i64 }, i64 } [ %70, %__barray_mask_return.exit252.i ], [ %110, %loop_body.i.i ] - %95 = add nuw nsw i64 %"306_0.sroa.15.0184.i.i", 1 - %96 = add i64 %"306_0.sroa.15.0184.i.i", %.fca.2.extract82.i187.i.i +__barray_check_bounds.exit.i.i.i: ; preds = %__barray_mask_return.exit.i.i, %__barray_mask_return.exit252.i + %.fca.2.extract82.i175.i.i = phi i64 [ 0, %__barray_mask_return.exit252.i ], [ %.fca.2.extract82.i.i.i, %__barray_mask_return.exit.i.i ] + %.fca.1.extract81.i174.i.i = phi ptr [ %2, %__barray_mask_return.exit252.i ], [ %.fca.1.extract81.i.i.i, %__barray_mask_return.exit.i.i ] + %.fca.0.extract80.i173.i.i = phi ptr [ %1, %__barray_mask_return.exit252.i ], [ %.fca.0.extract80.i.i.i, %__barray_mask_return.exit.i.i ] + %"306_0.sroa.15.0172.i.i" = phi i64 [ 0, %__barray_mask_return.exit252.i ], [ %95, %__barray_mask_return.exit.i.i ] + %.pn.i.i = phi { { ptr, ptr, i64 }, i64 } [ %70, %__barray_mask_return.exit252.i ], [ %.pn171.i.i, %__barray_mask_return.exit.i.i ] + %.pn171.i.i = insertvalue { { ptr, ptr, i64 }, i64 } %.pn.i.i, i64 %"306_0.sroa.15.0172.i.i", 1 + %95 = add nuw nsw i64 %"306_0.sroa.15.0172.i.i", 1 + %96 = add i64 %"306_0.sroa.15.0172.i.i", %.fca.2.extract82.i175.i.i %97 = lshr i64 %96, 6 - %98 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i186.i.i, i64 %97 + %98 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i174.i.i, i64 %97 %99 = load i64, ptr %98, align 4 %100 = and i64 %96, 63 %101 = lshr i64 %99, %100 @@ -379,82 +380,81 @@ __barray_check_bounds.exit.i.i: ; preds = %__barray_check_boun %103 = shl nuw i64 1, %100 %104 = xor i64 %103, %99 store i64 %104, ptr %98, align 4 - %105 = getelementptr inbounds i64, ptr %.fca.0.extract80.i185.i.i, i64 %96 + %105 = getelementptr inbounds i64, ptr %.fca.0.extract80.i173.i.i, i64 %96 %106 = load i64, ptr %105, align 4 %lazy_measure.i.i = tail call i64 @___lazy_measure(i64 %106) tail call void @___qfree(i64 %106) %107 = load i64, ptr %72, align 4 - %108 = lshr i64 %107, %"306_0.sroa.15.0184.i.i" + %108 = lshr i64 %107, %"306_0.sroa.15.0172.i.i" %109 = trunc i64 %108 to i1 - br i1 %109, label %loop_body.i.i, label %panic.i.i.i + br i1 %109, label %__barray_mask_return.exit.i.i, label %panic.i.i.i panic.i.i.i: ; preds = %__barray_check_bounds.exit.i.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -loop_body.i.i: ; preds = %__barray_check_bounds.exit.i.i +__barray_mask_return.exit.i.i: ; preds = %__barray_check_bounds.exit.i.i %"371_054.fca.1.insert.i.i" = insertvalue { i1, i64, i1 } { i1 true, i64 poison, i1 undef }, i64 %lazy_measure.i.i, 1 %"371_054.fca.2.insert.i.i" = insertvalue { i1, i64, i1 } %"371_054.fca.1.insert.i.i", i1 undef, 2 - %110 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn165183.i.i, i64 %95, 1 - %111 = shl nuw nsw i64 1, %"306_0.sroa.15.0184.i.i" - %112 = xor i64 %107, %111 - store i64 %112, ptr %72, align 4 - %113 = getelementptr inbounds nuw { i1, i64, i1 }, ptr %71, i64 %"306_0.sroa.15.0184.i.i" - store { i1, i64, i1 } %"371_054.fca.2.insert.i.i", ptr %113, align 4 - %114 = extractvalue { { ptr, ptr, i64 }, i64 } %.pn165183.i.i, 0 - %.fca.0.extract80.i.i.i = extractvalue { ptr, ptr, i64 } %114, 0 - %.fca.1.extract81.i.i.i = extractvalue { ptr, ptr, i64 } %114, 1 - %.fca.2.extract82.i.i.i = extractvalue { ptr, ptr, i64 } %114, 2 - %exitcond.not.i.i = icmp eq i64 %95, 10 - br i1 %exitcond.not.i.i, label %73, label %__barray_check_bounds.exit.i.i.i + %110 = shl nuw nsw i64 1, %"306_0.sroa.15.0172.i.i" + %111 = xor i64 %107, %110 + store i64 %111, ptr %72, align 4 + %112 = getelementptr inbounds nuw { i1, i64, i1 }, ptr %71, i64 %"306_0.sroa.15.0172.i.i" + store { i1, i64, i1 } %"371_054.fca.2.insert.i.i", ptr %112, align 4 + %113 = extractvalue { { ptr, ptr, i64 }, i64 } %.pn.i.i, 0 + %.fca.0.extract80.i.i.i = extractvalue { ptr, ptr, i64 } %113, 0 + %.fca.1.extract81.i.i.i = extractvalue { ptr, ptr, i64 } %113, 1 + %.fca.2.extract82.i.i.i = extractvalue { ptr, ptr, i64 } %113, 2 + %.not.i.i = icmp eq i64 %"306_0.sroa.15.0172.i.i", 9 + br i1 %.not.i.i, label %73, label %__barray_check_bounds.exit.i.i.i "__hugr__.$measure_array$$n(10).280.exit.i": ; preds = %91, %73 tail call void @heap_free(ptr %.fca.0.extract80.i.i.i) tail call void @heap_free(ptr nonnull %.fca.1.extract81.i.i.i) - br label %__barray_check_bounds.exit255.i + br label %__barray_check_bounds.exit254.i cond_89_case_0.i: ; preds = %cond_exit_89.thread.i - %115 = load i64, ptr %72, align 4 - %116 = or i64 %115, -1024 - store i64 %116, ptr %72, align 4 - %117 = icmp eq i64 %116, -1 - br i1 %117, label %__hugr__.main.1.exit, label %mask_block_err.i.i + %114 = load i64, ptr %72, align 4 + %115 = or i64 %114, -1024 + store i64 %115, ptr %72, align 4 + %116 = icmp eq i64 %115, -1 + br i1 %116, label %__hugr__.main.1.exit, label %mask_block_err.i.i mask_block_err.i.i: ; preds = %cond_89_case_0.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit255.i: ; preds = %cond_exit_89.thread.i, %"__hugr__.$measure_array$$n(10).280.exit.i" - %"92_0.0279.i" = phi i64 [ 0, %"__hugr__.$measure_array$$n(10).280.exit.i" ], [ %118, %cond_exit_89.thread.i ] - %118 = add nuw nsw i64 %"92_0.0279.i", 1 - %119 = load i64, ptr %72, align 4 - %120 = lshr i64 %119, %"92_0.0279.i" - %121 = trunc i64 %120 to i1 - br i1 %121, label %cond_exit_89.thread.i, label %__barray_mask_borrow.exit259.i - -__barray_mask_borrow.exit259.i: ; preds = %__barray_check_bounds.exit255.i - %122 = shl nuw nsw i64 1, %"92_0.0279.i" - %123 = xor i64 %119, %122 - store i64 %123, ptr %72, align 4 - %124 = getelementptr inbounds nuw { i1, i64, i1 }, ptr %71, i64 %"92_0.0279.i" - %125 = load { i1, i64, i1 }, ptr %124, align 4 - %.fca.0.extract167.i = extractvalue { i1, i64, i1 } %125, 0 +__barray_check_bounds.exit254.i: ; preds = %cond_exit_89.thread.i, %"__hugr__.$measure_array$$n(10).280.exit.i" + %"92_0.0276.i" = phi i64 [ 0, %"__hugr__.$measure_array$$n(10).280.exit.i" ], [ %117, %cond_exit_89.thread.i ] + %117 = add nuw nsw i64 %"92_0.0276.i", 1 + %118 = load i64, ptr %72, align 4 + %119 = lshr i64 %118, %"92_0.0276.i" + %120 = trunc i64 %119 to i1 + br i1 %120, label %cond_exit_89.thread.i, label %__barray_mask_borrow.exit258.i + +__barray_mask_borrow.exit258.i: ; preds = %__barray_check_bounds.exit254.i + %121 = shl nuw nsw i64 1, %"92_0.0276.i" + %122 = xor i64 %118, %121 + store i64 %122, ptr %72, align 4 + %123 = getelementptr inbounds nuw { i1, i64, i1 }, ptr %71, i64 %"92_0.0276.i" + %124 = load { i1, i64, i1 }, ptr %123, align 4 + %.fca.0.extract167.i = extractvalue { i1, i64, i1 } %124, 0 br i1 %.fca.0.extract167.i, label %cond_392_case_1.i, label %cond_exit_89.thread.i -cond_exit_89.thread.i: ; preds = %cond_392_case_1.i, %__barray_mask_borrow.exit259.i, %__barray_check_bounds.exit255.i - %exitcond.i = icmp eq i64 %118, 10 - br i1 %exitcond.i, label %cond_89_case_0.i, label %__barray_check_bounds.exit255.i +cond_exit_89.thread.i: ; preds = %cond_392_case_1.i, %__barray_mask_borrow.exit258.i, %__barray_check_bounds.exit254.i + %exitcond.i = icmp eq i64 %117, 10 + br i1 %exitcond.i, label %cond_89_case_0.i, label %__barray_check_bounds.exit254.i -cond_392_case_1.i: ; preds = %__barray_mask_borrow.exit259.i - %.fca.1.extract.i = extractvalue { i1, i64, i1 } %125, 1 +cond_392_case_1.i: ; preds = %__barray_mask_borrow.exit258.i + %.fca.1.extract.i = extractvalue { i1, i64, i1 } %124, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.i) br label %cond_exit_89.thread.i __hugr__.main.1.exit: ; preds = %cond_89_case_0.i tail call void @heap_free(ptr %71) tail call void @heap_free(ptr nonnull %72) - %126 = tail call i64 @teardown() - ret i64 %126 + %125 = tail call i64 @teardown() + ret i64 %125 } declare void @setup(i64) local_unnamed_addr diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-discard_qb_array/discard_qb_array_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-discard_qb_array/discard_qb_array_x86_64-apple-darwin index 87a59b320..ba6b2c7e5 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-discard_qb_array/discard_qb_array_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-discard_qb_array/discard_qb_array_x86_64-apple-darwin @@ -31,7 +31,7 @@ entry: %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 br i1 %not_max.not.not.i.i, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i -cond_213_case_0.i.i: ; preds = %cond_exit_20.i.8, %cond_exit_20.i.7, %cond_exit_20.i.6, %cond_exit_20.i.5, %cond_exit_20.i.4, %cond_exit_20.i.3, %cond_exit_20.i.2, %cond_exit_20.i.1, %cond_exit_20.i, %entry +cond_213_case_0.i.i: ; preds = %__barray_mask_return.exit.i.8, %__barray_mask_return.exit.i.7, %__barray_mask_return.exit.i.6, %__barray_mask_return.exit.i.5, %__barray_mask_return.exit.i.4, %__barray_mask_return.exit.i.3, %__barray_mask_return.exit.i.2, %__barray_mask_return.exit.i.1, %__barray_mask_return.exit.i, %entry tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable @@ -39,13 +39,13 @@ __barray_check_bounds.exit.i: ; preds = %entry tail call void @___reset(i64 %qalloc.i.i) %3 = load i64, ptr %2, align 4 %4 = trunc i64 %3 to i1 - br i1 %4, label %cond_exit_20.i, label %panic.i.i + br i1 %4, label %__barray_mask_return.exit.i, label %panic.i.i panic.i.i: ; preds = %__barray_check_bounds.exit.i.9, %__barray_check_bounds.exit.i.8, %__barray_check_bounds.exit.i.7, %__barray_check_bounds.exit.i.6, %__barray_check_bounds.exit.i.5, %__barray_check_bounds.exit.i.4, %__barray_check_bounds.exit.i.3, %__barray_check_bounds.exit.i.2, %__barray_check_bounds.exit.i.1, %__barray_check_bounds.exit.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -cond_exit_20.i: ; preds = %__barray_check_bounds.exit.i +__barray_mask_return.exit.i: ; preds = %__barray_check_bounds.exit.i %5 = and i64 %3, -2 store i64 %5, ptr %2, align 4 store i64 %qalloc.i.i, ptr %1, align 4 @@ -53,14 +53,14 @@ cond_exit_20.i: ; preds = %__barray_check_boun %not_max.not.not.i.i.1 = icmp eq i64 %qalloc.i.i.1, -1 br i1 %not_max.not.not.i.i.1, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.1 -__barray_check_bounds.exit.i.1: ; preds = %cond_exit_20.i +__barray_check_bounds.exit.i.1: ; preds = %__barray_mask_return.exit.i tail call void @___reset(i64 %qalloc.i.i.1) %6 = load i64, ptr %2, align 4 %7 = and i64 %6, 2 %.not = icmp eq i64 %7, 0 - br i1 %.not, label %panic.i.i, label %cond_exit_20.i.1 + br i1 %.not, label %panic.i.i, label %__barray_mask_return.exit.i.1 -cond_exit_20.i.1: ; preds = %__barray_check_bounds.exit.i.1 +__barray_mask_return.exit.i.1: ; preds = %__barray_check_bounds.exit.i.1 %8 = and i64 %6, -3 store i64 %8, ptr %2, align 4 %9 = getelementptr inbounds nuw i8, ptr %1, i64 8 @@ -69,14 +69,14 @@ cond_exit_20.i.1: ; preds = %__barray_check_boun %not_max.not.not.i.i.2 = icmp eq i64 %qalloc.i.i.2, -1 br i1 %not_max.not.not.i.i.2, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.2 -__barray_check_bounds.exit.i.2: ; preds = %cond_exit_20.i.1 +__barray_check_bounds.exit.i.2: ; preds = %__barray_mask_return.exit.i.1 tail call void @___reset(i64 %qalloc.i.i.2) %10 = load i64, ptr %2, align 4 %11 = and i64 %10, 4 %.not1 = icmp eq i64 %11, 0 - br i1 %.not1, label %panic.i.i, label %cond_exit_20.i.2 + br i1 %.not1, label %panic.i.i, label %__barray_mask_return.exit.i.2 -cond_exit_20.i.2: ; preds = %__barray_check_bounds.exit.i.2 +__barray_mask_return.exit.i.2: ; preds = %__barray_check_bounds.exit.i.2 %12 = and i64 %10, -5 store i64 %12, ptr %2, align 4 %13 = getelementptr inbounds nuw i8, ptr %1, i64 16 @@ -85,14 +85,14 @@ cond_exit_20.i.2: ; preds = %__barray_check_boun %not_max.not.not.i.i.3 = icmp eq i64 %qalloc.i.i.3, -1 br i1 %not_max.not.not.i.i.3, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.3 -__barray_check_bounds.exit.i.3: ; preds = %cond_exit_20.i.2 +__barray_check_bounds.exit.i.3: ; preds = %__barray_mask_return.exit.i.2 tail call void @___reset(i64 %qalloc.i.i.3) %14 = load i64, ptr %2, align 4 %15 = and i64 %14, 8 %.not2 = icmp eq i64 %15, 0 - br i1 %.not2, label %panic.i.i, label %cond_exit_20.i.3 + br i1 %.not2, label %panic.i.i, label %__barray_mask_return.exit.i.3 -cond_exit_20.i.3: ; preds = %__barray_check_bounds.exit.i.3 +__barray_mask_return.exit.i.3: ; preds = %__barray_check_bounds.exit.i.3 %16 = and i64 %14, -9 store i64 %16, ptr %2, align 4 %17 = getelementptr inbounds nuw i8, ptr %1, i64 24 @@ -101,14 +101,14 @@ cond_exit_20.i.3: ; preds = %__barray_check_boun %not_max.not.not.i.i.4 = icmp eq i64 %qalloc.i.i.4, -1 br i1 %not_max.not.not.i.i.4, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.4 -__barray_check_bounds.exit.i.4: ; preds = %cond_exit_20.i.3 +__barray_check_bounds.exit.i.4: ; preds = %__barray_mask_return.exit.i.3 tail call void @___reset(i64 %qalloc.i.i.4) %18 = load i64, ptr %2, align 4 %19 = and i64 %18, 16 %.not3 = icmp eq i64 %19, 0 - br i1 %.not3, label %panic.i.i, label %cond_exit_20.i.4 + br i1 %.not3, label %panic.i.i, label %__barray_mask_return.exit.i.4 -cond_exit_20.i.4: ; preds = %__barray_check_bounds.exit.i.4 +__barray_mask_return.exit.i.4: ; preds = %__barray_check_bounds.exit.i.4 %20 = and i64 %18, -17 store i64 %20, ptr %2, align 4 %21 = getelementptr inbounds nuw i8, ptr %1, i64 32 @@ -117,14 +117,14 @@ cond_exit_20.i.4: ; preds = %__barray_check_boun %not_max.not.not.i.i.5 = icmp eq i64 %qalloc.i.i.5, -1 br i1 %not_max.not.not.i.i.5, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.5 -__barray_check_bounds.exit.i.5: ; preds = %cond_exit_20.i.4 +__barray_check_bounds.exit.i.5: ; preds = %__barray_mask_return.exit.i.4 tail call void @___reset(i64 %qalloc.i.i.5) %22 = load i64, ptr %2, align 4 %23 = and i64 %22, 32 %.not4 = icmp eq i64 %23, 0 - br i1 %.not4, label %panic.i.i, label %cond_exit_20.i.5 + br i1 %.not4, label %panic.i.i, label %__barray_mask_return.exit.i.5 -cond_exit_20.i.5: ; preds = %__barray_check_bounds.exit.i.5 +__barray_mask_return.exit.i.5: ; preds = %__barray_check_bounds.exit.i.5 %24 = and i64 %22, -33 store i64 %24, ptr %2, align 4 %25 = getelementptr inbounds nuw i8, ptr %1, i64 40 @@ -133,14 +133,14 @@ cond_exit_20.i.5: ; preds = %__barray_check_boun %not_max.not.not.i.i.6 = icmp eq i64 %qalloc.i.i.6, -1 br i1 %not_max.not.not.i.i.6, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.6 -__barray_check_bounds.exit.i.6: ; preds = %cond_exit_20.i.5 +__barray_check_bounds.exit.i.6: ; preds = %__barray_mask_return.exit.i.5 tail call void @___reset(i64 %qalloc.i.i.6) %26 = load i64, ptr %2, align 4 %27 = and i64 %26, 64 %.not5 = icmp eq i64 %27, 0 - br i1 %.not5, label %panic.i.i, label %cond_exit_20.i.6 + br i1 %.not5, label %panic.i.i, label %__barray_mask_return.exit.i.6 -cond_exit_20.i.6: ; preds = %__barray_check_bounds.exit.i.6 +__barray_mask_return.exit.i.6: ; preds = %__barray_check_bounds.exit.i.6 %28 = and i64 %26, -65 store i64 %28, ptr %2, align 4 %29 = getelementptr inbounds nuw i8, ptr %1, i64 48 @@ -149,14 +149,14 @@ cond_exit_20.i.6: ; preds = %__barray_check_boun %not_max.not.not.i.i.7 = icmp eq i64 %qalloc.i.i.7, -1 br i1 %not_max.not.not.i.i.7, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.7 -__barray_check_bounds.exit.i.7: ; preds = %cond_exit_20.i.6 +__barray_check_bounds.exit.i.7: ; preds = %__barray_mask_return.exit.i.6 tail call void @___reset(i64 %qalloc.i.i.7) %30 = load i64, ptr %2, align 4 %31 = and i64 %30, 128 %.not6 = icmp eq i64 %31, 0 - br i1 %.not6, label %panic.i.i, label %cond_exit_20.i.7 + br i1 %.not6, label %panic.i.i, label %__barray_mask_return.exit.i.7 -cond_exit_20.i.7: ; preds = %__barray_check_bounds.exit.i.7 +__barray_mask_return.exit.i.7: ; preds = %__barray_check_bounds.exit.i.7 %32 = and i64 %30, -129 store i64 %32, ptr %2, align 4 %33 = getelementptr inbounds nuw i8, ptr %1, i64 56 @@ -165,14 +165,14 @@ cond_exit_20.i.7: ; preds = %__barray_check_boun %not_max.not.not.i.i.8 = icmp eq i64 %qalloc.i.i.8, -1 br i1 %not_max.not.not.i.i.8, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.8 -__barray_check_bounds.exit.i.8: ; preds = %cond_exit_20.i.7 +__barray_check_bounds.exit.i.8: ; preds = %__barray_mask_return.exit.i.7 tail call void @___reset(i64 %qalloc.i.i.8) %34 = load i64, ptr %2, align 4 %35 = and i64 %34, 256 %.not7 = icmp eq i64 %35, 0 - br i1 %.not7, label %panic.i.i, label %cond_exit_20.i.8 + br i1 %.not7, label %panic.i.i, label %__barray_mask_return.exit.i.8 -cond_exit_20.i.8: ; preds = %__barray_check_bounds.exit.i.8 +__barray_mask_return.exit.i.8: ; preds = %__barray_check_bounds.exit.i.8 %36 = and i64 %34, -257 store i64 %36, ptr %2, align 4 %37 = getelementptr inbounds nuw i8, ptr %1, i64 64 @@ -181,14 +181,14 @@ cond_exit_20.i.8: ; preds = %__barray_check_boun %not_max.not.not.i.i.9 = icmp eq i64 %qalloc.i.i.9, -1 br i1 %not_max.not.not.i.i.9, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.9 -__barray_check_bounds.exit.i.9: ; preds = %cond_exit_20.i.8 +__barray_check_bounds.exit.i.9: ; preds = %__barray_mask_return.exit.i.8 tail call void @___reset(i64 %qalloc.i.i.9) %38 = load i64, ptr %2, align 4 %39 = and i64 %38, 512 %.not8 = icmp eq i64 %39, 0 - br i1 %.not8, label %panic.i.i, label %cond_exit_20.i.9 + br i1 %.not8, label %panic.i.i, label %__barray_mask_return.exit.i.9 -cond_exit_20.i.9: ; preds = %__barray_check_bounds.exit.i.9 +__barray_mask_return.exit.i.9: ; preds = %__barray_check_bounds.exit.i.9 %40 = and i64 %38, -513 store i64 %40, ptr %2, align 4 %41 = getelementptr inbounds nuw i8, ptr %1, i64 72 @@ -240,15 +240,15 @@ mask_block_err.i.i.i.i: ; preds = %mask_block_ok.i.i.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit.i.i.i: ; preds = %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i", %cond_exit_20.i.9 - %.fca.2.extract82.i185.i.i = phi i64 [ 0, %cond_exit_20.i.9 ], [ %.fca.1.0.0.2.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %.fca.1.extract81.i184.i.i = phi ptr [ %2, %cond_exit_20.i.9 ], [ %.fca.1.0.0.1.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %.fca.0.extract80.i183.i.i = phi ptr [ %1, %cond_exit_20.i.9 ], [ %.fca.1.0.0.0.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %"294_0.0182.i.i" = phi i64 [ 0, %cond_exit_20.i.9 ], [ %72, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %.pn181.i.i = phi { { ptr, ptr, i64 }, i64 } [ %42, %cond_exit_20.i.9 ], [ %80, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %65 = add i64 %"294_0.0182.i.i", %.fca.2.extract82.i185.i.i +__barray_check_bounds.exit.i.i.i: ; preds = %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i", %__barray_mask_return.exit.i.9 + %.fca.2.extract82.i172.i.i = phi i64 [ 0, %__barray_mask_return.exit.i.9 ], [ %.fca.1.0.0.2.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] + %.fca.1.extract81.i171.i.i = phi ptr [ %2, %__barray_mask_return.exit.i.9 ], [ %.fca.1.0.0.1.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] + %.fca.0.extract80.i170.i.i = phi ptr [ %1, %__barray_mask_return.exit.i.9 ], [ %.fca.1.0.0.0.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] + %"294_0.0169.i.i" = phi i64 [ 0, %__barray_mask_return.exit.i.9 ], [ %72, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] + %.pn168.i.i = phi { { ptr, ptr, i64 }, i64 } [ %42, %__barray_mask_return.exit.i.9 ], [ %80, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] + %65 = add i64 %"294_0.0169.i.i", %.fca.2.extract82.i172.i.i %66 = lshr i64 %65, 6 - %67 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i184.i.i, i64 %66 + %67 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i171.i.i, i64 %66 %68 = load i64, ptr %67, align 4 %69 = and i64 %65, 63 %70 = lshr i64 %68, %69 @@ -260,21 +260,21 @@ panic.i.i.i.i: ; preds = %__barray_check_boun unreachable "__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i": ; preds = %__barray_check_bounds.exit.i.i.i - %72 = add nuw nsw i64 %"294_0.0182.i.i", 1 + %72 = add nuw nsw i64 %"294_0.0169.i.i", 1 %73 = shl nuw i64 1, %69 %74 = xor i64 %73, %68 store i64 %74, ptr %67, align 4 - %75 = getelementptr inbounds i64, ptr %.fca.0.extract80.i183.i.i, i64 %65 + %75 = getelementptr inbounds i64, ptr %.fca.0.extract80.i170.i.i, i64 %65 %76 = load i64, ptr %75, align 4 - %.fca.1.0.0.0.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 0 - %.fca.1.0.0.1.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 1 - %.fca.1.0.0.2.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 2 - %77 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, i64 %72, 1 + %.fca.1.0.0.0.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn168.i.i, 0, 0 + %.fca.1.0.0.1.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn168.i.i, 0, 1 + %.fca.1.0.0.2.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn168.i.i, 0, 2 + %77 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn168.i.i, i64 %72, 1 %78 = insertvalue { { ptr, ptr, i64 }, i64 } %77, ptr %.fca.1.0.0.0.extract.i.i.i, 0, 0 %79 = insertvalue { { ptr, ptr, i64 }, i64 } %78, ptr %.fca.1.0.0.1.extract.i.i.i, 0, 1 %80 = insertvalue { { ptr, ptr, i64 }, i64 } %79, i64 %.fca.1.0.0.2.extract.i.i.i, 0, 2 tail call void @___qfree(i64 %76) - %.not.i.i = icmp eq i64 %"294_0.0182.i.i", 9 + %.not.i.i = icmp eq i64 %"294_0.0169.i.i", 9 br i1 %.not.i.i, label %43, label %__barray_check_bounds.exit.i.i.i __hugr__.main.1.exit: ; preds = %61, %43 diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-measure_qb_array/measure_qb_array_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-measure_qb_array/measure_qb_array_x86_64-apple-darwin index e17eddfda..60488a25d 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-measure_qb_array/measure_qb_array_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-measure_qb_array/measure_qb_array_x86_64-apple-darwin @@ -37,7 +37,7 @@ entry: %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 br i1 %not_max.not.not.i.i, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i -cond_207_case_0.i.i: ; preds = %cond_exit_20.i.8, %cond_exit_20.i.7, %cond_exit_20.i.6, %cond_exit_20.i.5, %cond_exit_20.i.4, %cond_exit_20.i.3, %cond_exit_20.i.2, %cond_exit_20.i.1, %cond_exit_20.i, %entry +cond_207_case_0.i.i: ; preds = %__barray_mask_return.exit.i.8, %__barray_mask_return.exit.i.7, %__barray_mask_return.exit.i.6, %__barray_mask_return.exit.i.5, %__barray_mask_return.exit.i.4, %__barray_mask_return.exit.i.3, %__barray_mask_return.exit.i.2, %__barray_mask_return.exit.i.1, %__barray_mask_return.exit.i, %entry tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable @@ -45,13 +45,13 @@ __barray_check_bounds.exit.i: ; preds = %entry tail call void @___reset(i64 %qalloc.i.i) %3 = load i64, ptr %2, align 4 %4 = trunc i64 %3 to i1 - br i1 %4, label %cond_exit_20.i, label %panic.i.i + br i1 %4, label %__barray_mask_return.exit.i, label %panic.i.i panic.i.i: ; preds = %__barray_check_bounds.exit.i.9, %__barray_check_bounds.exit.i.8, %__barray_check_bounds.exit.i.7, %__barray_check_bounds.exit.i.6, %__barray_check_bounds.exit.i.5, %__barray_check_bounds.exit.i.4, %__barray_check_bounds.exit.i.3, %__barray_check_bounds.exit.i.2, %__barray_check_bounds.exit.i.1, %__barray_check_bounds.exit.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -cond_exit_20.i: ; preds = %__barray_check_bounds.exit.i +__barray_mask_return.exit.i: ; preds = %__barray_check_bounds.exit.i %5 = and i64 %3, -2 store i64 %5, ptr %2, align 4 store i64 %qalloc.i.i, ptr %1, align 4 @@ -59,14 +59,14 @@ cond_exit_20.i: ; preds = %__barray_check_boun %not_max.not.not.i.i.1 = icmp eq i64 %qalloc.i.i.1, -1 br i1 %not_max.not.not.i.i.1, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.1 -__barray_check_bounds.exit.i.1: ; preds = %cond_exit_20.i +__barray_check_bounds.exit.i.1: ; preds = %__barray_mask_return.exit.i tail call void @___reset(i64 %qalloc.i.i.1) %6 = load i64, ptr %2, align 4 %7 = and i64 %6, 2 %.not = icmp eq i64 %7, 0 - br i1 %.not, label %panic.i.i, label %cond_exit_20.i.1 + br i1 %.not, label %panic.i.i, label %__barray_mask_return.exit.i.1 -cond_exit_20.i.1: ; preds = %__barray_check_bounds.exit.i.1 +__barray_mask_return.exit.i.1: ; preds = %__barray_check_bounds.exit.i.1 %8 = and i64 %6, -3 store i64 %8, ptr %2, align 4 %9 = getelementptr inbounds nuw i8, ptr %1, i64 8 @@ -75,14 +75,14 @@ cond_exit_20.i.1: ; preds = %__barray_check_boun %not_max.not.not.i.i.2 = icmp eq i64 %qalloc.i.i.2, -1 br i1 %not_max.not.not.i.i.2, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.2 -__barray_check_bounds.exit.i.2: ; preds = %cond_exit_20.i.1 +__barray_check_bounds.exit.i.2: ; preds = %__barray_mask_return.exit.i.1 tail call void @___reset(i64 %qalloc.i.i.2) %10 = load i64, ptr %2, align 4 %11 = and i64 %10, 4 %.not1 = icmp eq i64 %11, 0 - br i1 %.not1, label %panic.i.i, label %cond_exit_20.i.2 + br i1 %.not1, label %panic.i.i, label %__barray_mask_return.exit.i.2 -cond_exit_20.i.2: ; preds = %__barray_check_bounds.exit.i.2 +__barray_mask_return.exit.i.2: ; preds = %__barray_check_bounds.exit.i.2 %12 = and i64 %10, -5 store i64 %12, ptr %2, align 4 %13 = getelementptr inbounds nuw i8, ptr %1, i64 16 @@ -91,14 +91,14 @@ cond_exit_20.i.2: ; preds = %__barray_check_boun %not_max.not.not.i.i.3 = icmp eq i64 %qalloc.i.i.3, -1 br i1 %not_max.not.not.i.i.3, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.3 -__barray_check_bounds.exit.i.3: ; preds = %cond_exit_20.i.2 +__barray_check_bounds.exit.i.3: ; preds = %__barray_mask_return.exit.i.2 tail call void @___reset(i64 %qalloc.i.i.3) %14 = load i64, ptr %2, align 4 %15 = and i64 %14, 8 %.not2 = icmp eq i64 %15, 0 - br i1 %.not2, label %panic.i.i, label %cond_exit_20.i.3 + br i1 %.not2, label %panic.i.i, label %__barray_mask_return.exit.i.3 -cond_exit_20.i.3: ; preds = %__barray_check_bounds.exit.i.3 +__barray_mask_return.exit.i.3: ; preds = %__barray_check_bounds.exit.i.3 %16 = and i64 %14, -9 store i64 %16, ptr %2, align 4 %17 = getelementptr inbounds nuw i8, ptr %1, i64 24 @@ -107,14 +107,14 @@ cond_exit_20.i.3: ; preds = %__barray_check_boun %not_max.not.not.i.i.4 = icmp eq i64 %qalloc.i.i.4, -1 br i1 %not_max.not.not.i.i.4, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.4 -__barray_check_bounds.exit.i.4: ; preds = %cond_exit_20.i.3 +__barray_check_bounds.exit.i.4: ; preds = %__barray_mask_return.exit.i.3 tail call void @___reset(i64 %qalloc.i.i.4) %18 = load i64, ptr %2, align 4 %19 = and i64 %18, 16 %.not3 = icmp eq i64 %19, 0 - br i1 %.not3, label %panic.i.i, label %cond_exit_20.i.4 + br i1 %.not3, label %panic.i.i, label %__barray_mask_return.exit.i.4 -cond_exit_20.i.4: ; preds = %__barray_check_bounds.exit.i.4 +__barray_mask_return.exit.i.4: ; preds = %__barray_check_bounds.exit.i.4 %20 = and i64 %18, -17 store i64 %20, ptr %2, align 4 %21 = getelementptr inbounds nuw i8, ptr %1, i64 32 @@ -123,14 +123,14 @@ cond_exit_20.i.4: ; preds = %__barray_check_boun %not_max.not.not.i.i.5 = icmp eq i64 %qalloc.i.i.5, -1 br i1 %not_max.not.not.i.i.5, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.5 -__barray_check_bounds.exit.i.5: ; preds = %cond_exit_20.i.4 +__barray_check_bounds.exit.i.5: ; preds = %__barray_mask_return.exit.i.4 tail call void @___reset(i64 %qalloc.i.i.5) %22 = load i64, ptr %2, align 4 %23 = and i64 %22, 32 %.not4 = icmp eq i64 %23, 0 - br i1 %.not4, label %panic.i.i, label %cond_exit_20.i.5 + br i1 %.not4, label %panic.i.i, label %__barray_mask_return.exit.i.5 -cond_exit_20.i.5: ; preds = %__barray_check_bounds.exit.i.5 +__barray_mask_return.exit.i.5: ; preds = %__barray_check_bounds.exit.i.5 %24 = and i64 %22, -33 store i64 %24, ptr %2, align 4 %25 = getelementptr inbounds nuw i8, ptr %1, i64 40 @@ -139,14 +139,14 @@ cond_exit_20.i.5: ; preds = %__barray_check_boun %not_max.not.not.i.i.6 = icmp eq i64 %qalloc.i.i.6, -1 br i1 %not_max.not.not.i.i.6, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.6 -__barray_check_bounds.exit.i.6: ; preds = %cond_exit_20.i.5 +__barray_check_bounds.exit.i.6: ; preds = %__barray_mask_return.exit.i.5 tail call void @___reset(i64 %qalloc.i.i.6) %26 = load i64, ptr %2, align 4 %27 = and i64 %26, 64 %.not5 = icmp eq i64 %27, 0 - br i1 %.not5, label %panic.i.i, label %cond_exit_20.i.6 + br i1 %.not5, label %panic.i.i, label %__barray_mask_return.exit.i.6 -cond_exit_20.i.6: ; preds = %__barray_check_bounds.exit.i.6 +__barray_mask_return.exit.i.6: ; preds = %__barray_check_bounds.exit.i.6 %28 = and i64 %26, -65 store i64 %28, ptr %2, align 4 %29 = getelementptr inbounds nuw i8, ptr %1, i64 48 @@ -155,14 +155,14 @@ cond_exit_20.i.6: ; preds = %__barray_check_boun %not_max.not.not.i.i.7 = icmp eq i64 %qalloc.i.i.7, -1 br i1 %not_max.not.not.i.i.7, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.7 -__barray_check_bounds.exit.i.7: ; preds = %cond_exit_20.i.6 +__barray_check_bounds.exit.i.7: ; preds = %__barray_mask_return.exit.i.6 tail call void @___reset(i64 %qalloc.i.i.7) %30 = load i64, ptr %2, align 4 %31 = and i64 %30, 128 %.not6 = icmp eq i64 %31, 0 - br i1 %.not6, label %panic.i.i, label %cond_exit_20.i.7 + br i1 %.not6, label %panic.i.i, label %__barray_mask_return.exit.i.7 -cond_exit_20.i.7: ; preds = %__barray_check_bounds.exit.i.7 +__barray_mask_return.exit.i.7: ; preds = %__barray_check_bounds.exit.i.7 %32 = and i64 %30, -129 store i64 %32, ptr %2, align 4 %33 = getelementptr inbounds nuw i8, ptr %1, i64 56 @@ -171,14 +171,14 @@ cond_exit_20.i.7: ; preds = %__barray_check_boun %not_max.not.not.i.i.8 = icmp eq i64 %qalloc.i.i.8, -1 br i1 %not_max.not.not.i.i.8, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.8 -__barray_check_bounds.exit.i.8: ; preds = %cond_exit_20.i.7 +__barray_check_bounds.exit.i.8: ; preds = %__barray_mask_return.exit.i.7 tail call void @___reset(i64 %qalloc.i.i.8) %34 = load i64, ptr %2, align 4 %35 = and i64 %34, 256 %.not7 = icmp eq i64 %35, 0 - br i1 %.not7, label %panic.i.i, label %cond_exit_20.i.8 + br i1 %.not7, label %panic.i.i, label %__barray_mask_return.exit.i.8 -cond_exit_20.i.8: ; preds = %__barray_check_bounds.exit.i.8 +__barray_mask_return.exit.i.8: ; preds = %__barray_check_bounds.exit.i.8 %36 = and i64 %34, -257 store i64 %36, ptr %2, align 4 %37 = getelementptr inbounds nuw i8, ptr %1, i64 64 @@ -187,14 +187,14 @@ cond_exit_20.i.8: ; preds = %__barray_check_boun %not_max.not.not.i.i.9 = icmp eq i64 %qalloc.i.i.9, -1 br i1 %not_max.not.not.i.i.9, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.9 -__barray_check_bounds.exit.i.9: ; preds = %cond_exit_20.i.8 +__barray_check_bounds.exit.i.9: ; preds = %__barray_mask_return.exit.i.8 tail call void @___reset(i64 %qalloc.i.i.9) %38 = load i64, ptr %2, align 4 %39 = and i64 %38, 512 %.not8 = icmp eq i64 %39, 0 - br i1 %.not8, label %panic.i.i, label %cond_exit_20.i.9 + br i1 %.not8, label %panic.i.i, label %__barray_mask_return.exit.i.9 -cond_exit_20.i.9: ; preds = %__barray_check_bounds.exit.i.9 +__barray_mask_return.exit.i.9: ; preds = %__barray_check_bounds.exit.i.9 %40 = and i64 %38, -513 store i64 %40, ptr %2, align 4 %41 = getelementptr inbounds nuw i8, ptr %1, i64 72 @@ -206,11 +206,11 @@ cond_exit_20.i.9: ; preds = %__barray_check_boun %43 = trunc i64 %42 to i1 br i1 %43, label %panic.i238.i, label %__barray_mask_borrow.exit.i -panic.i238.i: ; preds = %cond_exit_20.i.9 +panic.i238.i: ; preds = %__barray_mask_return.exit.i.9 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_mask_borrow.exit.i: ; preds = %cond_exit_20.i.9 +__barray_mask_borrow.exit.i: ; preds = %__barray_mask_return.exit.i.9 %44 = or disjoint i64 %42, 1 store i64 %44, ptr %2, align 4 %45 = load i64, ptr %1, align 4 @@ -243,8 +243,8 @@ __barray_mask_borrow.exit242.i: ; preds = %__barray_mask_retur tail call void @___rxy(i64 %52, double 0x400921FB54442D18, double 0.000000e+00) %53 = load i64, ptr %2, align 4 %54 = and i64 %53, 4 - %.not268.i = icmp eq i64 %54, 0 - br i1 %.not268.i, label %panic.i243.i, label %__barray_mask_return.exit244.i + %.not265.i = icmp eq i64 %54, 0 + br i1 %.not265.i, label %panic.i243.i, label %__barray_mask_return.exit244.i panic.i243.i: ; preds = %__barray_mask_borrow.exit242.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") @@ -256,8 +256,8 @@ __barray_mask_return.exit244.i: ; preds = %__barray_mask_borro store i64 %52, ptr %13, align 4 %56 = load i64, ptr %2, align 4 %57 = and i64 %56, 8 - %.not269.i = icmp eq i64 %57, 0 - br i1 %.not269.i, label %__barray_mask_borrow.exit246.i, label %panic.i245.i + %.not266.i = icmp eq i64 %57, 0 + br i1 %.not266.i, label %__barray_mask_borrow.exit246.i, label %panic.i245.i panic.i245.i: ; preds = %__barray_mask_return.exit244.i tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") @@ -270,8 +270,8 @@ __barray_mask_borrow.exit246.i: ; preds = %__barray_mask_retur tail call void @___rxy(i64 %59, double 0x400921FB54442D18, double 0.000000e+00) %60 = load i64, ptr %2, align 4 %61 = and i64 %60, 8 - %.not270.i = icmp eq i64 %61, 0 - br i1 %.not270.i, label %panic.i247.i, label %__barray_mask_return.exit248.i + %.not267.i = icmp eq i64 %61, 0 + br i1 %.not267.i, label %panic.i247.i, label %__barray_mask_return.exit248.i panic.i247.i: ; preds = %__barray_mask_borrow.exit246.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") @@ -283,8 +283,8 @@ __barray_mask_return.exit248.i: ; preds = %__barray_mask_borro store i64 %59, ptr %17, align 4 %63 = load i64, ptr %2, align 4 %64 = and i64 %63, 512 - %.not271.i = icmp eq i64 %64, 0 - br i1 %.not271.i, label %__barray_mask_borrow.exit250.i, label %panic.i249.i + %.not268.i = icmp eq i64 %64, 0 + br i1 %.not268.i, label %__barray_mask_borrow.exit250.i, label %panic.i249.i panic.i249.i: ; preds = %__barray_mask_return.exit248.i tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") @@ -297,8 +297,8 @@ __barray_mask_borrow.exit250.i: ; preds = %__barray_mask_retur tail call void @___rxy(i64 %66, double 0x400921FB54442D18, double 0.000000e+00) %67 = load i64, ptr %2, align 4 %68 = and i64 %67, 512 - %.not272.i = icmp eq i64 %68, 0 - br i1 %.not272.i, label %panic.i251.i, label %__barray_mask_return.exit252.i + %.not269.i = icmp eq i64 %68, 0 + br i1 %.not269.i, label %panic.i251.i, label %__barray_mask_return.exit252.i panic.i251.i: ; preds = %__barray_mask_borrow.exit250.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") @@ -314,7 +314,7 @@ __barray_mask_return.exit252.i: ; preds = %__barray_mask_borro store i64 -1, ptr %72, align 1 br label %__barray_check_bounds.exit.i.i.i -73: ; preds = %loop_body.i.i +73: ; preds = %__barray_mask_return.exit.i.i %74 = lshr i64 %.fca.2.extract82.i.i.i, 6 %75 = getelementptr i64, ptr %.fca.1.extract81.i.i.i, i64 %74 %76 = load i64, ptr %75, align 4 @@ -355,16 +355,17 @@ mask_block_err.i.i.i.i: ; preds = %mask_block_ok.i.i.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit.i.i.i: ; preds = %loop_body.i.i, %__barray_mask_return.exit252.i - %.fca.2.extract82.i187.i.i = phi i64 [ 0, %__barray_mask_return.exit252.i ], [ %.fca.2.extract82.i.i.i, %loop_body.i.i ] - %.fca.1.extract81.i186.i.i = phi ptr [ %2, %__barray_mask_return.exit252.i ], [ %.fca.1.extract81.i.i.i, %loop_body.i.i ] - %.fca.0.extract80.i185.i.i = phi ptr [ %1, %__barray_mask_return.exit252.i ], [ %.fca.0.extract80.i.i.i, %loop_body.i.i ] - %"306_0.sroa.15.0184.i.i" = phi i64 [ 0, %__barray_mask_return.exit252.i ], [ %95, %loop_body.i.i ] - %.pn165183.i.i = phi { { ptr, ptr, i64 }, i64 } [ %70, %__barray_mask_return.exit252.i ], [ %110, %loop_body.i.i ] - %95 = add nuw nsw i64 %"306_0.sroa.15.0184.i.i", 1 - %96 = add i64 %"306_0.sroa.15.0184.i.i", %.fca.2.extract82.i187.i.i +__barray_check_bounds.exit.i.i.i: ; preds = %__barray_mask_return.exit.i.i, %__barray_mask_return.exit252.i + %.fca.2.extract82.i175.i.i = phi i64 [ 0, %__barray_mask_return.exit252.i ], [ %.fca.2.extract82.i.i.i, %__barray_mask_return.exit.i.i ] + %.fca.1.extract81.i174.i.i = phi ptr [ %2, %__barray_mask_return.exit252.i ], [ %.fca.1.extract81.i.i.i, %__barray_mask_return.exit.i.i ] + %.fca.0.extract80.i173.i.i = phi ptr [ %1, %__barray_mask_return.exit252.i ], [ %.fca.0.extract80.i.i.i, %__barray_mask_return.exit.i.i ] + %"306_0.sroa.15.0172.i.i" = phi i64 [ 0, %__barray_mask_return.exit252.i ], [ %95, %__barray_mask_return.exit.i.i ] + %.pn.i.i = phi { { ptr, ptr, i64 }, i64 } [ %70, %__barray_mask_return.exit252.i ], [ %.pn171.i.i, %__barray_mask_return.exit.i.i ] + %.pn171.i.i = insertvalue { { ptr, ptr, i64 }, i64 } %.pn.i.i, i64 %"306_0.sroa.15.0172.i.i", 1 + %95 = add nuw nsw i64 %"306_0.sroa.15.0172.i.i", 1 + %96 = add i64 %"306_0.sroa.15.0172.i.i", %.fca.2.extract82.i175.i.i %97 = lshr i64 %96, 6 - %98 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i186.i.i, i64 %97 + %98 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i174.i.i, i64 %97 %99 = load i64, ptr %98, align 4 %100 = and i64 %96, 63 %101 = lshr i64 %99, %100 @@ -379,242 +380,241 @@ __barray_check_bounds.exit.i.i: ; preds = %__barray_check_boun %103 = shl nuw i64 1, %100 %104 = xor i64 %103, %99 store i64 %104, ptr %98, align 4 - %105 = getelementptr inbounds i64, ptr %.fca.0.extract80.i185.i.i, i64 %96 + %105 = getelementptr inbounds i64, ptr %.fca.0.extract80.i173.i.i, i64 %96 %106 = load i64, ptr %105, align 4 %lazy_measure.i.i = tail call i64 @___lazy_measure(i64 %106) tail call void @___qfree(i64 %106) %107 = load i64, ptr %72, align 4 - %108 = lshr i64 %107, %"306_0.sroa.15.0184.i.i" + %108 = lshr i64 %107, %"306_0.sroa.15.0172.i.i" %109 = trunc i64 %108 to i1 - br i1 %109, label %loop_body.i.i, label %panic.i.i.i + br i1 %109, label %__barray_mask_return.exit.i.i, label %panic.i.i.i panic.i.i.i: ; preds = %__barray_check_bounds.exit.i.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -loop_body.i.i: ; preds = %__barray_check_bounds.exit.i.i +__barray_mask_return.exit.i.i: ; preds = %__barray_check_bounds.exit.i.i %"371_054.fca.1.insert.i.i" = insertvalue { i1, i64, i1 } { i1 true, i64 poison, i1 undef }, i64 %lazy_measure.i.i, 1 %"371_054.fca.2.insert.i.i" = insertvalue { i1, i64, i1 } %"371_054.fca.1.insert.i.i", i1 undef, 2 - %110 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn165183.i.i, i64 %95, 1 - %111 = shl nuw nsw i64 1, %"306_0.sroa.15.0184.i.i" - %112 = xor i64 %107, %111 - store i64 %112, ptr %72, align 4 - %113 = getelementptr inbounds nuw { i1, i64, i1 }, ptr %71, i64 %"306_0.sroa.15.0184.i.i" - store { i1, i64, i1 } %"371_054.fca.2.insert.i.i", ptr %113, align 4 - %114 = extractvalue { { ptr, ptr, i64 }, i64 } %.pn165183.i.i, 0 - %.fca.0.extract80.i.i.i = extractvalue { ptr, ptr, i64 } %114, 0 - %.fca.1.extract81.i.i.i = extractvalue { ptr, ptr, i64 } %114, 1 - %.fca.2.extract82.i.i.i = extractvalue { ptr, ptr, i64 } %114, 2 - %exitcond.not.i.i = icmp eq i64 %95, 10 - br i1 %exitcond.not.i.i, label %73, label %__barray_check_bounds.exit.i.i.i + %110 = shl nuw nsw i64 1, %"306_0.sroa.15.0172.i.i" + %111 = xor i64 %107, %110 + store i64 %111, ptr %72, align 4 + %112 = getelementptr inbounds nuw { i1, i64, i1 }, ptr %71, i64 %"306_0.sroa.15.0172.i.i" + store { i1, i64, i1 } %"371_054.fca.2.insert.i.i", ptr %112, align 4 + %113 = extractvalue { { ptr, ptr, i64 }, i64 } %.pn.i.i, 0 + %.fca.0.extract80.i.i.i = extractvalue { ptr, ptr, i64 } %113, 0 + %.fca.1.extract81.i.i.i = extractvalue { ptr, ptr, i64 } %113, 1 + %.fca.2.extract82.i.i.i = extractvalue { ptr, ptr, i64 } %113, 2 + %.not.i.i = icmp eq i64 %"306_0.sroa.15.0172.i.i", 9 + br i1 %.not.i.i, label %73, label %__barray_check_bounds.exit.i.i.i "__hugr__.$measure_array$$n(10).280.exit.i": ; preds = %91, %73 tail call void @heap_free(ptr %.fca.0.extract80.i.i.i) tail call void @heap_free(ptr nonnull %.fca.1.extract81.i.i.i) - %115 = load i64, ptr %72, align 4 - %116 = trunc i64 %115 to i1 - br i1 %116, label %cond_exit_89.thread.i, label %__barray_mask_borrow.exit259.i + %114 = load i64, ptr %72, align 4 + %115 = trunc i64 %114 to i1 + br i1 %115, label %cond_exit_89.thread.i, label %__barray_mask_borrow.exit258.i mask_block_err.i.i: ; preds = %cond_exit_89.thread.9.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_mask_borrow.exit259.i: ; preds = %"__hugr__.$measure_array$$n(10).280.exit.i" - %117 = or disjoint i64 %115, 1 - store i64 %117, ptr %72, align 4 - %118 = load { i1, i64, i1 }, ptr %71, align 4 - %.fca.0.extract167.i = extractvalue { i1, i64, i1 } %118, 0 +__barray_mask_borrow.exit258.i: ; preds = %"__hugr__.$measure_array$$n(10).280.exit.i" + %116 = or disjoint i64 %114, 1 + store i64 %116, ptr %72, align 4 + %117 = load { i1, i64, i1 }, ptr %71, align 4 + %.fca.0.extract167.i = extractvalue { i1, i64, i1 } %117, 0 br i1 %.fca.0.extract167.i, label %cond_392_case_1.i, label %cond_exit_89.thread.i -cond_exit_89.thread.i: ; preds = %cond_392_case_1.i, %__barray_mask_borrow.exit259.i, %"__hugr__.$measure_array$$n(10).280.exit.i" - %119 = phi i64 [ %.pre.i, %cond_392_case_1.i ], [ %117, %__barray_mask_borrow.exit259.i ], [ %115, %"__hugr__.$measure_array$$n(10).280.exit.i" ] - %120 = and i64 %119, 2 - %.not290.i = icmp eq i64 %120, 0 - br i1 %.not290.i, label %__barray_mask_borrow.exit259.1.i, label %cond_exit_89.thread.1.i - -__barray_mask_borrow.exit259.1.i: ; preds = %cond_exit_89.thread.i - %121 = or disjoint i64 %119, 2 - store i64 %121, ptr %72, align 4 - %122 = getelementptr inbounds nuw i8, ptr %71, i64 24 - %123 = load { i1, i64, i1 }, ptr %122, align 4 - %.fca.0.extract167.1.i = extractvalue { i1, i64, i1 } %123, 0 +cond_exit_89.thread.i: ; preds = %cond_392_case_1.i, %__barray_mask_borrow.exit258.i, %"__hugr__.$measure_array$$n(10).280.exit.i" + %118 = phi i64 [ %.pre.i, %cond_392_case_1.i ], [ %116, %__barray_mask_borrow.exit258.i ], [ %114, %"__hugr__.$measure_array$$n(10).280.exit.i" ] + %119 = and i64 %118, 2 + %.not287.i = icmp eq i64 %119, 0 + br i1 %.not287.i, label %__barray_mask_borrow.exit258.1.i, label %cond_exit_89.thread.1.i + +__barray_mask_borrow.exit258.1.i: ; preds = %cond_exit_89.thread.i + %120 = or disjoint i64 %118, 2 + store i64 %120, ptr %72, align 4 + %121 = getelementptr inbounds nuw i8, ptr %71, i64 24 + %122 = load { i1, i64, i1 }, ptr %121, align 4 + %.fca.0.extract167.1.i = extractvalue { i1, i64, i1 } %122, 0 br i1 %.fca.0.extract167.1.i, label %cond_392_case_1.1.i, label %cond_exit_89.thread.1.i -cond_392_case_1.1.i: ; preds = %__barray_mask_borrow.exit259.1.i - %.fca.1.extract.1.i = extractvalue { i1, i64, i1 } %123, 1 +cond_392_case_1.1.i: ; preds = %__barray_mask_borrow.exit258.1.i + %.fca.1.extract.1.i = extractvalue { i1, i64, i1 } %122, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.1.i) - %.pre281.i = load i64, ptr %72, align 4 + %.pre278.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.1.i -cond_exit_89.thread.1.i: ; preds = %cond_392_case_1.1.i, %__barray_mask_borrow.exit259.1.i, %cond_exit_89.thread.i - %124 = phi i64 [ %.pre281.i, %cond_392_case_1.1.i ], [ %121, %__barray_mask_borrow.exit259.1.i ], [ %119, %cond_exit_89.thread.i ] - %125 = and i64 %124, 4 - %.not291.i = icmp eq i64 %125, 0 - br i1 %.not291.i, label %__barray_mask_borrow.exit259.2.i, label %cond_exit_89.thread.2.i - -__barray_mask_borrow.exit259.2.i: ; preds = %cond_exit_89.thread.1.i - %126 = or disjoint i64 %124, 4 - store i64 %126, ptr %72, align 4 - %127 = getelementptr inbounds nuw i8, ptr %71, i64 48 - %128 = load { i1, i64, i1 }, ptr %127, align 4 - %.fca.0.extract167.2.i = extractvalue { i1, i64, i1 } %128, 0 +cond_exit_89.thread.1.i: ; preds = %cond_392_case_1.1.i, %__barray_mask_borrow.exit258.1.i, %cond_exit_89.thread.i + %123 = phi i64 [ %.pre278.i, %cond_392_case_1.1.i ], [ %120, %__barray_mask_borrow.exit258.1.i ], [ %118, %cond_exit_89.thread.i ] + %124 = and i64 %123, 4 + %.not288.i = icmp eq i64 %124, 0 + br i1 %.not288.i, label %__barray_mask_borrow.exit258.2.i, label %cond_exit_89.thread.2.i + +__barray_mask_borrow.exit258.2.i: ; preds = %cond_exit_89.thread.1.i + %125 = or disjoint i64 %123, 4 + store i64 %125, ptr %72, align 4 + %126 = getelementptr inbounds nuw i8, ptr %71, i64 48 + %127 = load { i1, i64, i1 }, ptr %126, align 4 + %.fca.0.extract167.2.i = extractvalue { i1, i64, i1 } %127, 0 br i1 %.fca.0.extract167.2.i, label %cond_392_case_1.2.i, label %cond_exit_89.thread.2.i -cond_392_case_1.2.i: ; preds = %__barray_mask_borrow.exit259.2.i - %.fca.1.extract.2.i = extractvalue { i1, i64, i1 } %128, 1 +cond_392_case_1.2.i: ; preds = %__barray_mask_borrow.exit258.2.i + %.fca.1.extract.2.i = extractvalue { i1, i64, i1 } %127, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.2.i) - %.pre282.i = load i64, ptr %72, align 4 + %.pre279.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.2.i -cond_exit_89.thread.2.i: ; preds = %cond_392_case_1.2.i, %__barray_mask_borrow.exit259.2.i, %cond_exit_89.thread.1.i - %129 = phi i64 [ %.pre282.i, %cond_392_case_1.2.i ], [ %126, %__barray_mask_borrow.exit259.2.i ], [ %124, %cond_exit_89.thread.1.i ] - %130 = and i64 %129, 8 - %.not292.i = icmp eq i64 %130, 0 - br i1 %.not292.i, label %__barray_mask_borrow.exit259.3.i, label %cond_exit_89.thread.3.i - -__barray_mask_borrow.exit259.3.i: ; preds = %cond_exit_89.thread.2.i - %131 = or disjoint i64 %129, 8 - store i64 %131, ptr %72, align 4 - %132 = getelementptr inbounds nuw i8, ptr %71, i64 72 - %133 = load { i1, i64, i1 }, ptr %132, align 4 - %.fca.0.extract167.3.i = extractvalue { i1, i64, i1 } %133, 0 +cond_exit_89.thread.2.i: ; preds = %cond_392_case_1.2.i, %__barray_mask_borrow.exit258.2.i, %cond_exit_89.thread.1.i + %128 = phi i64 [ %.pre279.i, %cond_392_case_1.2.i ], [ %125, %__barray_mask_borrow.exit258.2.i ], [ %123, %cond_exit_89.thread.1.i ] + %129 = and i64 %128, 8 + %.not289.i = icmp eq i64 %129, 0 + br i1 %.not289.i, label %__barray_mask_borrow.exit258.3.i, label %cond_exit_89.thread.3.i + +__barray_mask_borrow.exit258.3.i: ; preds = %cond_exit_89.thread.2.i + %130 = or disjoint i64 %128, 8 + store i64 %130, ptr %72, align 4 + %131 = getelementptr inbounds nuw i8, ptr %71, i64 72 + %132 = load { i1, i64, i1 }, ptr %131, align 4 + %.fca.0.extract167.3.i = extractvalue { i1, i64, i1 } %132, 0 br i1 %.fca.0.extract167.3.i, label %cond_392_case_1.3.i, label %cond_exit_89.thread.3.i -cond_392_case_1.3.i: ; preds = %__barray_mask_borrow.exit259.3.i - %.fca.1.extract.3.i = extractvalue { i1, i64, i1 } %133, 1 +cond_392_case_1.3.i: ; preds = %__barray_mask_borrow.exit258.3.i + %.fca.1.extract.3.i = extractvalue { i1, i64, i1 } %132, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.3.i) - %.pre283.i = load i64, ptr %72, align 4 + %.pre280.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.3.i -cond_exit_89.thread.3.i: ; preds = %cond_392_case_1.3.i, %__barray_mask_borrow.exit259.3.i, %cond_exit_89.thread.2.i - %134 = phi i64 [ %.pre283.i, %cond_392_case_1.3.i ], [ %131, %__barray_mask_borrow.exit259.3.i ], [ %129, %cond_exit_89.thread.2.i ] - %135 = and i64 %134, 16 - %.not293.i = icmp eq i64 %135, 0 - br i1 %.not293.i, label %__barray_mask_borrow.exit259.4.i, label %cond_exit_89.thread.4.i - -__barray_mask_borrow.exit259.4.i: ; preds = %cond_exit_89.thread.3.i - %136 = or disjoint i64 %134, 16 - store i64 %136, ptr %72, align 4 - %137 = getelementptr inbounds nuw i8, ptr %71, i64 96 - %138 = load { i1, i64, i1 }, ptr %137, align 4 - %.fca.0.extract167.4.i = extractvalue { i1, i64, i1 } %138, 0 +cond_exit_89.thread.3.i: ; preds = %cond_392_case_1.3.i, %__barray_mask_borrow.exit258.3.i, %cond_exit_89.thread.2.i + %133 = phi i64 [ %.pre280.i, %cond_392_case_1.3.i ], [ %130, %__barray_mask_borrow.exit258.3.i ], [ %128, %cond_exit_89.thread.2.i ] + %134 = and i64 %133, 16 + %.not290.i = icmp eq i64 %134, 0 + br i1 %.not290.i, label %__barray_mask_borrow.exit258.4.i, label %cond_exit_89.thread.4.i + +__barray_mask_borrow.exit258.4.i: ; preds = %cond_exit_89.thread.3.i + %135 = or disjoint i64 %133, 16 + store i64 %135, ptr %72, align 4 + %136 = getelementptr inbounds nuw i8, ptr %71, i64 96 + %137 = load { i1, i64, i1 }, ptr %136, align 4 + %.fca.0.extract167.4.i = extractvalue { i1, i64, i1 } %137, 0 br i1 %.fca.0.extract167.4.i, label %cond_392_case_1.4.i, label %cond_exit_89.thread.4.i -cond_392_case_1.4.i: ; preds = %__barray_mask_borrow.exit259.4.i - %.fca.1.extract.4.i = extractvalue { i1, i64, i1 } %138, 1 +cond_392_case_1.4.i: ; preds = %__barray_mask_borrow.exit258.4.i + %.fca.1.extract.4.i = extractvalue { i1, i64, i1 } %137, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.4.i) - %.pre284.i = load i64, ptr %72, align 4 + %.pre281.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.4.i -cond_exit_89.thread.4.i: ; preds = %cond_392_case_1.4.i, %__barray_mask_borrow.exit259.4.i, %cond_exit_89.thread.3.i - %139 = phi i64 [ %.pre284.i, %cond_392_case_1.4.i ], [ %136, %__barray_mask_borrow.exit259.4.i ], [ %134, %cond_exit_89.thread.3.i ] - %140 = and i64 %139, 32 - %.not294.i = icmp eq i64 %140, 0 - br i1 %.not294.i, label %__barray_mask_borrow.exit259.5.i, label %cond_exit_89.thread.5.i - -__barray_mask_borrow.exit259.5.i: ; preds = %cond_exit_89.thread.4.i - %141 = or disjoint i64 %139, 32 - store i64 %141, ptr %72, align 4 - %142 = getelementptr inbounds nuw i8, ptr %71, i64 120 - %143 = load { i1, i64, i1 }, ptr %142, align 4 - %.fca.0.extract167.5.i = extractvalue { i1, i64, i1 } %143, 0 +cond_exit_89.thread.4.i: ; preds = %cond_392_case_1.4.i, %__barray_mask_borrow.exit258.4.i, %cond_exit_89.thread.3.i + %138 = phi i64 [ %.pre281.i, %cond_392_case_1.4.i ], [ %135, %__barray_mask_borrow.exit258.4.i ], [ %133, %cond_exit_89.thread.3.i ] + %139 = and i64 %138, 32 + %.not291.i = icmp eq i64 %139, 0 + br i1 %.not291.i, label %__barray_mask_borrow.exit258.5.i, label %cond_exit_89.thread.5.i + +__barray_mask_borrow.exit258.5.i: ; preds = %cond_exit_89.thread.4.i + %140 = or disjoint i64 %138, 32 + store i64 %140, ptr %72, align 4 + %141 = getelementptr inbounds nuw i8, ptr %71, i64 120 + %142 = load { i1, i64, i1 }, ptr %141, align 4 + %.fca.0.extract167.5.i = extractvalue { i1, i64, i1 } %142, 0 br i1 %.fca.0.extract167.5.i, label %cond_392_case_1.5.i, label %cond_exit_89.thread.5.i -cond_392_case_1.5.i: ; preds = %__barray_mask_borrow.exit259.5.i - %.fca.1.extract.5.i = extractvalue { i1, i64, i1 } %143, 1 +cond_392_case_1.5.i: ; preds = %__barray_mask_borrow.exit258.5.i + %.fca.1.extract.5.i = extractvalue { i1, i64, i1 } %142, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.5.i) - %.pre285.i = load i64, ptr %72, align 4 + %.pre282.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.5.i -cond_exit_89.thread.5.i: ; preds = %cond_392_case_1.5.i, %__barray_mask_borrow.exit259.5.i, %cond_exit_89.thread.4.i - %144 = phi i64 [ %.pre285.i, %cond_392_case_1.5.i ], [ %141, %__barray_mask_borrow.exit259.5.i ], [ %139, %cond_exit_89.thread.4.i ] - %145 = and i64 %144, 64 - %.not295.i = icmp eq i64 %145, 0 - br i1 %.not295.i, label %__barray_mask_borrow.exit259.6.i, label %cond_exit_89.thread.6.i - -__barray_mask_borrow.exit259.6.i: ; preds = %cond_exit_89.thread.5.i - %146 = or disjoint i64 %144, 64 - store i64 %146, ptr %72, align 4 - %147 = getelementptr inbounds nuw i8, ptr %71, i64 144 - %148 = load { i1, i64, i1 }, ptr %147, align 4 - %.fca.0.extract167.6.i = extractvalue { i1, i64, i1 } %148, 0 +cond_exit_89.thread.5.i: ; preds = %cond_392_case_1.5.i, %__barray_mask_borrow.exit258.5.i, %cond_exit_89.thread.4.i + %143 = phi i64 [ %.pre282.i, %cond_392_case_1.5.i ], [ %140, %__barray_mask_borrow.exit258.5.i ], [ %138, %cond_exit_89.thread.4.i ] + %144 = and i64 %143, 64 + %.not292.i = icmp eq i64 %144, 0 + br i1 %.not292.i, label %__barray_mask_borrow.exit258.6.i, label %cond_exit_89.thread.6.i + +__barray_mask_borrow.exit258.6.i: ; preds = %cond_exit_89.thread.5.i + %145 = or disjoint i64 %143, 64 + store i64 %145, ptr %72, align 4 + %146 = getelementptr inbounds nuw i8, ptr %71, i64 144 + %147 = load { i1, i64, i1 }, ptr %146, align 4 + %.fca.0.extract167.6.i = extractvalue { i1, i64, i1 } %147, 0 br i1 %.fca.0.extract167.6.i, label %cond_392_case_1.6.i, label %cond_exit_89.thread.6.i -cond_392_case_1.6.i: ; preds = %__barray_mask_borrow.exit259.6.i - %.fca.1.extract.6.i = extractvalue { i1, i64, i1 } %148, 1 +cond_392_case_1.6.i: ; preds = %__barray_mask_borrow.exit258.6.i + %.fca.1.extract.6.i = extractvalue { i1, i64, i1 } %147, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.6.i) - %.pre286.i = load i64, ptr %72, align 4 + %.pre283.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.6.i -cond_exit_89.thread.6.i: ; preds = %cond_392_case_1.6.i, %__barray_mask_borrow.exit259.6.i, %cond_exit_89.thread.5.i - %149 = phi i64 [ %.pre286.i, %cond_392_case_1.6.i ], [ %146, %__barray_mask_borrow.exit259.6.i ], [ %144, %cond_exit_89.thread.5.i ] - %150 = and i64 %149, 128 - %.not296.i = icmp eq i64 %150, 0 - br i1 %.not296.i, label %__barray_mask_borrow.exit259.7.i, label %cond_exit_89.thread.7.i - -__barray_mask_borrow.exit259.7.i: ; preds = %cond_exit_89.thread.6.i - %151 = or disjoint i64 %149, 128 - store i64 %151, ptr %72, align 4 - %152 = getelementptr inbounds nuw i8, ptr %71, i64 168 - %153 = load { i1, i64, i1 }, ptr %152, align 4 - %.fca.0.extract167.7.i = extractvalue { i1, i64, i1 } %153, 0 +cond_exit_89.thread.6.i: ; preds = %cond_392_case_1.6.i, %__barray_mask_borrow.exit258.6.i, %cond_exit_89.thread.5.i + %148 = phi i64 [ %.pre283.i, %cond_392_case_1.6.i ], [ %145, %__barray_mask_borrow.exit258.6.i ], [ %143, %cond_exit_89.thread.5.i ] + %149 = and i64 %148, 128 + %.not293.i = icmp eq i64 %149, 0 + br i1 %.not293.i, label %__barray_mask_borrow.exit258.7.i, label %cond_exit_89.thread.7.i + +__barray_mask_borrow.exit258.7.i: ; preds = %cond_exit_89.thread.6.i + %150 = or disjoint i64 %148, 128 + store i64 %150, ptr %72, align 4 + %151 = getelementptr inbounds nuw i8, ptr %71, i64 168 + %152 = load { i1, i64, i1 }, ptr %151, align 4 + %.fca.0.extract167.7.i = extractvalue { i1, i64, i1 } %152, 0 br i1 %.fca.0.extract167.7.i, label %cond_392_case_1.7.i, label %cond_exit_89.thread.7.i -cond_392_case_1.7.i: ; preds = %__barray_mask_borrow.exit259.7.i - %.fca.1.extract.7.i = extractvalue { i1, i64, i1 } %153, 1 +cond_392_case_1.7.i: ; preds = %__barray_mask_borrow.exit258.7.i + %.fca.1.extract.7.i = extractvalue { i1, i64, i1 } %152, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.7.i) - %.pre287.i = load i64, ptr %72, align 4 + %.pre284.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.7.i -cond_exit_89.thread.7.i: ; preds = %cond_392_case_1.7.i, %__barray_mask_borrow.exit259.7.i, %cond_exit_89.thread.6.i - %154 = phi i64 [ %.pre287.i, %cond_392_case_1.7.i ], [ %151, %__barray_mask_borrow.exit259.7.i ], [ %149, %cond_exit_89.thread.6.i ] - %155 = and i64 %154, 256 - %.not297.i = icmp eq i64 %155, 0 - br i1 %.not297.i, label %__barray_mask_borrow.exit259.8.i, label %cond_exit_89.thread.8.i - -__barray_mask_borrow.exit259.8.i: ; preds = %cond_exit_89.thread.7.i - %156 = or disjoint i64 %154, 256 - store i64 %156, ptr %72, align 4 - %157 = getelementptr inbounds nuw i8, ptr %71, i64 192 - %158 = load { i1, i64, i1 }, ptr %157, align 4 - %.fca.0.extract167.8.i = extractvalue { i1, i64, i1 } %158, 0 +cond_exit_89.thread.7.i: ; preds = %cond_392_case_1.7.i, %__barray_mask_borrow.exit258.7.i, %cond_exit_89.thread.6.i + %153 = phi i64 [ %.pre284.i, %cond_392_case_1.7.i ], [ %150, %__barray_mask_borrow.exit258.7.i ], [ %148, %cond_exit_89.thread.6.i ] + %154 = and i64 %153, 256 + %.not294.i = icmp eq i64 %154, 0 + br i1 %.not294.i, label %__barray_mask_borrow.exit258.8.i, label %cond_exit_89.thread.8.i + +__barray_mask_borrow.exit258.8.i: ; preds = %cond_exit_89.thread.7.i + %155 = or disjoint i64 %153, 256 + store i64 %155, ptr %72, align 4 + %156 = getelementptr inbounds nuw i8, ptr %71, i64 192 + %157 = load { i1, i64, i1 }, ptr %156, align 4 + %.fca.0.extract167.8.i = extractvalue { i1, i64, i1 } %157, 0 br i1 %.fca.0.extract167.8.i, label %cond_392_case_1.8.i, label %cond_exit_89.thread.8.i -cond_392_case_1.8.i: ; preds = %__barray_mask_borrow.exit259.8.i - %.fca.1.extract.8.i = extractvalue { i1, i64, i1 } %158, 1 +cond_392_case_1.8.i: ; preds = %__barray_mask_borrow.exit258.8.i + %.fca.1.extract.8.i = extractvalue { i1, i64, i1 } %157, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.8.i) - %.pre288.i = load i64, ptr %72, align 4 + %.pre285.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.8.i -cond_exit_89.thread.8.i: ; preds = %cond_392_case_1.8.i, %__barray_mask_borrow.exit259.8.i, %cond_exit_89.thread.7.i - %159 = phi i64 [ %.pre288.i, %cond_392_case_1.8.i ], [ %156, %__barray_mask_borrow.exit259.8.i ], [ %154, %cond_exit_89.thread.7.i ] - %160 = and i64 %159, 512 - %.not298.i = icmp eq i64 %160, 0 - br i1 %.not298.i, label %__barray_mask_borrow.exit259.9.i, label %cond_exit_89.thread.9.i - -__barray_mask_borrow.exit259.9.i: ; preds = %cond_exit_89.thread.8.i - %161 = or disjoint i64 %159, 512 - store i64 %161, ptr %72, align 4 - %162 = getelementptr inbounds nuw i8, ptr %71, i64 216 - %163 = load { i1, i64, i1 }, ptr %162, align 4 - %.fca.0.extract167.9.i = extractvalue { i1, i64, i1 } %163, 0 +cond_exit_89.thread.8.i: ; preds = %cond_392_case_1.8.i, %__barray_mask_borrow.exit258.8.i, %cond_exit_89.thread.7.i + %158 = phi i64 [ %.pre285.i, %cond_392_case_1.8.i ], [ %155, %__barray_mask_borrow.exit258.8.i ], [ %153, %cond_exit_89.thread.7.i ] + %159 = and i64 %158, 512 + %.not295.i = icmp eq i64 %159, 0 + br i1 %.not295.i, label %__barray_mask_borrow.exit258.9.i, label %cond_exit_89.thread.9.i + +__barray_mask_borrow.exit258.9.i: ; preds = %cond_exit_89.thread.8.i + %160 = or disjoint i64 %158, 512 + store i64 %160, ptr %72, align 4 + %161 = getelementptr inbounds nuw i8, ptr %71, i64 216 + %162 = load { i1, i64, i1 }, ptr %161, align 4 + %.fca.0.extract167.9.i = extractvalue { i1, i64, i1 } %162, 0 br i1 %.fca.0.extract167.9.i, label %cond_392_case_1.9.i, label %cond_exit_89.thread.9.i -cond_392_case_1.9.i: ; preds = %__barray_mask_borrow.exit259.9.i - %.fca.1.extract.9.i = extractvalue { i1, i64, i1 } %163, 1 +cond_392_case_1.9.i: ; preds = %__barray_mask_borrow.exit258.9.i + %.fca.1.extract.9.i = extractvalue { i1, i64, i1 } %162, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.9.i) - %.pre289.i = load i64, ptr %72, align 4 + %.pre286.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.9.i -cond_exit_89.thread.9.i: ; preds = %cond_392_case_1.9.i, %__barray_mask_borrow.exit259.9.i, %cond_exit_89.thread.8.i - %164 = phi i64 [ %.pre289.i, %cond_392_case_1.9.i ], [ %161, %__barray_mask_borrow.exit259.9.i ], [ %159, %cond_exit_89.thread.8.i ] - %165 = or i64 %164, -1024 - store i64 %165, ptr %72, align 4 - %166 = icmp eq i64 %165, -1 - br i1 %166, label %__hugr__.main.1.exit, label %mask_block_err.i.i +cond_exit_89.thread.9.i: ; preds = %cond_392_case_1.9.i, %__barray_mask_borrow.exit258.9.i, %cond_exit_89.thread.8.i + %163 = phi i64 [ %.pre286.i, %cond_392_case_1.9.i ], [ %160, %__barray_mask_borrow.exit258.9.i ], [ %158, %cond_exit_89.thread.8.i ] + %164 = or i64 %163, -1024 + store i64 %164, ptr %72, align 4 + %165 = icmp eq i64 %164, -1 + br i1 %165, label %__hugr__.main.1.exit, label %mask_block_err.i.i -cond_392_case_1.i: ; preds = %__barray_mask_borrow.exit259.i - %.fca.1.extract.i = extractvalue { i1, i64, i1 } %118, 1 +cond_392_case_1.i: ; preds = %__barray_mask_borrow.exit258.i + %.fca.1.extract.i = extractvalue { i1, i64, i1 } %117, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.i) %.pre.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.i @@ -622,8 +622,8 @@ cond_392_case_1.i: ; preds = %__barray_mask_borro __hugr__.main.1.exit: ; preds = %cond_exit_89.thread.9.i tail call void @heap_free(ptr %71) tail call void @heap_free(ptr nonnull %72) - %167 = tail call i64 @teardown() - ret i64 %167 + %166 = tail call i64 @teardown() + ret i64 %166 } declare void @setup(i64) local_unnamed_addr diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-discard_qb_array/discard_qb_array_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-discard_qb_array/discard_qb_array_x86_64-unknown-linux-gnu index 9d0d0dbab..471fa3a1f 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-discard_qb_array/discard_qb_array_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-discard_qb_array/discard_qb_array_x86_64-unknown-linux-gnu @@ -31,7 +31,7 @@ entry: %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 br i1 %not_max.not.not.i.i, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i -cond_213_case_0.i.i: ; preds = %cond_exit_20.i.8, %cond_exit_20.i.7, %cond_exit_20.i.6, %cond_exit_20.i.5, %cond_exit_20.i.4, %cond_exit_20.i.3, %cond_exit_20.i.2, %cond_exit_20.i.1, %cond_exit_20.i, %entry +cond_213_case_0.i.i: ; preds = %__barray_mask_return.exit.i.8, %__barray_mask_return.exit.i.7, %__barray_mask_return.exit.i.6, %__barray_mask_return.exit.i.5, %__barray_mask_return.exit.i.4, %__barray_mask_return.exit.i.3, %__barray_mask_return.exit.i.2, %__barray_mask_return.exit.i.1, %__barray_mask_return.exit.i, %entry tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable @@ -39,13 +39,13 @@ __barray_check_bounds.exit.i: ; preds = %entry tail call void @___reset(i64 %qalloc.i.i) %3 = load i64, ptr %2, align 4 %4 = trunc i64 %3 to i1 - br i1 %4, label %cond_exit_20.i, label %panic.i.i + br i1 %4, label %__barray_mask_return.exit.i, label %panic.i.i panic.i.i: ; preds = %__barray_check_bounds.exit.i.9, %__barray_check_bounds.exit.i.8, %__barray_check_bounds.exit.i.7, %__barray_check_bounds.exit.i.6, %__barray_check_bounds.exit.i.5, %__barray_check_bounds.exit.i.4, %__barray_check_bounds.exit.i.3, %__barray_check_bounds.exit.i.2, %__barray_check_bounds.exit.i.1, %__barray_check_bounds.exit.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -cond_exit_20.i: ; preds = %__barray_check_bounds.exit.i +__barray_mask_return.exit.i: ; preds = %__barray_check_bounds.exit.i %5 = and i64 %3, -2 store i64 %5, ptr %2, align 4 store i64 %qalloc.i.i, ptr %1, align 4 @@ -53,14 +53,14 @@ cond_exit_20.i: ; preds = %__barray_check_boun %not_max.not.not.i.i.1 = icmp eq i64 %qalloc.i.i.1, -1 br i1 %not_max.not.not.i.i.1, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.1 -__barray_check_bounds.exit.i.1: ; preds = %cond_exit_20.i +__barray_check_bounds.exit.i.1: ; preds = %__barray_mask_return.exit.i tail call void @___reset(i64 %qalloc.i.i.1) %6 = load i64, ptr %2, align 4 %7 = and i64 %6, 2 %.not = icmp eq i64 %7, 0 - br i1 %.not, label %panic.i.i, label %cond_exit_20.i.1 + br i1 %.not, label %panic.i.i, label %__barray_mask_return.exit.i.1 -cond_exit_20.i.1: ; preds = %__barray_check_bounds.exit.i.1 +__barray_mask_return.exit.i.1: ; preds = %__barray_check_bounds.exit.i.1 %8 = and i64 %6, -3 store i64 %8, ptr %2, align 4 %9 = getelementptr inbounds nuw i8, ptr %1, i64 8 @@ -69,14 +69,14 @@ cond_exit_20.i.1: ; preds = %__barray_check_boun %not_max.not.not.i.i.2 = icmp eq i64 %qalloc.i.i.2, -1 br i1 %not_max.not.not.i.i.2, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.2 -__barray_check_bounds.exit.i.2: ; preds = %cond_exit_20.i.1 +__barray_check_bounds.exit.i.2: ; preds = %__barray_mask_return.exit.i.1 tail call void @___reset(i64 %qalloc.i.i.2) %10 = load i64, ptr %2, align 4 %11 = and i64 %10, 4 %.not1 = icmp eq i64 %11, 0 - br i1 %.not1, label %panic.i.i, label %cond_exit_20.i.2 + br i1 %.not1, label %panic.i.i, label %__barray_mask_return.exit.i.2 -cond_exit_20.i.2: ; preds = %__barray_check_bounds.exit.i.2 +__barray_mask_return.exit.i.2: ; preds = %__barray_check_bounds.exit.i.2 %12 = and i64 %10, -5 store i64 %12, ptr %2, align 4 %13 = getelementptr inbounds nuw i8, ptr %1, i64 16 @@ -85,14 +85,14 @@ cond_exit_20.i.2: ; preds = %__barray_check_boun %not_max.not.not.i.i.3 = icmp eq i64 %qalloc.i.i.3, -1 br i1 %not_max.not.not.i.i.3, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.3 -__barray_check_bounds.exit.i.3: ; preds = %cond_exit_20.i.2 +__barray_check_bounds.exit.i.3: ; preds = %__barray_mask_return.exit.i.2 tail call void @___reset(i64 %qalloc.i.i.3) %14 = load i64, ptr %2, align 4 %15 = and i64 %14, 8 %.not2 = icmp eq i64 %15, 0 - br i1 %.not2, label %panic.i.i, label %cond_exit_20.i.3 + br i1 %.not2, label %panic.i.i, label %__barray_mask_return.exit.i.3 -cond_exit_20.i.3: ; preds = %__barray_check_bounds.exit.i.3 +__barray_mask_return.exit.i.3: ; preds = %__barray_check_bounds.exit.i.3 %16 = and i64 %14, -9 store i64 %16, ptr %2, align 4 %17 = getelementptr inbounds nuw i8, ptr %1, i64 24 @@ -101,14 +101,14 @@ cond_exit_20.i.3: ; preds = %__barray_check_boun %not_max.not.not.i.i.4 = icmp eq i64 %qalloc.i.i.4, -1 br i1 %not_max.not.not.i.i.4, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.4 -__barray_check_bounds.exit.i.4: ; preds = %cond_exit_20.i.3 +__barray_check_bounds.exit.i.4: ; preds = %__barray_mask_return.exit.i.3 tail call void @___reset(i64 %qalloc.i.i.4) %18 = load i64, ptr %2, align 4 %19 = and i64 %18, 16 %.not3 = icmp eq i64 %19, 0 - br i1 %.not3, label %panic.i.i, label %cond_exit_20.i.4 + br i1 %.not3, label %panic.i.i, label %__barray_mask_return.exit.i.4 -cond_exit_20.i.4: ; preds = %__barray_check_bounds.exit.i.4 +__barray_mask_return.exit.i.4: ; preds = %__barray_check_bounds.exit.i.4 %20 = and i64 %18, -17 store i64 %20, ptr %2, align 4 %21 = getelementptr inbounds nuw i8, ptr %1, i64 32 @@ -117,14 +117,14 @@ cond_exit_20.i.4: ; preds = %__barray_check_boun %not_max.not.not.i.i.5 = icmp eq i64 %qalloc.i.i.5, -1 br i1 %not_max.not.not.i.i.5, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.5 -__barray_check_bounds.exit.i.5: ; preds = %cond_exit_20.i.4 +__barray_check_bounds.exit.i.5: ; preds = %__barray_mask_return.exit.i.4 tail call void @___reset(i64 %qalloc.i.i.5) %22 = load i64, ptr %2, align 4 %23 = and i64 %22, 32 %.not4 = icmp eq i64 %23, 0 - br i1 %.not4, label %panic.i.i, label %cond_exit_20.i.5 + br i1 %.not4, label %panic.i.i, label %__barray_mask_return.exit.i.5 -cond_exit_20.i.5: ; preds = %__barray_check_bounds.exit.i.5 +__barray_mask_return.exit.i.5: ; preds = %__barray_check_bounds.exit.i.5 %24 = and i64 %22, -33 store i64 %24, ptr %2, align 4 %25 = getelementptr inbounds nuw i8, ptr %1, i64 40 @@ -133,14 +133,14 @@ cond_exit_20.i.5: ; preds = %__barray_check_boun %not_max.not.not.i.i.6 = icmp eq i64 %qalloc.i.i.6, -1 br i1 %not_max.not.not.i.i.6, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.6 -__barray_check_bounds.exit.i.6: ; preds = %cond_exit_20.i.5 +__barray_check_bounds.exit.i.6: ; preds = %__barray_mask_return.exit.i.5 tail call void @___reset(i64 %qalloc.i.i.6) %26 = load i64, ptr %2, align 4 %27 = and i64 %26, 64 %.not5 = icmp eq i64 %27, 0 - br i1 %.not5, label %panic.i.i, label %cond_exit_20.i.6 + br i1 %.not5, label %panic.i.i, label %__barray_mask_return.exit.i.6 -cond_exit_20.i.6: ; preds = %__barray_check_bounds.exit.i.6 +__barray_mask_return.exit.i.6: ; preds = %__barray_check_bounds.exit.i.6 %28 = and i64 %26, -65 store i64 %28, ptr %2, align 4 %29 = getelementptr inbounds nuw i8, ptr %1, i64 48 @@ -149,14 +149,14 @@ cond_exit_20.i.6: ; preds = %__barray_check_boun %not_max.not.not.i.i.7 = icmp eq i64 %qalloc.i.i.7, -1 br i1 %not_max.not.not.i.i.7, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.7 -__barray_check_bounds.exit.i.7: ; preds = %cond_exit_20.i.6 +__barray_check_bounds.exit.i.7: ; preds = %__barray_mask_return.exit.i.6 tail call void @___reset(i64 %qalloc.i.i.7) %30 = load i64, ptr %2, align 4 %31 = and i64 %30, 128 %.not6 = icmp eq i64 %31, 0 - br i1 %.not6, label %panic.i.i, label %cond_exit_20.i.7 + br i1 %.not6, label %panic.i.i, label %__barray_mask_return.exit.i.7 -cond_exit_20.i.7: ; preds = %__barray_check_bounds.exit.i.7 +__barray_mask_return.exit.i.7: ; preds = %__barray_check_bounds.exit.i.7 %32 = and i64 %30, -129 store i64 %32, ptr %2, align 4 %33 = getelementptr inbounds nuw i8, ptr %1, i64 56 @@ -165,14 +165,14 @@ cond_exit_20.i.7: ; preds = %__barray_check_boun %not_max.not.not.i.i.8 = icmp eq i64 %qalloc.i.i.8, -1 br i1 %not_max.not.not.i.i.8, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.8 -__barray_check_bounds.exit.i.8: ; preds = %cond_exit_20.i.7 +__barray_check_bounds.exit.i.8: ; preds = %__barray_mask_return.exit.i.7 tail call void @___reset(i64 %qalloc.i.i.8) %34 = load i64, ptr %2, align 4 %35 = and i64 %34, 256 %.not7 = icmp eq i64 %35, 0 - br i1 %.not7, label %panic.i.i, label %cond_exit_20.i.8 + br i1 %.not7, label %panic.i.i, label %__barray_mask_return.exit.i.8 -cond_exit_20.i.8: ; preds = %__barray_check_bounds.exit.i.8 +__barray_mask_return.exit.i.8: ; preds = %__barray_check_bounds.exit.i.8 %36 = and i64 %34, -257 store i64 %36, ptr %2, align 4 %37 = getelementptr inbounds nuw i8, ptr %1, i64 64 @@ -181,14 +181,14 @@ cond_exit_20.i.8: ; preds = %__barray_check_boun %not_max.not.not.i.i.9 = icmp eq i64 %qalloc.i.i.9, -1 br i1 %not_max.not.not.i.i.9, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.9 -__barray_check_bounds.exit.i.9: ; preds = %cond_exit_20.i.8 +__barray_check_bounds.exit.i.9: ; preds = %__barray_mask_return.exit.i.8 tail call void @___reset(i64 %qalloc.i.i.9) %38 = load i64, ptr %2, align 4 %39 = and i64 %38, 512 %.not8 = icmp eq i64 %39, 0 - br i1 %.not8, label %panic.i.i, label %cond_exit_20.i.9 + br i1 %.not8, label %panic.i.i, label %__barray_mask_return.exit.i.9 -cond_exit_20.i.9: ; preds = %__barray_check_bounds.exit.i.9 +__barray_mask_return.exit.i.9: ; preds = %__barray_check_bounds.exit.i.9 %40 = and i64 %38, -513 store i64 %40, ptr %2, align 4 %41 = getelementptr inbounds nuw i8, ptr %1, i64 72 @@ -240,15 +240,15 @@ mask_block_err.i.i.i.i: ; preds = %mask_block_ok.i.i.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit.i.i.i: ; preds = %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i", %cond_exit_20.i.9 - %.fca.2.extract82.i185.i.i = phi i64 [ 0, %cond_exit_20.i.9 ], [ %.fca.1.0.0.2.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %.fca.1.extract81.i184.i.i = phi ptr [ %2, %cond_exit_20.i.9 ], [ %.fca.1.0.0.1.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %.fca.0.extract80.i183.i.i = phi ptr [ %1, %cond_exit_20.i.9 ], [ %.fca.1.0.0.0.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %"294_0.0182.i.i" = phi i64 [ 0, %cond_exit_20.i.9 ], [ %72, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %.pn181.i.i = phi { { ptr, ptr, i64 }, i64 } [ %42, %cond_exit_20.i.9 ], [ %80, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %65 = add i64 %"294_0.0182.i.i", %.fca.2.extract82.i185.i.i +__barray_check_bounds.exit.i.i.i: ; preds = %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i", %__barray_mask_return.exit.i.9 + %.fca.2.extract82.i172.i.i = phi i64 [ 0, %__barray_mask_return.exit.i.9 ], [ %.fca.1.0.0.2.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] + %.fca.1.extract81.i171.i.i = phi ptr [ %2, %__barray_mask_return.exit.i.9 ], [ %.fca.1.0.0.1.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] + %.fca.0.extract80.i170.i.i = phi ptr [ %1, %__barray_mask_return.exit.i.9 ], [ %.fca.1.0.0.0.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] + %"294_0.0169.i.i" = phi i64 [ 0, %__barray_mask_return.exit.i.9 ], [ %72, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] + %.pn168.i.i = phi { { ptr, ptr, i64 }, i64 } [ %42, %__barray_mask_return.exit.i.9 ], [ %80, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] + %65 = add i64 %"294_0.0169.i.i", %.fca.2.extract82.i172.i.i %66 = lshr i64 %65, 6 - %67 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i184.i.i, i64 %66 + %67 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i171.i.i, i64 %66 %68 = load i64, ptr %67, align 4 %69 = and i64 %65, 63 %70 = lshr i64 %68, %69 @@ -260,21 +260,21 @@ panic.i.i.i.i: ; preds = %__barray_check_boun unreachable "__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i": ; preds = %__barray_check_bounds.exit.i.i.i - %72 = add nuw nsw i64 %"294_0.0182.i.i", 1 + %72 = add nuw nsw i64 %"294_0.0169.i.i", 1 %73 = shl nuw i64 1, %69 %74 = xor i64 %73, %68 store i64 %74, ptr %67, align 4 - %75 = getelementptr inbounds i64, ptr %.fca.0.extract80.i183.i.i, i64 %65 + %75 = getelementptr inbounds i64, ptr %.fca.0.extract80.i170.i.i, i64 %65 %76 = load i64, ptr %75, align 4 - %.fca.1.0.0.0.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 0 - %.fca.1.0.0.1.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 1 - %.fca.1.0.0.2.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 2 - %77 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, i64 %72, 1 + %.fca.1.0.0.0.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn168.i.i, 0, 0 + %.fca.1.0.0.1.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn168.i.i, 0, 1 + %.fca.1.0.0.2.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn168.i.i, 0, 2 + %77 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn168.i.i, i64 %72, 1 %78 = insertvalue { { ptr, ptr, i64 }, i64 } %77, ptr %.fca.1.0.0.0.extract.i.i.i, 0, 0 %79 = insertvalue { { ptr, ptr, i64 }, i64 } %78, ptr %.fca.1.0.0.1.extract.i.i.i, 0, 1 %80 = insertvalue { { ptr, ptr, i64 }, i64 } %79, i64 %.fca.1.0.0.2.extract.i.i.i, 0, 2 tail call void @___qfree(i64 %76) - %.not.i.i = icmp eq i64 %"294_0.0182.i.i", 9 + %.not.i.i = icmp eq i64 %"294_0.0169.i.i", 9 br i1 %.not.i.i, label %43, label %__barray_check_bounds.exit.i.i.i __hugr__.main.1.exit: ; preds = %61, %43 diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-measure_qb_array/measure_qb_array_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-measure_qb_array/measure_qb_array_x86_64-unknown-linux-gnu index a61cea991..b108636a1 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-measure_qb_array/measure_qb_array_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-measure_qb_array/measure_qb_array_x86_64-unknown-linux-gnu @@ -37,7 +37,7 @@ entry: %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 br i1 %not_max.not.not.i.i, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i -cond_207_case_0.i.i: ; preds = %cond_exit_20.i.8, %cond_exit_20.i.7, %cond_exit_20.i.6, %cond_exit_20.i.5, %cond_exit_20.i.4, %cond_exit_20.i.3, %cond_exit_20.i.2, %cond_exit_20.i.1, %cond_exit_20.i, %entry +cond_207_case_0.i.i: ; preds = %__barray_mask_return.exit.i.8, %__barray_mask_return.exit.i.7, %__barray_mask_return.exit.i.6, %__barray_mask_return.exit.i.5, %__barray_mask_return.exit.i.4, %__barray_mask_return.exit.i.3, %__barray_mask_return.exit.i.2, %__barray_mask_return.exit.i.1, %__barray_mask_return.exit.i, %entry tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable @@ -45,13 +45,13 @@ __barray_check_bounds.exit.i: ; preds = %entry tail call void @___reset(i64 %qalloc.i.i) %3 = load i64, ptr %2, align 4 %4 = trunc i64 %3 to i1 - br i1 %4, label %cond_exit_20.i, label %panic.i.i + br i1 %4, label %__barray_mask_return.exit.i, label %panic.i.i panic.i.i: ; preds = %__barray_check_bounds.exit.i.9, %__barray_check_bounds.exit.i.8, %__barray_check_bounds.exit.i.7, %__barray_check_bounds.exit.i.6, %__barray_check_bounds.exit.i.5, %__barray_check_bounds.exit.i.4, %__barray_check_bounds.exit.i.3, %__barray_check_bounds.exit.i.2, %__barray_check_bounds.exit.i.1, %__barray_check_bounds.exit.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -cond_exit_20.i: ; preds = %__barray_check_bounds.exit.i +__barray_mask_return.exit.i: ; preds = %__barray_check_bounds.exit.i %5 = and i64 %3, -2 store i64 %5, ptr %2, align 4 store i64 %qalloc.i.i, ptr %1, align 4 @@ -59,14 +59,14 @@ cond_exit_20.i: ; preds = %__barray_check_boun %not_max.not.not.i.i.1 = icmp eq i64 %qalloc.i.i.1, -1 br i1 %not_max.not.not.i.i.1, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.1 -__barray_check_bounds.exit.i.1: ; preds = %cond_exit_20.i +__barray_check_bounds.exit.i.1: ; preds = %__barray_mask_return.exit.i tail call void @___reset(i64 %qalloc.i.i.1) %6 = load i64, ptr %2, align 4 %7 = and i64 %6, 2 %.not = icmp eq i64 %7, 0 - br i1 %.not, label %panic.i.i, label %cond_exit_20.i.1 + br i1 %.not, label %panic.i.i, label %__barray_mask_return.exit.i.1 -cond_exit_20.i.1: ; preds = %__barray_check_bounds.exit.i.1 +__barray_mask_return.exit.i.1: ; preds = %__barray_check_bounds.exit.i.1 %8 = and i64 %6, -3 store i64 %8, ptr %2, align 4 %9 = getelementptr inbounds nuw i8, ptr %1, i64 8 @@ -75,14 +75,14 @@ cond_exit_20.i.1: ; preds = %__barray_check_boun %not_max.not.not.i.i.2 = icmp eq i64 %qalloc.i.i.2, -1 br i1 %not_max.not.not.i.i.2, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.2 -__barray_check_bounds.exit.i.2: ; preds = %cond_exit_20.i.1 +__barray_check_bounds.exit.i.2: ; preds = %__barray_mask_return.exit.i.1 tail call void @___reset(i64 %qalloc.i.i.2) %10 = load i64, ptr %2, align 4 %11 = and i64 %10, 4 %.not1 = icmp eq i64 %11, 0 - br i1 %.not1, label %panic.i.i, label %cond_exit_20.i.2 + br i1 %.not1, label %panic.i.i, label %__barray_mask_return.exit.i.2 -cond_exit_20.i.2: ; preds = %__barray_check_bounds.exit.i.2 +__barray_mask_return.exit.i.2: ; preds = %__barray_check_bounds.exit.i.2 %12 = and i64 %10, -5 store i64 %12, ptr %2, align 4 %13 = getelementptr inbounds nuw i8, ptr %1, i64 16 @@ -91,14 +91,14 @@ cond_exit_20.i.2: ; preds = %__barray_check_boun %not_max.not.not.i.i.3 = icmp eq i64 %qalloc.i.i.3, -1 br i1 %not_max.not.not.i.i.3, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.3 -__barray_check_bounds.exit.i.3: ; preds = %cond_exit_20.i.2 +__barray_check_bounds.exit.i.3: ; preds = %__barray_mask_return.exit.i.2 tail call void @___reset(i64 %qalloc.i.i.3) %14 = load i64, ptr %2, align 4 %15 = and i64 %14, 8 %.not2 = icmp eq i64 %15, 0 - br i1 %.not2, label %panic.i.i, label %cond_exit_20.i.3 + br i1 %.not2, label %panic.i.i, label %__barray_mask_return.exit.i.3 -cond_exit_20.i.3: ; preds = %__barray_check_bounds.exit.i.3 +__barray_mask_return.exit.i.3: ; preds = %__barray_check_bounds.exit.i.3 %16 = and i64 %14, -9 store i64 %16, ptr %2, align 4 %17 = getelementptr inbounds nuw i8, ptr %1, i64 24 @@ -107,14 +107,14 @@ cond_exit_20.i.3: ; preds = %__barray_check_boun %not_max.not.not.i.i.4 = icmp eq i64 %qalloc.i.i.4, -1 br i1 %not_max.not.not.i.i.4, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.4 -__barray_check_bounds.exit.i.4: ; preds = %cond_exit_20.i.3 +__barray_check_bounds.exit.i.4: ; preds = %__barray_mask_return.exit.i.3 tail call void @___reset(i64 %qalloc.i.i.4) %18 = load i64, ptr %2, align 4 %19 = and i64 %18, 16 %.not3 = icmp eq i64 %19, 0 - br i1 %.not3, label %panic.i.i, label %cond_exit_20.i.4 + br i1 %.not3, label %panic.i.i, label %__barray_mask_return.exit.i.4 -cond_exit_20.i.4: ; preds = %__barray_check_bounds.exit.i.4 +__barray_mask_return.exit.i.4: ; preds = %__barray_check_bounds.exit.i.4 %20 = and i64 %18, -17 store i64 %20, ptr %2, align 4 %21 = getelementptr inbounds nuw i8, ptr %1, i64 32 @@ -123,14 +123,14 @@ cond_exit_20.i.4: ; preds = %__barray_check_boun %not_max.not.not.i.i.5 = icmp eq i64 %qalloc.i.i.5, -1 br i1 %not_max.not.not.i.i.5, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.5 -__barray_check_bounds.exit.i.5: ; preds = %cond_exit_20.i.4 +__barray_check_bounds.exit.i.5: ; preds = %__barray_mask_return.exit.i.4 tail call void @___reset(i64 %qalloc.i.i.5) %22 = load i64, ptr %2, align 4 %23 = and i64 %22, 32 %.not4 = icmp eq i64 %23, 0 - br i1 %.not4, label %panic.i.i, label %cond_exit_20.i.5 + br i1 %.not4, label %panic.i.i, label %__barray_mask_return.exit.i.5 -cond_exit_20.i.5: ; preds = %__barray_check_bounds.exit.i.5 +__barray_mask_return.exit.i.5: ; preds = %__barray_check_bounds.exit.i.5 %24 = and i64 %22, -33 store i64 %24, ptr %2, align 4 %25 = getelementptr inbounds nuw i8, ptr %1, i64 40 @@ -139,14 +139,14 @@ cond_exit_20.i.5: ; preds = %__barray_check_boun %not_max.not.not.i.i.6 = icmp eq i64 %qalloc.i.i.6, -1 br i1 %not_max.not.not.i.i.6, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.6 -__barray_check_bounds.exit.i.6: ; preds = %cond_exit_20.i.5 +__barray_check_bounds.exit.i.6: ; preds = %__barray_mask_return.exit.i.5 tail call void @___reset(i64 %qalloc.i.i.6) %26 = load i64, ptr %2, align 4 %27 = and i64 %26, 64 %.not5 = icmp eq i64 %27, 0 - br i1 %.not5, label %panic.i.i, label %cond_exit_20.i.6 + br i1 %.not5, label %panic.i.i, label %__barray_mask_return.exit.i.6 -cond_exit_20.i.6: ; preds = %__barray_check_bounds.exit.i.6 +__barray_mask_return.exit.i.6: ; preds = %__barray_check_bounds.exit.i.6 %28 = and i64 %26, -65 store i64 %28, ptr %2, align 4 %29 = getelementptr inbounds nuw i8, ptr %1, i64 48 @@ -155,14 +155,14 @@ cond_exit_20.i.6: ; preds = %__barray_check_boun %not_max.not.not.i.i.7 = icmp eq i64 %qalloc.i.i.7, -1 br i1 %not_max.not.not.i.i.7, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.7 -__barray_check_bounds.exit.i.7: ; preds = %cond_exit_20.i.6 +__barray_check_bounds.exit.i.7: ; preds = %__barray_mask_return.exit.i.6 tail call void @___reset(i64 %qalloc.i.i.7) %30 = load i64, ptr %2, align 4 %31 = and i64 %30, 128 %.not6 = icmp eq i64 %31, 0 - br i1 %.not6, label %panic.i.i, label %cond_exit_20.i.7 + br i1 %.not6, label %panic.i.i, label %__barray_mask_return.exit.i.7 -cond_exit_20.i.7: ; preds = %__barray_check_bounds.exit.i.7 +__barray_mask_return.exit.i.7: ; preds = %__barray_check_bounds.exit.i.7 %32 = and i64 %30, -129 store i64 %32, ptr %2, align 4 %33 = getelementptr inbounds nuw i8, ptr %1, i64 56 @@ -171,14 +171,14 @@ cond_exit_20.i.7: ; preds = %__barray_check_boun %not_max.not.not.i.i.8 = icmp eq i64 %qalloc.i.i.8, -1 br i1 %not_max.not.not.i.i.8, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.8 -__barray_check_bounds.exit.i.8: ; preds = %cond_exit_20.i.7 +__barray_check_bounds.exit.i.8: ; preds = %__barray_mask_return.exit.i.7 tail call void @___reset(i64 %qalloc.i.i.8) %34 = load i64, ptr %2, align 4 %35 = and i64 %34, 256 %.not7 = icmp eq i64 %35, 0 - br i1 %.not7, label %panic.i.i, label %cond_exit_20.i.8 + br i1 %.not7, label %panic.i.i, label %__barray_mask_return.exit.i.8 -cond_exit_20.i.8: ; preds = %__barray_check_bounds.exit.i.8 +__barray_mask_return.exit.i.8: ; preds = %__barray_check_bounds.exit.i.8 %36 = and i64 %34, -257 store i64 %36, ptr %2, align 4 %37 = getelementptr inbounds nuw i8, ptr %1, i64 64 @@ -187,14 +187,14 @@ cond_exit_20.i.8: ; preds = %__barray_check_boun %not_max.not.not.i.i.9 = icmp eq i64 %qalloc.i.i.9, -1 br i1 %not_max.not.not.i.i.9, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.9 -__barray_check_bounds.exit.i.9: ; preds = %cond_exit_20.i.8 +__barray_check_bounds.exit.i.9: ; preds = %__barray_mask_return.exit.i.8 tail call void @___reset(i64 %qalloc.i.i.9) %38 = load i64, ptr %2, align 4 %39 = and i64 %38, 512 %.not8 = icmp eq i64 %39, 0 - br i1 %.not8, label %panic.i.i, label %cond_exit_20.i.9 + br i1 %.not8, label %panic.i.i, label %__barray_mask_return.exit.i.9 -cond_exit_20.i.9: ; preds = %__barray_check_bounds.exit.i.9 +__barray_mask_return.exit.i.9: ; preds = %__barray_check_bounds.exit.i.9 %40 = and i64 %38, -513 store i64 %40, ptr %2, align 4 %41 = getelementptr inbounds nuw i8, ptr %1, i64 72 @@ -206,11 +206,11 @@ cond_exit_20.i.9: ; preds = %__barray_check_boun %43 = trunc i64 %42 to i1 br i1 %43, label %panic.i238.i, label %__barray_mask_borrow.exit.i -panic.i238.i: ; preds = %cond_exit_20.i.9 +panic.i238.i: ; preds = %__barray_mask_return.exit.i.9 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_mask_borrow.exit.i: ; preds = %cond_exit_20.i.9 +__barray_mask_borrow.exit.i: ; preds = %__barray_mask_return.exit.i.9 %44 = or disjoint i64 %42, 1 store i64 %44, ptr %2, align 4 %45 = load i64, ptr %1, align 4 @@ -243,8 +243,8 @@ __barray_mask_borrow.exit242.i: ; preds = %__barray_mask_retur tail call void @___rxy(i64 %52, double 0x400921FB54442D18, double 0.000000e+00) %53 = load i64, ptr %2, align 4 %54 = and i64 %53, 4 - %.not268.i = icmp eq i64 %54, 0 - br i1 %.not268.i, label %panic.i243.i, label %__barray_mask_return.exit244.i + %.not265.i = icmp eq i64 %54, 0 + br i1 %.not265.i, label %panic.i243.i, label %__barray_mask_return.exit244.i panic.i243.i: ; preds = %__barray_mask_borrow.exit242.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") @@ -256,8 +256,8 @@ __barray_mask_return.exit244.i: ; preds = %__barray_mask_borro store i64 %52, ptr %13, align 4 %56 = load i64, ptr %2, align 4 %57 = and i64 %56, 8 - %.not269.i = icmp eq i64 %57, 0 - br i1 %.not269.i, label %__barray_mask_borrow.exit246.i, label %panic.i245.i + %.not266.i = icmp eq i64 %57, 0 + br i1 %.not266.i, label %__barray_mask_borrow.exit246.i, label %panic.i245.i panic.i245.i: ; preds = %__barray_mask_return.exit244.i tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") @@ -270,8 +270,8 @@ __barray_mask_borrow.exit246.i: ; preds = %__barray_mask_retur tail call void @___rxy(i64 %59, double 0x400921FB54442D18, double 0.000000e+00) %60 = load i64, ptr %2, align 4 %61 = and i64 %60, 8 - %.not270.i = icmp eq i64 %61, 0 - br i1 %.not270.i, label %panic.i247.i, label %__barray_mask_return.exit248.i + %.not267.i = icmp eq i64 %61, 0 + br i1 %.not267.i, label %panic.i247.i, label %__barray_mask_return.exit248.i panic.i247.i: ; preds = %__barray_mask_borrow.exit246.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") @@ -283,8 +283,8 @@ __barray_mask_return.exit248.i: ; preds = %__barray_mask_borro store i64 %59, ptr %17, align 4 %63 = load i64, ptr %2, align 4 %64 = and i64 %63, 512 - %.not271.i = icmp eq i64 %64, 0 - br i1 %.not271.i, label %__barray_mask_borrow.exit250.i, label %panic.i249.i + %.not268.i = icmp eq i64 %64, 0 + br i1 %.not268.i, label %__barray_mask_borrow.exit250.i, label %panic.i249.i panic.i249.i: ; preds = %__barray_mask_return.exit248.i tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") @@ -297,8 +297,8 @@ __barray_mask_borrow.exit250.i: ; preds = %__barray_mask_retur tail call void @___rxy(i64 %66, double 0x400921FB54442D18, double 0.000000e+00) %67 = load i64, ptr %2, align 4 %68 = and i64 %67, 512 - %.not272.i = icmp eq i64 %68, 0 - br i1 %.not272.i, label %panic.i251.i, label %__barray_mask_return.exit252.i + %.not269.i = icmp eq i64 %68, 0 + br i1 %.not269.i, label %panic.i251.i, label %__barray_mask_return.exit252.i panic.i251.i: ; preds = %__barray_mask_borrow.exit250.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") @@ -314,7 +314,7 @@ __barray_mask_return.exit252.i: ; preds = %__barray_mask_borro store i64 -1, ptr %72, align 1 br label %__barray_check_bounds.exit.i.i.i -73: ; preds = %loop_body.i.i +73: ; preds = %__barray_mask_return.exit.i.i %74 = lshr i64 %.fca.2.extract82.i.i.i, 6 %75 = getelementptr i64, ptr %.fca.1.extract81.i.i.i, i64 %74 %76 = load i64, ptr %75, align 4 @@ -355,16 +355,17 @@ mask_block_err.i.i.i.i: ; preds = %mask_block_ok.i.i.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit.i.i.i: ; preds = %loop_body.i.i, %__barray_mask_return.exit252.i - %.fca.2.extract82.i187.i.i = phi i64 [ 0, %__barray_mask_return.exit252.i ], [ %.fca.2.extract82.i.i.i, %loop_body.i.i ] - %.fca.1.extract81.i186.i.i = phi ptr [ %2, %__barray_mask_return.exit252.i ], [ %.fca.1.extract81.i.i.i, %loop_body.i.i ] - %.fca.0.extract80.i185.i.i = phi ptr [ %1, %__barray_mask_return.exit252.i ], [ %.fca.0.extract80.i.i.i, %loop_body.i.i ] - %"306_0.sroa.15.0184.i.i" = phi i64 [ 0, %__barray_mask_return.exit252.i ], [ %95, %loop_body.i.i ] - %.pn165183.i.i = phi { { ptr, ptr, i64 }, i64 } [ %70, %__barray_mask_return.exit252.i ], [ %110, %loop_body.i.i ] - %95 = add nuw nsw i64 %"306_0.sroa.15.0184.i.i", 1 - %96 = add i64 %"306_0.sroa.15.0184.i.i", %.fca.2.extract82.i187.i.i +__barray_check_bounds.exit.i.i.i: ; preds = %__barray_mask_return.exit.i.i, %__barray_mask_return.exit252.i + %.fca.2.extract82.i175.i.i = phi i64 [ 0, %__barray_mask_return.exit252.i ], [ %.fca.2.extract82.i.i.i, %__barray_mask_return.exit.i.i ] + %.fca.1.extract81.i174.i.i = phi ptr [ %2, %__barray_mask_return.exit252.i ], [ %.fca.1.extract81.i.i.i, %__barray_mask_return.exit.i.i ] + %.fca.0.extract80.i173.i.i = phi ptr [ %1, %__barray_mask_return.exit252.i ], [ %.fca.0.extract80.i.i.i, %__barray_mask_return.exit.i.i ] + %"306_0.sroa.15.0172.i.i" = phi i64 [ 0, %__barray_mask_return.exit252.i ], [ %95, %__barray_mask_return.exit.i.i ] + %.pn.i.i = phi { { ptr, ptr, i64 }, i64 } [ %70, %__barray_mask_return.exit252.i ], [ %.pn171.i.i, %__barray_mask_return.exit.i.i ] + %.pn171.i.i = insertvalue { { ptr, ptr, i64 }, i64 } %.pn.i.i, i64 %"306_0.sroa.15.0172.i.i", 1 + %95 = add nuw nsw i64 %"306_0.sroa.15.0172.i.i", 1 + %96 = add i64 %"306_0.sroa.15.0172.i.i", %.fca.2.extract82.i175.i.i %97 = lshr i64 %96, 6 - %98 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i186.i.i, i64 %97 + %98 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i174.i.i, i64 %97 %99 = load i64, ptr %98, align 4 %100 = and i64 %96, 63 %101 = lshr i64 %99, %100 @@ -379,242 +380,241 @@ __barray_check_bounds.exit.i.i: ; preds = %__barray_check_boun %103 = shl nuw i64 1, %100 %104 = xor i64 %103, %99 store i64 %104, ptr %98, align 4 - %105 = getelementptr inbounds i64, ptr %.fca.0.extract80.i185.i.i, i64 %96 + %105 = getelementptr inbounds i64, ptr %.fca.0.extract80.i173.i.i, i64 %96 %106 = load i64, ptr %105, align 4 %lazy_measure.i.i = tail call i64 @___lazy_measure(i64 %106) tail call void @___qfree(i64 %106) %107 = load i64, ptr %72, align 4 - %108 = lshr i64 %107, %"306_0.sroa.15.0184.i.i" + %108 = lshr i64 %107, %"306_0.sroa.15.0172.i.i" %109 = trunc i64 %108 to i1 - br i1 %109, label %loop_body.i.i, label %panic.i.i.i + br i1 %109, label %__barray_mask_return.exit.i.i, label %panic.i.i.i panic.i.i.i: ; preds = %__barray_check_bounds.exit.i.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -loop_body.i.i: ; preds = %__barray_check_bounds.exit.i.i +__barray_mask_return.exit.i.i: ; preds = %__barray_check_bounds.exit.i.i %"371_054.fca.1.insert.i.i" = insertvalue { i1, i64, i1 } { i1 true, i64 poison, i1 undef }, i64 %lazy_measure.i.i, 1 %"371_054.fca.2.insert.i.i" = insertvalue { i1, i64, i1 } %"371_054.fca.1.insert.i.i", i1 undef, 2 - %110 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn165183.i.i, i64 %95, 1 - %111 = shl nuw nsw i64 1, %"306_0.sroa.15.0184.i.i" - %112 = xor i64 %107, %111 - store i64 %112, ptr %72, align 4 - %113 = getelementptr inbounds nuw { i1, i64, i1 }, ptr %71, i64 %"306_0.sroa.15.0184.i.i" - store { i1, i64, i1 } %"371_054.fca.2.insert.i.i", ptr %113, align 4 - %114 = extractvalue { { ptr, ptr, i64 }, i64 } %.pn165183.i.i, 0 - %.fca.0.extract80.i.i.i = extractvalue { ptr, ptr, i64 } %114, 0 - %.fca.1.extract81.i.i.i = extractvalue { ptr, ptr, i64 } %114, 1 - %.fca.2.extract82.i.i.i = extractvalue { ptr, ptr, i64 } %114, 2 - %exitcond.not.i.i = icmp eq i64 %95, 10 - br i1 %exitcond.not.i.i, label %73, label %__barray_check_bounds.exit.i.i.i + %110 = shl nuw nsw i64 1, %"306_0.sroa.15.0172.i.i" + %111 = xor i64 %107, %110 + store i64 %111, ptr %72, align 4 + %112 = getelementptr inbounds nuw { i1, i64, i1 }, ptr %71, i64 %"306_0.sroa.15.0172.i.i" + store { i1, i64, i1 } %"371_054.fca.2.insert.i.i", ptr %112, align 4 + %113 = extractvalue { { ptr, ptr, i64 }, i64 } %.pn.i.i, 0 + %.fca.0.extract80.i.i.i = extractvalue { ptr, ptr, i64 } %113, 0 + %.fca.1.extract81.i.i.i = extractvalue { ptr, ptr, i64 } %113, 1 + %.fca.2.extract82.i.i.i = extractvalue { ptr, ptr, i64 } %113, 2 + %.not.i.i = icmp eq i64 %"306_0.sroa.15.0172.i.i", 9 + br i1 %.not.i.i, label %73, label %__barray_check_bounds.exit.i.i.i "__hugr__.$measure_array$$n(10).280.exit.i": ; preds = %91, %73 tail call void @heap_free(ptr %.fca.0.extract80.i.i.i) tail call void @heap_free(ptr nonnull %.fca.1.extract81.i.i.i) - %115 = load i64, ptr %72, align 4 - %116 = trunc i64 %115 to i1 - br i1 %116, label %cond_exit_89.thread.i, label %__barray_mask_borrow.exit259.i + %114 = load i64, ptr %72, align 4 + %115 = trunc i64 %114 to i1 + br i1 %115, label %cond_exit_89.thread.i, label %__barray_mask_borrow.exit258.i mask_block_err.i.i: ; preds = %cond_exit_89.thread.9.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_mask_borrow.exit259.i: ; preds = %"__hugr__.$measure_array$$n(10).280.exit.i" - %117 = or disjoint i64 %115, 1 - store i64 %117, ptr %72, align 4 - %118 = load { i1, i64, i1 }, ptr %71, align 4 - %.fca.0.extract167.i = extractvalue { i1, i64, i1 } %118, 0 +__barray_mask_borrow.exit258.i: ; preds = %"__hugr__.$measure_array$$n(10).280.exit.i" + %116 = or disjoint i64 %114, 1 + store i64 %116, ptr %72, align 4 + %117 = load { i1, i64, i1 }, ptr %71, align 4 + %.fca.0.extract167.i = extractvalue { i1, i64, i1 } %117, 0 br i1 %.fca.0.extract167.i, label %cond_392_case_1.i, label %cond_exit_89.thread.i -cond_exit_89.thread.i: ; preds = %cond_392_case_1.i, %__barray_mask_borrow.exit259.i, %"__hugr__.$measure_array$$n(10).280.exit.i" - %119 = phi i64 [ %.pre.i, %cond_392_case_1.i ], [ %117, %__barray_mask_borrow.exit259.i ], [ %115, %"__hugr__.$measure_array$$n(10).280.exit.i" ] - %120 = and i64 %119, 2 - %.not290.i = icmp eq i64 %120, 0 - br i1 %.not290.i, label %__barray_mask_borrow.exit259.1.i, label %cond_exit_89.thread.1.i - -__barray_mask_borrow.exit259.1.i: ; preds = %cond_exit_89.thread.i - %121 = or disjoint i64 %119, 2 - store i64 %121, ptr %72, align 4 - %122 = getelementptr inbounds nuw i8, ptr %71, i64 24 - %123 = load { i1, i64, i1 }, ptr %122, align 4 - %.fca.0.extract167.1.i = extractvalue { i1, i64, i1 } %123, 0 +cond_exit_89.thread.i: ; preds = %cond_392_case_1.i, %__barray_mask_borrow.exit258.i, %"__hugr__.$measure_array$$n(10).280.exit.i" + %118 = phi i64 [ %.pre.i, %cond_392_case_1.i ], [ %116, %__barray_mask_borrow.exit258.i ], [ %114, %"__hugr__.$measure_array$$n(10).280.exit.i" ] + %119 = and i64 %118, 2 + %.not287.i = icmp eq i64 %119, 0 + br i1 %.not287.i, label %__barray_mask_borrow.exit258.1.i, label %cond_exit_89.thread.1.i + +__barray_mask_borrow.exit258.1.i: ; preds = %cond_exit_89.thread.i + %120 = or disjoint i64 %118, 2 + store i64 %120, ptr %72, align 4 + %121 = getelementptr inbounds nuw i8, ptr %71, i64 24 + %122 = load { i1, i64, i1 }, ptr %121, align 4 + %.fca.0.extract167.1.i = extractvalue { i1, i64, i1 } %122, 0 br i1 %.fca.0.extract167.1.i, label %cond_392_case_1.1.i, label %cond_exit_89.thread.1.i -cond_392_case_1.1.i: ; preds = %__barray_mask_borrow.exit259.1.i - %.fca.1.extract.1.i = extractvalue { i1, i64, i1 } %123, 1 +cond_392_case_1.1.i: ; preds = %__barray_mask_borrow.exit258.1.i + %.fca.1.extract.1.i = extractvalue { i1, i64, i1 } %122, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.1.i) - %.pre281.i = load i64, ptr %72, align 4 + %.pre278.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.1.i -cond_exit_89.thread.1.i: ; preds = %cond_392_case_1.1.i, %__barray_mask_borrow.exit259.1.i, %cond_exit_89.thread.i - %124 = phi i64 [ %.pre281.i, %cond_392_case_1.1.i ], [ %121, %__barray_mask_borrow.exit259.1.i ], [ %119, %cond_exit_89.thread.i ] - %125 = and i64 %124, 4 - %.not291.i = icmp eq i64 %125, 0 - br i1 %.not291.i, label %__barray_mask_borrow.exit259.2.i, label %cond_exit_89.thread.2.i - -__barray_mask_borrow.exit259.2.i: ; preds = %cond_exit_89.thread.1.i - %126 = or disjoint i64 %124, 4 - store i64 %126, ptr %72, align 4 - %127 = getelementptr inbounds nuw i8, ptr %71, i64 48 - %128 = load { i1, i64, i1 }, ptr %127, align 4 - %.fca.0.extract167.2.i = extractvalue { i1, i64, i1 } %128, 0 +cond_exit_89.thread.1.i: ; preds = %cond_392_case_1.1.i, %__barray_mask_borrow.exit258.1.i, %cond_exit_89.thread.i + %123 = phi i64 [ %.pre278.i, %cond_392_case_1.1.i ], [ %120, %__barray_mask_borrow.exit258.1.i ], [ %118, %cond_exit_89.thread.i ] + %124 = and i64 %123, 4 + %.not288.i = icmp eq i64 %124, 0 + br i1 %.not288.i, label %__barray_mask_borrow.exit258.2.i, label %cond_exit_89.thread.2.i + +__barray_mask_borrow.exit258.2.i: ; preds = %cond_exit_89.thread.1.i + %125 = or disjoint i64 %123, 4 + store i64 %125, ptr %72, align 4 + %126 = getelementptr inbounds nuw i8, ptr %71, i64 48 + %127 = load { i1, i64, i1 }, ptr %126, align 4 + %.fca.0.extract167.2.i = extractvalue { i1, i64, i1 } %127, 0 br i1 %.fca.0.extract167.2.i, label %cond_392_case_1.2.i, label %cond_exit_89.thread.2.i -cond_392_case_1.2.i: ; preds = %__barray_mask_borrow.exit259.2.i - %.fca.1.extract.2.i = extractvalue { i1, i64, i1 } %128, 1 +cond_392_case_1.2.i: ; preds = %__barray_mask_borrow.exit258.2.i + %.fca.1.extract.2.i = extractvalue { i1, i64, i1 } %127, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.2.i) - %.pre282.i = load i64, ptr %72, align 4 + %.pre279.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.2.i -cond_exit_89.thread.2.i: ; preds = %cond_392_case_1.2.i, %__barray_mask_borrow.exit259.2.i, %cond_exit_89.thread.1.i - %129 = phi i64 [ %.pre282.i, %cond_392_case_1.2.i ], [ %126, %__barray_mask_borrow.exit259.2.i ], [ %124, %cond_exit_89.thread.1.i ] - %130 = and i64 %129, 8 - %.not292.i = icmp eq i64 %130, 0 - br i1 %.not292.i, label %__barray_mask_borrow.exit259.3.i, label %cond_exit_89.thread.3.i - -__barray_mask_borrow.exit259.3.i: ; preds = %cond_exit_89.thread.2.i - %131 = or disjoint i64 %129, 8 - store i64 %131, ptr %72, align 4 - %132 = getelementptr inbounds nuw i8, ptr %71, i64 72 - %133 = load { i1, i64, i1 }, ptr %132, align 4 - %.fca.0.extract167.3.i = extractvalue { i1, i64, i1 } %133, 0 +cond_exit_89.thread.2.i: ; preds = %cond_392_case_1.2.i, %__barray_mask_borrow.exit258.2.i, %cond_exit_89.thread.1.i + %128 = phi i64 [ %.pre279.i, %cond_392_case_1.2.i ], [ %125, %__barray_mask_borrow.exit258.2.i ], [ %123, %cond_exit_89.thread.1.i ] + %129 = and i64 %128, 8 + %.not289.i = icmp eq i64 %129, 0 + br i1 %.not289.i, label %__barray_mask_borrow.exit258.3.i, label %cond_exit_89.thread.3.i + +__barray_mask_borrow.exit258.3.i: ; preds = %cond_exit_89.thread.2.i + %130 = or disjoint i64 %128, 8 + store i64 %130, ptr %72, align 4 + %131 = getelementptr inbounds nuw i8, ptr %71, i64 72 + %132 = load { i1, i64, i1 }, ptr %131, align 4 + %.fca.0.extract167.3.i = extractvalue { i1, i64, i1 } %132, 0 br i1 %.fca.0.extract167.3.i, label %cond_392_case_1.3.i, label %cond_exit_89.thread.3.i -cond_392_case_1.3.i: ; preds = %__barray_mask_borrow.exit259.3.i - %.fca.1.extract.3.i = extractvalue { i1, i64, i1 } %133, 1 +cond_392_case_1.3.i: ; preds = %__barray_mask_borrow.exit258.3.i + %.fca.1.extract.3.i = extractvalue { i1, i64, i1 } %132, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.3.i) - %.pre283.i = load i64, ptr %72, align 4 + %.pre280.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.3.i -cond_exit_89.thread.3.i: ; preds = %cond_392_case_1.3.i, %__barray_mask_borrow.exit259.3.i, %cond_exit_89.thread.2.i - %134 = phi i64 [ %.pre283.i, %cond_392_case_1.3.i ], [ %131, %__barray_mask_borrow.exit259.3.i ], [ %129, %cond_exit_89.thread.2.i ] - %135 = and i64 %134, 16 - %.not293.i = icmp eq i64 %135, 0 - br i1 %.not293.i, label %__barray_mask_borrow.exit259.4.i, label %cond_exit_89.thread.4.i - -__barray_mask_borrow.exit259.4.i: ; preds = %cond_exit_89.thread.3.i - %136 = or disjoint i64 %134, 16 - store i64 %136, ptr %72, align 4 - %137 = getelementptr inbounds nuw i8, ptr %71, i64 96 - %138 = load { i1, i64, i1 }, ptr %137, align 4 - %.fca.0.extract167.4.i = extractvalue { i1, i64, i1 } %138, 0 +cond_exit_89.thread.3.i: ; preds = %cond_392_case_1.3.i, %__barray_mask_borrow.exit258.3.i, %cond_exit_89.thread.2.i + %133 = phi i64 [ %.pre280.i, %cond_392_case_1.3.i ], [ %130, %__barray_mask_borrow.exit258.3.i ], [ %128, %cond_exit_89.thread.2.i ] + %134 = and i64 %133, 16 + %.not290.i = icmp eq i64 %134, 0 + br i1 %.not290.i, label %__barray_mask_borrow.exit258.4.i, label %cond_exit_89.thread.4.i + +__barray_mask_borrow.exit258.4.i: ; preds = %cond_exit_89.thread.3.i + %135 = or disjoint i64 %133, 16 + store i64 %135, ptr %72, align 4 + %136 = getelementptr inbounds nuw i8, ptr %71, i64 96 + %137 = load { i1, i64, i1 }, ptr %136, align 4 + %.fca.0.extract167.4.i = extractvalue { i1, i64, i1 } %137, 0 br i1 %.fca.0.extract167.4.i, label %cond_392_case_1.4.i, label %cond_exit_89.thread.4.i -cond_392_case_1.4.i: ; preds = %__barray_mask_borrow.exit259.4.i - %.fca.1.extract.4.i = extractvalue { i1, i64, i1 } %138, 1 +cond_392_case_1.4.i: ; preds = %__barray_mask_borrow.exit258.4.i + %.fca.1.extract.4.i = extractvalue { i1, i64, i1 } %137, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.4.i) - %.pre284.i = load i64, ptr %72, align 4 + %.pre281.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.4.i -cond_exit_89.thread.4.i: ; preds = %cond_392_case_1.4.i, %__barray_mask_borrow.exit259.4.i, %cond_exit_89.thread.3.i - %139 = phi i64 [ %.pre284.i, %cond_392_case_1.4.i ], [ %136, %__barray_mask_borrow.exit259.4.i ], [ %134, %cond_exit_89.thread.3.i ] - %140 = and i64 %139, 32 - %.not294.i = icmp eq i64 %140, 0 - br i1 %.not294.i, label %__barray_mask_borrow.exit259.5.i, label %cond_exit_89.thread.5.i - -__barray_mask_borrow.exit259.5.i: ; preds = %cond_exit_89.thread.4.i - %141 = or disjoint i64 %139, 32 - store i64 %141, ptr %72, align 4 - %142 = getelementptr inbounds nuw i8, ptr %71, i64 120 - %143 = load { i1, i64, i1 }, ptr %142, align 4 - %.fca.0.extract167.5.i = extractvalue { i1, i64, i1 } %143, 0 +cond_exit_89.thread.4.i: ; preds = %cond_392_case_1.4.i, %__barray_mask_borrow.exit258.4.i, %cond_exit_89.thread.3.i + %138 = phi i64 [ %.pre281.i, %cond_392_case_1.4.i ], [ %135, %__barray_mask_borrow.exit258.4.i ], [ %133, %cond_exit_89.thread.3.i ] + %139 = and i64 %138, 32 + %.not291.i = icmp eq i64 %139, 0 + br i1 %.not291.i, label %__barray_mask_borrow.exit258.5.i, label %cond_exit_89.thread.5.i + +__barray_mask_borrow.exit258.5.i: ; preds = %cond_exit_89.thread.4.i + %140 = or disjoint i64 %138, 32 + store i64 %140, ptr %72, align 4 + %141 = getelementptr inbounds nuw i8, ptr %71, i64 120 + %142 = load { i1, i64, i1 }, ptr %141, align 4 + %.fca.0.extract167.5.i = extractvalue { i1, i64, i1 } %142, 0 br i1 %.fca.0.extract167.5.i, label %cond_392_case_1.5.i, label %cond_exit_89.thread.5.i -cond_392_case_1.5.i: ; preds = %__barray_mask_borrow.exit259.5.i - %.fca.1.extract.5.i = extractvalue { i1, i64, i1 } %143, 1 +cond_392_case_1.5.i: ; preds = %__barray_mask_borrow.exit258.5.i + %.fca.1.extract.5.i = extractvalue { i1, i64, i1 } %142, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.5.i) - %.pre285.i = load i64, ptr %72, align 4 + %.pre282.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.5.i -cond_exit_89.thread.5.i: ; preds = %cond_392_case_1.5.i, %__barray_mask_borrow.exit259.5.i, %cond_exit_89.thread.4.i - %144 = phi i64 [ %.pre285.i, %cond_392_case_1.5.i ], [ %141, %__barray_mask_borrow.exit259.5.i ], [ %139, %cond_exit_89.thread.4.i ] - %145 = and i64 %144, 64 - %.not295.i = icmp eq i64 %145, 0 - br i1 %.not295.i, label %__barray_mask_borrow.exit259.6.i, label %cond_exit_89.thread.6.i - -__barray_mask_borrow.exit259.6.i: ; preds = %cond_exit_89.thread.5.i - %146 = or disjoint i64 %144, 64 - store i64 %146, ptr %72, align 4 - %147 = getelementptr inbounds nuw i8, ptr %71, i64 144 - %148 = load { i1, i64, i1 }, ptr %147, align 4 - %.fca.0.extract167.6.i = extractvalue { i1, i64, i1 } %148, 0 +cond_exit_89.thread.5.i: ; preds = %cond_392_case_1.5.i, %__barray_mask_borrow.exit258.5.i, %cond_exit_89.thread.4.i + %143 = phi i64 [ %.pre282.i, %cond_392_case_1.5.i ], [ %140, %__barray_mask_borrow.exit258.5.i ], [ %138, %cond_exit_89.thread.4.i ] + %144 = and i64 %143, 64 + %.not292.i = icmp eq i64 %144, 0 + br i1 %.not292.i, label %__barray_mask_borrow.exit258.6.i, label %cond_exit_89.thread.6.i + +__barray_mask_borrow.exit258.6.i: ; preds = %cond_exit_89.thread.5.i + %145 = or disjoint i64 %143, 64 + store i64 %145, ptr %72, align 4 + %146 = getelementptr inbounds nuw i8, ptr %71, i64 144 + %147 = load { i1, i64, i1 }, ptr %146, align 4 + %.fca.0.extract167.6.i = extractvalue { i1, i64, i1 } %147, 0 br i1 %.fca.0.extract167.6.i, label %cond_392_case_1.6.i, label %cond_exit_89.thread.6.i -cond_392_case_1.6.i: ; preds = %__barray_mask_borrow.exit259.6.i - %.fca.1.extract.6.i = extractvalue { i1, i64, i1 } %148, 1 +cond_392_case_1.6.i: ; preds = %__barray_mask_borrow.exit258.6.i + %.fca.1.extract.6.i = extractvalue { i1, i64, i1 } %147, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.6.i) - %.pre286.i = load i64, ptr %72, align 4 + %.pre283.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.6.i -cond_exit_89.thread.6.i: ; preds = %cond_392_case_1.6.i, %__barray_mask_borrow.exit259.6.i, %cond_exit_89.thread.5.i - %149 = phi i64 [ %.pre286.i, %cond_392_case_1.6.i ], [ %146, %__barray_mask_borrow.exit259.6.i ], [ %144, %cond_exit_89.thread.5.i ] - %150 = and i64 %149, 128 - %.not296.i = icmp eq i64 %150, 0 - br i1 %.not296.i, label %__barray_mask_borrow.exit259.7.i, label %cond_exit_89.thread.7.i - -__barray_mask_borrow.exit259.7.i: ; preds = %cond_exit_89.thread.6.i - %151 = or disjoint i64 %149, 128 - store i64 %151, ptr %72, align 4 - %152 = getelementptr inbounds nuw i8, ptr %71, i64 168 - %153 = load { i1, i64, i1 }, ptr %152, align 4 - %.fca.0.extract167.7.i = extractvalue { i1, i64, i1 } %153, 0 +cond_exit_89.thread.6.i: ; preds = %cond_392_case_1.6.i, %__barray_mask_borrow.exit258.6.i, %cond_exit_89.thread.5.i + %148 = phi i64 [ %.pre283.i, %cond_392_case_1.6.i ], [ %145, %__barray_mask_borrow.exit258.6.i ], [ %143, %cond_exit_89.thread.5.i ] + %149 = and i64 %148, 128 + %.not293.i = icmp eq i64 %149, 0 + br i1 %.not293.i, label %__barray_mask_borrow.exit258.7.i, label %cond_exit_89.thread.7.i + +__barray_mask_borrow.exit258.7.i: ; preds = %cond_exit_89.thread.6.i + %150 = or disjoint i64 %148, 128 + store i64 %150, ptr %72, align 4 + %151 = getelementptr inbounds nuw i8, ptr %71, i64 168 + %152 = load { i1, i64, i1 }, ptr %151, align 4 + %.fca.0.extract167.7.i = extractvalue { i1, i64, i1 } %152, 0 br i1 %.fca.0.extract167.7.i, label %cond_392_case_1.7.i, label %cond_exit_89.thread.7.i -cond_392_case_1.7.i: ; preds = %__barray_mask_borrow.exit259.7.i - %.fca.1.extract.7.i = extractvalue { i1, i64, i1 } %153, 1 +cond_392_case_1.7.i: ; preds = %__barray_mask_borrow.exit258.7.i + %.fca.1.extract.7.i = extractvalue { i1, i64, i1 } %152, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.7.i) - %.pre287.i = load i64, ptr %72, align 4 + %.pre284.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.7.i -cond_exit_89.thread.7.i: ; preds = %cond_392_case_1.7.i, %__barray_mask_borrow.exit259.7.i, %cond_exit_89.thread.6.i - %154 = phi i64 [ %.pre287.i, %cond_392_case_1.7.i ], [ %151, %__barray_mask_borrow.exit259.7.i ], [ %149, %cond_exit_89.thread.6.i ] - %155 = and i64 %154, 256 - %.not297.i = icmp eq i64 %155, 0 - br i1 %.not297.i, label %__barray_mask_borrow.exit259.8.i, label %cond_exit_89.thread.8.i - -__barray_mask_borrow.exit259.8.i: ; preds = %cond_exit_89.thread.7.i - %156 = or disjoint i64 %154, 256 - store i64 %156, ptr %72, align 4 - %157 = getelementptr inbounds nuw i8, ptr %71, i64 192 - %158 = load { i1, i64, i1 }, ptr %157, align 4 - %.fca.0.extract167.8.i = extractvalue { i1, i64, i1 } %158, 0 +cond_exit_89.thread.7.i: ; preds = %cond_392_case_1.7.i, %__barray_mask_borrow.exit258.7.i, %cond_exit_89.thread.6.i + %153 = phi i64 [ %.pre284.i, %cond_392_case_1.7.i ], [ %150, %__barray_mask_borrow.exit258.7.i ], [ %148, %cond_exit_89.thread.6.i ] + %154 = and i64 %153, 256 + %.not294.i = icmp eq i64 %154, 0 + br i1 %.not294.i, label %__barray_mask_borrow.exit258.8.i, label %cond_exit_89.thread.8.i + +__barray_mask_borrow.exit258.8.i: ; preds = %cond_exit_89.thread.7.i + %155 = or disjoint i64 %153, 256 + store i64 %155, ptr %72, align 4 + %156 = getelementptr inbounds nuw i8, ptr %71, i64 192 + %157 = load { i1, i64, i1 }, ptr %156, align 4 + %.fca.0.extract167.8.i = extractvalue { i1, i64, i1 } %157, 0 br i1 %.fca.0.extract167.8.i, label %cond_392_case_1.8.i, label %cond_exit_89.thread.8.i -cond_392_case_1.8.i: ; preds = %__barray_mask_borrow.exit259.8.i - %.fca.1.extract.8.i = extractvalue { i1, i64, i1 } %158, 1 +cond_392_case_1.8.i: ; preds = %__barray_mask_borrow.exit258.8.i + %.fca.1.extract.8.i = extractvalue { i1, i64, i1 } %157, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.8.i) - %.pre288.i = load i64, ptr %72, align 4 + %.pre285.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.8.i -cond_exit_89.thread.8.i: ; preds = %cond_392_case_1.8.i, %__barray_mask_borrow.exit259.8.i, %cond_exit_89.thread.7.i - %159 = phi i64 [ %.pre288.i, %cond_392_case_1.8.i ], [ %156, %__barray_mask_borrow.exit259.8.i ], [ %154, %cond_exit_89.thread.7.i ] - %160 = and i64 %159, 512 - %.not298.i = icmp eq i64 %160, 0 - br i1 %.not298.i, label %__barray_mask_borrow.exit259.9.i, label %cond_exit_89.thread.9.i - -__barray_mask_borrow.exit259.9.i: ; preds = %cond_exit_89.thread.8.i - %161 = or disjoint i64 %159, 512 - store i64 %161, ptr %72, align 4 - %162 = getelementptr inbounds nuw i8, ptr %71, i64 216 - %163 = load { i1, i64, i1 }, ptr %162, align 4 - %.fca.0.extract167.9.i = extractvalue { i1, i64, i1 } %163, 0 +cond_exit_89.thread.8.i: ; preds = %cond_392_case_1.8.i, %__barray_mask_borrow.exit258.8.i, %cond_exit_89.thread.7.i + %158 = phi i64 [ %.pre285.i, %cond_392_case_1.8.i ], [ %155, %__barray_mask_borrow.exit258.8.i ], [ %153, %cond_exit_89.thread.7.i ] + %159 = and i64 %158, 512 + %.not295.i = icmp eq i64 %159, 0 + br i1 %.not295.i, label %__barray_mask_borrow.exit258.9.i, label %cond_exit_89.thread.9.i + +__barray_mask_borrow.exit258.9.i: ; preds = %cond_exit_89.thread.8.i + %160 = or disjoint i64 %158, 512 + store i64 %160, ptr %72, align 4 + %161 = getelementptr inbounds nuw i8, ptr %71, i64 216 + %162 = load { i1, i64, i1 }, ptr %161, align 4 + %.fca.0.extract167.9.i = extractvalue { i1, i64, i1 } %162, 0 br i1 %.fca.0.extract167.9.i, label %cond_392_case_1.9.i, label %cond_exit_89.thread.9.i -cond_392_case_1.9.i: ; preds = %__barray_mask_borrow.exit259.9.i - %.fca.1.extract.9.i = extractvalue { i1, i64, i1 } %163, 1 +cond_392_case_1.9.i: ; preds = %__barray_mask_borrow.exit258.9.i + %.fca.1.extract.9.i = extractvalue { i1, i64, i1 } %162, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.9.i) - %.pre289.i = load i64, ptr %72, align 4 + %.pre286.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.9.i -cond_exit_89.thread.9.i: ; preds = %cond_392_case_1.9.i, %__barray_mask_borrow.exit259.9.i, %cond_exit_89.thread.8.i - %164 = phi i64 [ %.pre289.i, %cond_392_case_1.9.i ], [ %161, %__barray_mask_borrow.exit259.9.i ], [ %159, %cond_exit_89.thread.8.i ] - %165 = or i64 %164, -1024 - store i64 %165, ptr %72, align 4 - %166 = icmp eq i64 %165, -1 - br i1 %166, label %__hugr__.main.1.exit, label %mask_block_err.i.i +cond_exit_89.thread.9.i: ; preds = %cond_392_case_1.9.i, %__barray_mask_borrow.exit258.9.i, %cond_exit_89.thread.8.i + %163 = phi i64 [ %.pre286.i, %cond_392_case_1.9.i ], [ %160, %__barray_mask_borrow.exit258.9.i ], [ %158, %cond_exit_89.thread.8.i ] + %164 = or i64 %163, -1024 + store i64 %164, ptr %72, align 4 + %165 = icmp eq i64 %164, -1 + br i1 %165, label %__hugr__.main.1.exit, label %mask_block_err.i.i -cond_392_case_1.i: ; preds = %__barray_mask_borrow.exit259.i - %.fca.1.extract.i = extractvalue { i1, i64, i1 } %118, 1 +cond_392_case_1.i: ; preds = %__barray_mask_borrow.exit258.i + %.fca.1.extract.i = extractvalue { i1, i64, i1 } %117, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.i) %.pre.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.i @@ -622,8 +622,8 @@ cond_392_case_1.i: ; preds = %__barray_mask_borro __hugr__.main.1.exit: ; preds = %cond_exit_89.thread.9.i tail call void @heap_free(ptr %71) tail call void @heap_free(ptr nonnull %72) - %167 = tail call i64 @teardown() - ret i64 %167 + %166 = tail call i64 @teardown() + ret i64 %166 } declare void @setup(i64) local_unnamed_addr diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-discard_qb_array/discard_qb_array_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-discard_qb_array/discard_qb_array_x86_64-windows-msvc index 12ac202e7..b5708c2ea 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-discard_qb_array/discard_qb_array_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-discard_qb_array/discard_qb_array_x86_64-windows-msvc @@ -31,7 +31,7 @@ entry: %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 br i1 %not_max.not.not.i.i, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i -cond_213_case_0.i.i: ; preds = %cond_exit_20.i.8, %cond_exit_20.i.7, %cond_exit_20.i.6, %cond_exit_20.i.5, %cond_exit_20.i.4, %cond_exit_20.i.3, %cond_exit_20.i.2, %cond_exit_20.i.1, %cond_exit_20.i, %entry +cond_213_case_0.i.i: ; preds = %__barray_mask_return.exit.i.8, %__barray_mask_return.exit.i.7, %__barray_mask_return.exit.i.6, %__barray_mask_return.exit.i.5, %__barray_mask_return.exit.i.4, %__barray_mask_return.exit.i.3, %__barray_mask_return.exit.i.2, %__barray_mask_return.exit.i.1, %__barray_mask_return.exit.i, %entry tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable @@ -39,13 +39,13 @@ __barray_check_bounds.exit.i: ; preds = %entry tail call void @___reset(i64 %qalloc.i.i) %3 = load i64, ptr %2, align 4 %4 = trunc i64 %3 to i1 - br i1 %4, label %cond_exit_20.i, label %panic.i.i + br i1 %4, label %__barray_mask_return.exit.i, label %panic.i.i panic.i.i: ; preds = %__barray_check_bounds.exit.i.9, %__barray_check_bounds.exit.i.8, %__barray_check_bounds.exit.i.7, %__barray_check_bounds.exit.i.6, %__barray_check_bounds.exit.i.5, %__barray_check_bounds.exit.i.4, %__barray_check_bounds.exit.i.3, %__barray_check_bounds.exit.i.2, %__barray_check_bounds.exit.i.1, %__barray_check_bounds.exit.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -cond_exit_20.i: ; preds = %__barray_check_bounds.exit.i +__barray_mask_return.exit.i: ; preds = %__barray_check_bounds.exit.i %5 = and i64 %3, -2 store i64 %5, ptr %2, align 4 store i64 %qalloc.i.i, ptr %1, align 4 @@ -53,14 +53,14 @@ cond_exit_20.i: ; preds = %__barray_check_boun %not_max.not.not.i.i.1 = icmp eq i64 %qalloc.i.i.1, -1 br i1 %not_max.not.not.i.i.1, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.1 -__barray_check_bounds.exit.i.1: ; preds = %cond_exit_20.i +__barray_check_bounds.exit.i.1: ; preds = %__barray_mask_return.exit.i tail call void @___reset(i64 %qalloc.i.i.1) %6 = load i64, ptr %2, align 4 %7 = and i64 %6, 2 %.not = icmp eq i64 %7, 0 - br i1 %.not, label %panic.i.i, label %cond_exit_20.i.1 + br i1 %.not, label %panic.i.i, label %__barray_mask_return.exit.i.1 -cond_exit_20.i.1: ; preds = %__barray_check_bounds.exit.i.1 +__barray_mask_return.exit.i.1: ; preds = %__barray_check_bounds.exit.i.1 %8 = and i64 %6, -3 store i64 %8, ptr %2, align 4 %9 = getelementptr inbounds nuw i8, ptr %1, i64 8 @@ -69,14 +69,14 @@ cond_exit_20.i.1: ; preds = %__barray_check_boun %not_max.not.not.i.i.2 = icmp eq i64 %qalloc.i.i.2, -1 br i1 %not_max.not.not.i.i.2, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.2 -__barray_check_bounds.exit.i.2: ; preds = %cond_exit_20.i.1 +__barray_check_bounds.exit.i.2: ; preds = %__barray_mask_return.exit.i.1 tail call void @___reset(i64 %qalloc.i.i.2) %10 = load i64, ptr %2, align 4 %11 = and i64 %10, 4 %.not1 = icmp eq i64 %11, 0 - br i1 %.not1, label %panic.i.i, label %cond_exit_20.i.2 + br i1 %.not1, label %panic.i.i, label %__barray_mask_return.exit.i.2 -cond_exit_20.i.2: ; preds = %__barray_check_bounds.exit.i.2 +__barray_mask_return.exit.i.2: ; preds = %__barray_check_bounds.exit.i.2 %12 = and i64 %10, -5 store i64 %12, ptr %2, align 4 %13 = getelementptr inbounds nuw i8, ptr %1, i64 16 @@ -85,14 +85,14 @@ cond_exit_20.i.2: ; preds = %__barray_check_boun %not_max.not.not.i.i.3 = icmp eq i64 %qalloc.i.i.3, -1 br i1 %not_max.not.not.i.i.3, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.3 -__barray_check_bounds.exit.i.3: ; preds = %cond_exit_20.i.2 +__barray_check_bounds.exit.i.3: ; preds = %__barray_mask_return.exit.i.2 tail call void @___reset(i64 %qalloc.i.i.3) %14 = load i64, ptr %2, align 4 %15 = and i64 %14, 8 %.not2 = icmp eq i64 %15, 0 - br i1 %.not2, label %panic.i.i, label %cond_exit_20.i.3 + br i1 %.not2, label %panic.i.i, label %__barray_mask_return.exit.i.3 -cond_exit_20.i.3: ; preds = %__barray_check_bounds.exit.i.3 +__barray_mask_return.exit.i.3: ; preds = %__barray_check_bounds.exit.i.3 %16 = and i64 %14, -9 store i64 %16, ptr %2, align 4 %17 = getelementptr inbounds nuw i8, ptr %1, i64 24 @@ -101,14 +101,14 @@ cond_exit_20.i.3: ; preds = %__barray_check_boun %not_max.not.not.i.i.4 = icmp eq i64 %qalloc.i.i.4, -1 br i1 %not_max.not.not.i.i.4, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.4 -__barray_check_bounds.exit.i.4: ; preds = %cond_exit_20.i.3 +__barray_check_bounds.exit.i.4: ; preds = %__barray_mask_return.exit.i.3 tail call void @___reset(i64 %qalloc.i.i.4) %18 = load i64, ptr %2, align 4 %19 = and i64 %18, 16 %.not3 = icmp eq i64 %19, 0 - br i1 %.not3, label %panic.i.i, label %cond_exit_20.i.4 + br i1 %.not3, label %panic.i.i, label %__barray_mask_return.exit.i.4 -cond_exit_20.i.4: ; preds = %__barray_check_bounds.exit.i.4 +__barray_mask_return.exit.i.4: ; preds = %__barray_check_bounds.exit.i.4 %20 = and i64 %18, -17 store i64 %20, ptr %2, align 4 %21 = getelementptr inbounds nuw i8, ptr %1, i64 32 @@ -117,14 +117,14 @@ cond_exit_20.i.4: ; preds = %__barray_check_boun %not_max.not.not.i.i.5 = icmp eq i64 %qalloc.i.i.5, -1 br i1 %not_max.not.not.i.i.5, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.5 -__barray_check_bounds.exit.i.5: ; preds = %cond_exit_20.i.4 +__barray_check_bounds.exit.i.5: ; preds = %__barray_mask_return.exit.i.4 tail call void @___reset(i64 %qalloc.i.i.5) %22 = load i64, ptr %2, align 4 %23 = and i64 %22, 32 %.not4 = icmp eq i64 %23, 0 - br i1 %.not4, label %panic.i.i, label %cond_exit_20.i.5 + br i1 %.not4, label %panic.i.i, label %__barray_mask_return.exit.i.5 -cond_exit_20.i.5: ; preds = %__barray_check_bounds.exit.i.5 +__barray_mask_return.exit.i.5: ; preds = %__barray_check_bounds.exit.i.5 %24 = and i64 %22, -33 store i64 %24, ptr %2, align 4 %25 = getelementptr inbounds nuw i8, ptr %1, i64 40 @@ -133,14 +133,14 @@ cond_exit_20.i.5: ; preds = %__barray_check_boun %not_max.not.not.i.i.6 = icmp eq i64 %qalloc.i.i.6, -1 br i1 %not_max.not.not.i.i.6, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.6 -__barray_check_bounds.exit.i.6: ; preds = %cond_exit_20.i.5 +__barray_check_bounds.exit.i.6: ; preds = %__barray_mask_return.exit.i.5 tail call void @___reset(i64 %qalloc.i.i.6) %26 = load i64, ptr %2, align 4 %27 = and i64 %26, 64 %.not5 = icmp eq i64 %27, 0 - br i1 %.not5, label %panic.i.i, label %cond_exit_20.i.6 + br i1 %.not5, label %panic.i.i, label %__barray_mask_return.exit.i.6 -cond_exit_20.i.6: ; preds = %__barray_check_bounds.exit.i.6 +__barray_mask_return.exit.i.6: ; preds = %__barray_check_bounds.exit.i.6 %28 = and i64 %26, -65 store i64 %28, ptr %2, align 4 %29 = getelementptr inbounds nuw i8, ptr %1, i64 48 @@ -149,14 +149,14 @@ cond_exit_20.i.6: ; preds = %__barray_check_boun %not_max.not.not.i.i.7 = icmp eq i64 %qalloc.i.i.7, -1 br i1 %not_max.not.not.i.i.7, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.7 -__barray_check_bounds.exit.i.7: ; preds = %cond_exit_20.i.6 +__barray_check_bounds.exit.i.7: ; preds = %__barray_mask_return.exit.i.6 tail call void @___reset(i64 %qalloc.i.i.7) %30 = load i64, ptr %2, align 4 %31 = and i64 %30, 128 %.not6 = icmp eq i64 %31, 0 - br i1 %.not6, label %panic.i.i, label %cond_exit_20.i.7 + br i1 %.not6, label %panic.i.i, label %__barray_mask_return.exit.i.7 -cond_exit_20.i.7: ; preds = %__barray_check_bounds.exit.i.7 +__barray_mask_return.exit.i.7: ; preds = %__barray_check_bounds.exit.i.7 %32 = and i64 %30, -129 store i64 %32, ptr %2, align 4 %33 = getelementptr inbounds nuw i8, ptr %1, i64 56 @@ -165,14 +165,14 @@ cond_exit_20.i.7: ; preds = %__barray_check_boun %not_max.not.not.i.i.8 = icmp eq i64 %qalloc.i.i.8, -1 br i1 %not_max.not.not.i.i.8, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.8 -__barray_check_bounds.exit.i.8: ; preds = %cond_exit_20.i.7 +__barray_check_bounds.exit.i.8: ; preds = %__barray_mask_return.exit.i.7 tail call void @___reset(i64 %qalloc.i.i.8) %34 = load i64, ptr %2, align 4 %35 = and i64 %34, 256 %.not7 = icmp eq i64 %35, 0 - br i1 %.not7, label %panic.i.i, label %cond_exit_20.i.8 + br i1 %.not7, label %panic.i.i, label %__barray_mask_return.exit.i.8 -cond_exit_20.i.8: ; preds = %__barray_check_bounds.exit.i.8 +__barray_mask_return.exit.i.8: ; preds = %__barray_check_bounds.exit.i.8 %36 = and i64 %34, -257 store i64 %36, ptr %2, align 4 %37 = getelementptr inbounds nuw i8, ptr %1, i64 64 @@ -181,14 +181,14 @@ cond_exit_20.i.8: ; preds = %__barray_check_boun %not_max.not.not.i.i.9 = icmp eq i64 %qalloc.i.i.9, -1 br i1 %not_max.not.not.i.i.9, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.9 -__barray_check_bounds.exit.i.9: ; preds = %cond_exit_20.i.8 +__barray_check_bounds.exit.i.9: ; preds = %__barray_mask_return.exit.i.8 tail call void @___reset(i64 %qalloc.i.i.9) %38 = load i64, ptr %2, align 4 %39 = and i64 %38, 512 %.not8 = icmp eq i64 %39, 0 - br i1 %.not8, label %panic.i.i, label %cond_exit_20.i.9 + br i1 %.not8, label %panic.i.i, label %__barray_mask_return.exit.i.9 -cond_exit_20.i.9: ; preds = %__barray_check_bounds.exit.i.9 +__barray_mask_return.exit.i.9: ; preds = %__barray_check_bounds.exit.i.9 %40 = and i64 %38, -513 store i64 %40, ptr %2, align 4 %41 = getelementptr inbounds nuw i8, ptr %1, i64 72 @@ -240,15 +240,15 @@ mask_block_err.i.i.i.i: ; preds = %mask_block_ok.i.i.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit.i.i.i: ; preds = %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i", %cond_exit_20.i.9 - %.fca.2.extract82.i185.i.i = phi i64 [ 0, %cond_exit_20.i.9 ], [ %.fca.1.0.0.2.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %.fca.1.extract81.i184.i.i = phi ptr [ %2, %cond_exit_20.i.9 ], [ %.fca.1.0.0.1.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %.fca.0.extract80.i183.i.i = phi ptr [ %1, %cond_exit_20.i.9 ], [ %.fca.1.0.0.0.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %"294_0.0182.i.i" = phi i64 [ 0, %cond_exit_20.i.9 ], [ %72, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %.pn181.i.i = phi { { ptr, ptr, i64 }, i64 } [ %42, %cond_exit_20.i.9 ], [ %80, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %65 = add i64 %"294_0.0182.i.i", %.fca.2.extract82.i185.i.i +__barray_check_bounds.exit.i.i.i: ; preds = %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i", %__barray_mask_return.exit.i.9 + %.fca.2.extract82.i172.i.i = phi i64 [ 0, %__barray_mask_return.exit.i.9 ], [ %.fca.1.0.0.2.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] + %.fca.1.extract81.i171.i.i = phi ptr [ %2, %__barray_mask_return.exit.i.9 ], [ %.fca.1.0.0.1.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] + %.fca.0.extract80.i170.i.i = phi ptr [ %1, %__barray_mask_return.exit.i.9 ], [ %.fca.1.0.0.0.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] + %"294_0.0169.i.i" = phi i64 [ 0, %__barray_mask_return.exit.i.9 ], [ %72, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] + %.pn168.i.i = phi { { ptr, ptr, i64 }, i64 } [ %42, %__barray_mask_return.exit.i.9 ], [ %80, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] + %65 = add i64 %"294_0.0169.i.i", %.fca.2.extract82.i172.i.i %66 = lshr i64 %65, 6 - %67 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i184.i.i, i64 %66 + %67 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i171.i.i, i64 %66 %68 = load i64, ptr %67, align 4 %69 = and i64 %65, 63 %70 = lshr i64 %68, %69 @@ -260,21 +260,21 @@ panic.i.i.i.i: ; preds = %__barray_check_boun unreachable "__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i": ; preds = %__barray_check_bounds.exit.i.i.i - %72 = add nuw nsw i64 %"294_0.0182.i.i", 1 + %72 = add nuw nsw i64 %"294_0.0169.i.i", 1 %73 = shl nuw i64 1, %69 %74 = xor i64 %73, %68 store i64 %74, ptr %67, align 4 - %75 = getelementptr inbounds i64, ptr %.fca.0.extract80.i183.i.i, i64 %65 + %75 = getelementptr inbounds i64, ptr %.fca.0.extract80.i170.i.i, i64 %65 %76 = load i64, ptr %75, align 4 - %.fca.1.0.0.0.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 0 - %.fca.1.0.0.1.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 1 - %.fca.1.0.0.2.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 2 - %77 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, i64 %72, 1 + %.fca.1.0.0.0.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn168.i.i, 0, 0 + %.fca.1.0.0.1.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn168.i.i, 0, 1 + %.fca.1.0.0.2.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn168.i.i, 0, 2 + %77 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn168.i.i, i64 %72, 1 %78 = insertvalue { { ptr, ptr, i64 }, i64 } %77, ptr %.fca.1.0.0.0.extract.i.i.i, 0, 0 %79 = insertvalue { { ptr, ptr, i64 }, i64 } %78, ptr %.fca.1.0.0.1.extract.i.i.i, 0, 1 %80 = insertvalue { { ptr, ptr, i64 }, i64 } %79, i64 %.fca.1.0.0.2.extract.i.i.i, 0, 2 tail call void @___qfree(i64 %76) - %.not.i.i = icmp eq i64 %"294_0.0182.i.i", 9 + %.not.i.i = icmp eq i64 %"294_0.0169.i.i", 9 br i1 %.not.i.i, label %43, label %__barray_check_bounds.exit.i.i.i __hugr__.main.1.exit: ; preds = %61, %43 diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-measure_qb_array/measure_qb_array_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-measure_qb_array/measure_qb_array_x86_64-windows-msvc index 3e3e75456..c44c617eb 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-measure_qb_array/measure_qb_array_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-measure_qb_array/measure_qb_array_x86_64-windows-msvc @@ -37,7 +37,7 @@ entry: %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 br i1 %not_max.not.not.i.i, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i -cond_207_case_0.i.i: ; preds = %cond_exit_20.i.8, %cond_exit_20.i.7, %cond_exit_20.i.6, %cond_exit_20.i.5, %cond_exit_20.i.4, %cond_exit_20.i.3, %cond_exit_20.i.2, %cond_exit_20.i.1, %cond_exit_20.i, %entry +cond_207_case_0.i.i: ; preds = %__barray_mask_return.exit.i.8, %__barray_mask_return.exit.i.7, %__barray_mask_return.exit.i.6, %__barray_mask_return.exit.i.5, %__barray_mask_return.exit.i.4, %__barray_mask_return.exit.i.3, %__barray_mask_return.exit.i.2, %__barray_mask_return.exit.i.1, %__barray_mask_return.exit.i, %entry tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable @@ -45,13 +45,13 @@ __barray_check_bounds.exit.i: ; preds = %entry tail call void @___reset(i64 %qalloc.i.i) %3 = load i64, ptr %2, align 4 %4 = trunc i64 %3 to i1 - br i1 %4, label %cond_exit_20.i, label %panic.i.i + br i1 %4, label %__barray_mask_return.exit.i, label %panic.i.i panic.i.i: ; preds = %__barray_check_bounds.exit.i.9, %__barray_check_bounds.exit.i.8, %__barray_check_bounds.exit.i.7, %__barray_check_bounds.exit.i.6, %__barray_check_bounds.exit.i.5, %__barray_check_bounds.exit.i.4, %__barray_check_bounds.exit.i.3, %__barray_check_bounds.exit.i.2, %__barray_check_bounds.exit.i.1, %__barray_check_bounds.exit.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -cond_exit_20.i: ; preds = %__barray_check_bounds.exit.i +__barray_mask_return.exit.i: ; preds = %__barray_check_bounds.exit.i %5 = and i64 %3, -2 store i64 %5, ptr %2, align 4 store i64 %qalloc.i.i, ptr %1, align 4 @@ -59,14 +59,14 @@ cond_exit_20.i: ; preds = %__barray_check_boun %not_max.not.not.i.i.1 = icmp eq i64 %qalloc.i.i.1, -1 br i1 %not_max.not.not.i.i.1, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.1 -__barray_check_bounds.exit.i.1: ; preds = %cond_exit_20.i +__barray_check_bounds.exit.i.1: ; preds = %__barray_mask_return.exit.i tail call void @___reset(i64 %qalloc.i.i.1) %6 = load i64, ptr %2, align 4 %7 = and i64 %6, 2 %.not = icmp eq i64 %7, 0 - br i1 %.not, label %panic.i.i, label %cond_exit_20.i.1 + br i1 %.not, label %panic.i.i, label %__barray_mask_return.exit.i.1 -cond_exit_20.i.1: ; preds = %__barray_check_bounds.exit.i.1 +__barray_mask_return.exit.i.1: ; preds = %__barray_check_bounds.exit.i.1 %8 = and i64 %6, -3 store i64 %8, ptr %2, align 4 %9 = getelementptr inbounds nuw i8, ptr %1, i64 8 @@ -75,14 +75,14 @@ cond_exit_20.i.1: ; preds = %__barray_check_boun %not_max.not.not.i.i.2 = icmp eq i64 %qalloc.i.i.2, -1 br i1 %not_max.not.not.i.i.2, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.2 -__barray_check_bounds.exit.i.2: ; preds = %cond_exit_20.i.1 +__barray_check_bounds.exit.i.2: ; preds = %__barray_mask_return.exit.i.1 tail call void @___reset(i64 %qalloc.i.i.2) %10 = load i64, ptr %2, align 4 %11 = and i64 %10, 4 %.not1 = icmp eq i64 %11, 0 - br i1 %.not1, label %panic.i.i, label %cond_exit_20.i.2 + br i1 %.not1, label %panic.i.i, label %__barray_mask_return.exit.i.2 -cond_exit_20.i.2: ; preds = %__barray_check_bounds.exit.i.2 +__barray_mask_return.exit.i.2: ; preds = %__barray_check_bounds.exit.i.2 %12 = and i64 %10, -5 store i64 %12, ptr %2, align 4 %13 = getelementptr inbounds nuw i8, ptr %1, i64 16 @@ -91,14 +91,14 @@ cond_exit_20.i.2: ; preds = %__barray_check_boun %not_max.not.not.i.i.3 = icmp eq i64 %qalloc.i.i.3, -1 br i1 %not_max.not.not.i.i.3, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.3 -__barray_check_bounds.exit.i.3: ; preds = %cond_exit_20.i.2 +__barray_check_bounds.exit.i.3: ; preds = %__barray_mask_return.exit.i.2 tail call void @___reset(i64 %qalloc.i.i.3) %14 = load i64, ptr %2, align 4 %15 = and i64 %14, 8 %.not2 = icmp eq i64 %15, 0 - br i1 %.not2, label %panic.i.i, label %cond_exit_20.i.3 + br i1 %.not2, label %panic.i.i, label %__barray_mask_return.exit.i.3 -cond_exit_20.i.3: ; preds = %__barray_check_bounds.exit.i.3 +__barray_mask_return.exit.i.3: ; preds = %__barray_check_bounds.exit.i.3 %16 = and i64 %14, -9 store i64 %16, ptr %2, align 4 %17 = getelementptr inbounds nuw i8, ptr %1, i64 24 @@ -107,14 +107,14 @@ cond_exit_20.i.3: ; preds = %__barray_check_boun %not_max.not.not.i.i.4 = icmp eq i64 %qalloc.i.i.4, -1 br i1 %not_max.not.not.i.i.4, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.4 -__barray_check_bounds.exit.i.4: ; preds = %cond_exit_20.i.3 +__barray_check_bounds.exit.i.4: ; preds = %__barray_mask_return.exit.i.3 tail call void @___reset(i64 %qalloc.i.i.4) %18 = load i64, ptr %2, align 4 %19 = and i64 %18, 16 %.not3 = icmp eq i64 %19, 0 - br i1 %.not3, label %panic.i.i, label %cond_exit_20.i.4 + br i1 %.not3, label %panic.i.i, label %__barray_mask_return.exit.i.4 -cond_exit_20.i.4: ; preds = %__barray_check_bounds.exit.i.4 +__barray_mask_return.exit.i.4: ; preds = %__barray_check_bounds.exit.i.4 %20 = and i64 %18, -17 store i64 %20, ptr %2, align 4 %21 = getelementptr inbounds nuw i8, ptr %1, i64 32 @@ -123,14 +123,14 @@ cond_exit_20.i.4: ; preds = %__barray_check_boun %not_max.not.not.i.i.5 = icmp eq i64 %qalloc.i.i.5, -1 br i1 %not_max.not.not.i.i.5, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.5 -__barray_check_bounds.exit.i.5: ; preds = %cond_exit_20.i.4 +__barray_check_bounds.exit.i.5: ; preds = %__barray_mask_return.exit.i.4 tail call void @___reset(i64 %qalloc.i.i.5) %22 = load i64, ptr %2, align 4 %23 = and i64 %22, 32 %.not4 = icmp eq i64 %23, 0 - br i1 %.not4, label %panic.i.i, label %cond_exit_20.i.5 + br i1 %.not4, label %panic.i.i, label %__barray_mask_return.exit.i.5 -cond_exit_20.i.5: ; preds = %__barray_check_bounds.exit.i.5 +__barray_mask_return.exit.i.5: ; preds = %__barray_check_bounds.exit.i.5 %24 = and i64 %22, -33 store i64 %24, ptr %2, align 4 %25 = getelementptr inbounds nuw i8, ptr %1, i64 40 @@ -139,14 +139,14 @@ cond_exit_20.i.5: ; preds = %__barray_check_boun %not_max.not.not.i.i.6 = icmp eq i64 %qalloc.i.i.6, -1 br i1 %not_max.not.not.i.i.6, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.6 -__barray_check_bounds.exit.i.6: ; preds = %cond_exit_20.i.5 +__barray_check_bounds.exit.i.6: ; preds = %__barray_mask_return.exit.i.5 tail call void @___reset(i64 %qalloc.i.i.6) %26 = load i64, ptr %2, align 4 %27 = and i64 %26, 64 %.not5 = icmp eq i64 %27, 0 - br i1 %.not5, label %panic.i.i, label %cond_exit_20.i.6 + br i1 %.not5, label %panic.i.i, label %__barray_mask_return.exit.i.6 -cond_exit_20.i.6: ; preds = %__barray_check_bounds.exit.i.6 +__barray_mask_return.exit.i.6: ; preds = %__barray_check_bounds.exit.i.6 %28 = and i64 %26, -65 store i64 %28, ptr %2, align 4 %29 = getelementptr inbounds nuw i8, ptr %1, i64 48 @@ -155,14 +155,14 @@ cond_exit_20.i.6: ; preds = %__barray_check_boun %not_max.not.not.i.i.7 = icmp eq i64 %qalloc.i.i.7, -1 br i1 %not_max.not.not.i.i.7, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.7 -__barray_check_bounds.exit.i.7: ; preds = %cond_exit_20.i.6 +__barray_check_bounds.exit.i.7: ; preds = %__barray_mask_return.exit.i.6 tail call void @___reset(i64 %qalloc.i.i.7) %30 = load i64, ptr %2, align 4 %31 = and i64 %30, 128 %.not6 = icmp eq i64 %31, 0 - br i1 %.not6, label %panic.i.i, label %cond_exit_20.i.7 + br i1 %.not6, label %panic.i.i, label %__barray_mask_return.exit.i.7 -cond_exit_20.i.7: ; preds = %__barray_check_bounds.exit.i.7 +__barray_mask_return.exit.i.7: ; preds = %__barray_check_bounds.exit.i.7 %32 = and i64 %30, -129 store i64 %32, ptr %2, align 4 %33 = getelementptr inbounds nuw i8, ptr %1, i64 56 @@ -171,14 +171,14 @@ cond_exit_20.i.7: ; preds = %__barray_check_boun %not_max.not.not.i.i.8 = icmp eq i64 %qalloc.i.i.8, -1 br i1 %not_max.not.not.i.i.8, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.8 -__barray_check_bounds.exit.i.8: ; preds = %cond_exit_20.i.7 +__barray_check_bounds.exit.i.8: ; preds = %__barray_mask_return.exit.i.7 tail call void @___reset(i64 %qalloc.i.i.8) %34 = load i64, ptr %2, align 4 %35 = and i64 %34, 256 %.not7 = icmp eq i64 %35, 0 - br i1 %.not7, label %panic.i.i, label %cond_exit_20.i.8 + br i1 %.not7, label %panic.i.i, label %__barray_mask_return.exit.i.8 -cond_exit_20.i.8: ; preds = %__barray_check_bounds.exit.i.8 +__barray_mask_return.exit.i.8: ; preds = %__barray_check_bounds.exit.i.8 %36 = and i64 %34, -257 store i64 %36, ptr %2, align 4 %37 = getelementptr inbounds nuw i8, ptr %1, i64 64 @@ -187,14 +187,14 @@ cond_exit_20.i.8: ; preds = %__barray_check_boun %not_max.not.not.i.i.9 = icmp eq i64 %qalloc.i.i.9, -1 br i1 %not_max.not.not.i.i.9, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.9 -__barray_check_bounds.exit.i.9: ; preds = %cond_exit_20.i.8 +__barray_check_bounds.exit.i.9: ; preds = %__barray_mask_return.exit.i.8 tail call void @___reset(i64 %qalloc.i.i.9) %38 = load i64, ptr %2, align 4 %39 = and i64 %38, 512 %.not8 = icmp eq i64 %39, 0 - br i1 %.not8, label %panic.i.i, label %cond_exit_20.i.9 + br i1 %.not8, label %panic.i.i, label %__barray_mask_return.exit.i.9 -cond_exit_20.i.9: ; preds = %__barray_check_bounds.exit.i.9 +__barray_mask_return.exit.i.9: ; preds = %__barray_check_bounds.exit.i.9 %40 = and i64 %38, -513 store i64 %40, ptr %2, align 4 %41 = getelementptr inbounds nuw i8, ptr %1, i64 72 @@ -206,11 +206,11 @@ cond_exit_20.i.9: ; preds = %__barray_check_boun %43 = trunc i64 %42 to i1 br i1 %43, label %panic.i238.i, label %__barray_mask_borrow.exit.i -panic.i238.i: ; preds = %cond_exit_20.i.9 +panic.i238.i: ; preds = %__barray_mask_return.exit.i.9 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_mask_borrow.exit.i: ; preds = %cond_exit_20.i.9 +__barray_mask_borrow.exit.i: ; preds = %__barray_mask_return.exit.i.9 %44 = or disjoint i64 %42, 1 store i64 %44, ptr %2, align 4 %45 = load i64, ptr %1, align 4 @@ -243,8 +243,8 @@ __barray_mask_borrow.exit242.i: ; preds = %__barray_mask_retur tail call void @___rxy(i64 %52, double 0x400921FB54442D18, double 0.000000e+00) %53 = load i64, ptr %2, align 4 %54 = and i64 %53, 4 - %.not268.i = icmp eq i64 %54, 0 - br i1 %.not268.i, label %panic.i243.i, label %__barray_mask_return.exit244.i + %.not265.i = icmp eq i64 %54, 0 + br i1 %.not265.i, label %panic.i243.i, label %__barray_mask_return.exit244.i panic.i243.i: ; preds = %__barray_mask_borrow.exit242.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") @@ -256,8 +256,8 @@ __barray_mask_return.exit244.i: ; preds = %__barray_mask_borro store i64 %52, ptr %13, align 4 %56 = load i64, ptr %2, align 4 %57 = and i64 %56, 8 - %.not269.i = icmp eq i64 %57, 0 - br i1 %.not269.i, label %__barray_mask_borrow.exit246.i, label %panic.i245.i + %.not266.i = icmp eq i64 %57, 0 + br i1 %.not266.i, label %__barray_mask_borrow.exit246.i, label %panic.i245.i panic.i245.i: ; preds = %__barray_mask_return.exit244.i tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") @@ -270,8 +270,8 @@ __barray_mask_borrow.exit246.i: ; preds = %__barray_mask_retur tail call void @___rxy(i64 %59, double 0x400921FB54442D18, double 0.000000e+00) %60 = load i64, ptr %2, align 4 %61 = and i64 %60, 8 - %.not270.i = icmp eq i64 %61, 0 - br i1 %.not270.i, label %panic.i247.i, label %__barray_mask_return.exit248.i + %.not267.i = icmp eq i64 %61, 0 + br i1 %.not267.i, label %panic.i247.i, label %__barray_mask_return.exit248.i panic.i247.i: ; preds = %__barray_mask_borrow.exit246.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") @@ -283,8 +283,8 @@ __barray_mask_return.exit248.i: ; preds = %__barray_mask_borro store i64 %59, ptr %17, align 4 %63 = load i64, ptr %2, align 4 %64 = and i64 %63, 512 - %.not271.i = icmp eq i64 %64, 0 - br i1 %.not271.i, label %__barray_mask_borrow.exit250.i, label %panic.i249.i + %.not268.i = icmp eq i64 %64, 0 + br i1 %.not268.i, label %__barray_mask_borrow.exit250.i, label %panic.i249.i panic.i249.i: ; preds = %__barray_mask_return.exit248.i tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") @@ -297,8 +297,8 @@ __barray_mask_borrow.exit250.i: ; preds = %__barray_mask_retur tail call void @___rxy(i64 %66, double 0x400921FB54442D18, double 0.000000e+00) %67 = load i64, ptr %2, align 4 %68 = and i64 %67, 512 - %.not272.i = icmp eq i64 %68, 0 - br i1 %.not272.i, label %panic.i251.i, label %__barray_mask_return.exit252.i + %.not269.i = icmp eq i64 %68, 0 + br i1 %.not269.i, label %panic.i251.i, label %__barray_mask_return.exit252.i panic.i251.i: ; preds = %__barray_mask_borrow.exit250.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") @@ -314,7 +314,7 @@ __barray_mask_return.exit252.i: ; preds = %__barray_mask_borro store i64 -1, ptr %72, align 1 br label %__barray_check_bounds.exit.i.i.i -73: ; preds = %loop_body.i.i +73: ; preds = %__barray_mask_return.exit.i.i %74 = lshr i64 %.fca.2.extract82.i.i.i, 6 %75 = getelementptr i64, ptr %.fca.1.extract81.i.i.i, i64 %74 %76 = load i64, ptr %75, align 4 @@ -355,16 +355,17 @@ mask_block_err.i.i.i.i: ; preds = %mask_block_ok.i.i.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit.i.i.i: ; preds = %loop_body.i.i, %__barray_mask_return.exit252.i - %.fca.2.extract82.i187.i.i = phi i64 [ 0, %__barray_mask_return.exit252.i ], [ %.fca.2.extract82.i.i.i, %loop_body.i.i ] - %.fca.1.extract81.i186.i.i = phi ptr [ %2, %__barray_mask_return.exit252.i ], [ %.fca.1.extract81.i.i.i, %loop_body.i.i ] - %.fca.0.extract80.i185.i.i = phi ptr [ %1, %__barray_mask_return.exit252.i ], [ %.fca.0.extract80.i.i.i, %loop_body.i.i ] - %"306_0.sroa.15.0184.i.i" = phi i64 [ 0, %__barray_mask_return.exit252.i ], [ %95, %loop_body.i.i ] - %.pn165183.i.i = phi { { ptr, ptr, i64 }, i64 } [ %70, %__barray_mask_return.exit252.i ], [ %110, %loop_body.i.i ] - %95 = add nuw nsw i64 %"306_0.sroa.15.0184.i.i", 1 - %96 = add i64 %"306_0.sroa.15.0184.i.i", %.fca.2.extract82.i187.i.i +__barray_check_bounds.exit.i.i.i: ; preds = %__barray_mask_return.exit.i.i, %__barray_mask_return.exit252.i + %.fca.2.extract82.i175.i.i = phi i64 [ 0, %__barray_mask_return.exit252.i ], [ %.fca.2.extract82.i.i.i, %__barray_mask_return.exit.i.i ] + %.fca.1.extract81.i174.i.i = phi ptr [ %2, %__barray_mask_return.exit252.i ], [ %.fca.1.extract81.i.i.i, %__barray_mask_return.exit.i.i ] + %.fca.0.extract80.i173.i.i = phi ptr [ %1, %__barray_mask_return.exit252.i ], [ %.fca.0.extract80.i.i.i, %__barray_mask_return.exit.i.i ] + %"306_0.sroa.15.0172.i.i" = phi i64 [ 0, %__barray_mask_return.exit252.i ], [ %95, %__barray_mask_return.exit.i.i ] + %.pn.i.i = phi { { ptr, ptr, i64 }, i64 } [ %70, %__barray_mask_return.exit252.i ], [ %.pn171.i.i, %__barray_mask_return.exit.i.i ] + %.pn171.i.i = insertvalue { { ptr, ptr, i64 }, i64 } %.pn.i.i, i64 %"306_0.sroa.15.0172.i.i", 1 + %95 = add nuw nsw i64 %"306_0.sroa.15.0172.i.i", 1 + %96 = add i64 %"306_0.sroa.15.0172.i.i", %.fca.2.extract82.i175.i.i %97 = lshr i64 %96, 6 - %98 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i186.i.i, i64 %97 + %98 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i174.i.i, i64 %97 %99 = load i64, ptr %98, align 4 %100 = and i64 %96, 63 %101 = lshr i64 %99, %100 @@ -379,242 +380,241 @@ __barray_check_bounds.exit.i.i: ; preds = %__barray_check_boun %103 = shl nuw i64 1, %100 %104 = xor i64 %103, %99 store i64 %104, ptr %98, align 4 - %105 = getelementptr inbounds i64, ptr %.fca.0.extract80.i185.i.i, i64 %96 + %105 = getelementptr inbounds i64, ptr %.fca.0.extract80.i173.i.i, i64 %96 %106 = load i64, ptr %105, align 4 %lazy_measure.i.i = tail call i64 @___lazy_measure(i64 %106) tail call void @___qfree(i64 %106) %107 = load i64, ptr %72, align 4 - %108 = lshr i64 %107, %"306_0.sroa.15.0184.i.i" + %108 = lshr i64 %107, %"306_0.sroa.15.0172.i.i" %109 = trunc i64 %108 to i1 - br i1 %109, label %loop_body.i.i, label %panic.i.i.i + br i1 %109, label %__barray_mask_return.exit.i.i, label %panic.i.i.i panic.i.i.i: ; preds = %__barray_check_bounds.exit.i.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -loop_body.i.i: ; preds = %__barray_check_bounds.exit.i.i +__barray_mask_return.exit.i.i: ; preds = %__barray_check_bounds.exit.i.i %"371_054.fca.1.insert.i.i" = insertvalue { i1, i64, i1 } { i1 true, i64 poison, i1 undef }, i64 %lazy_measure.i.i, 1 %"371_054.fca.2.insert.i.i" = insertvalue { i1, i64, i1 } %"371_054.fca.1.insert.i.i", i1 undef, 2 - %110 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn165183.i.i, i64 %95, 1 - %111 = shl nuw nsw i64 1, %"306_0.sroa.15.0184.i.i" - %112 = xor i64 %107, %111 - store i64 %112, ptr %72, align 4 - %113 = getelementptr inbounds nuw { i1, i64, i1 }, ptr %71, i64 %"306_0.sroa.15.0184.i.i" - store { i1, i64, i1 } %"371_054.fca.2.insert.i.i", ptr %113, align 4 - %114 = extractvalue { { ptr, ptr, i64 }, i64 } %.pn165183.i.i, 0 - %.fca.0.extract80.i.i.i = extractvalue { ptr, ptr, i64 } %114, 0 - %.fca.1.extract81.i.i.i = extractvalue { ptr, ptr, i64 } %114, 1 - %.fca.2.extract82.i.i.i = extractvalue { ptr, ptr, i64 } %114, 2 - %exitcond.not.i.i = icmp eq i64 %95, 10 - br i1 %exitcond.not.i.i, label %73, label %__barray_check_bounds.exit.i.i.i + %110 = shl nuw nsw i64 1, %"306_0.sroa.15.0172.i.i" + %111 = xor i64 %107, %110 + store i64 %111, ptr %72, align 4 + %112 = getelementptr inbounds nuw { i1, i64, i1 }, ptr %71, i64 %"306_0.sroa.15.0172.i.i" + store { i1, i64, i1 } %"371_054.fca.2.insert.i.i", ptr %112, align 4 + %113 = extractvalue { { ptr, ptr, i64 }, i64 } %.pn.i.i, 0 + %.fca.0.extract80.i.i.i = extractvalue { ptr, ptr, i64 } %113, 0 + %.fca.1.extract81.i.i.i = extractvalue { ptr, ptr, i64 } %113, 1 + %.fca.2.extract82.i.i.i = extractvalue { ptr, ptr, i64 } %113, 2 + %.not.i.i = icmp eq i64 %"306_0.sroa.15.0172.i.i", 9 + br i1 %.not.i.i, label %73, label %__barray_check_bounds.exit.i.i.i "__hugr__.$measure_array$$n(10).280.exit.i": ; preds = %91, %73 tail call void @heap_free(ptr %.fca.0.extract80.i.i.i) tail call void @heap_free(ptr nonnull %.fca.1.extract81.i.i.i) - %115 = load i64, ptr %72, align 4 - %116 = trunc i64 %115 to i1 - br i1 %116, label %cond_exit_89.thread.i, label %__barray_mask_borrow.exit259.i + %114 = load i64, ptr %72, align 4 + %115 = trunc i64 %114 to i1 + br i1 %115, label %cond_exit_89.thread.i, label %__barray_mask_borrow.exit258.i mask_block_err.i.i: ; preds = %cond_exit_89.thread.9.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_mask_borrow.exit259.i: ; preds = %"__hugr__.$measure_array$$n(10).280.exit.i" - %117 = or disjoint i64 %115, 1 - store i64 %117, ptr %72, align 4 - %118 = load { i1, i64, i1 }, ptr %71, align 4 - %.fca.0.extract167.i = extractvalue { i1, i64, i1 } %118, 0 +__barray_mask_borrow.exit258.i: ; preds = %"__hugr__.$measure_array$$n(10).280.exit.i" + %116 = or disjoint i64 %114, 1 + store i64 %116, ptr %72, align 4 + %117 = load { i1, i64, i1 }, ptr %71, align 4 + %.fca.0.extract167.i = extractvalue { i1, i64, i1 } %117, 0 br i1 %.fca.0.extract167.i, label %cond_392_case_1.i, label %cond_exit_89.thread.i -cond_exit_89.thread.i: ; preds = %cond_392_case_1.i, %__barray_mask_borrow.exit259.i, %"__hugr__.$measure_array$$n(10).280.exit.i" - %119 = phi i64 [ %.pre.i, %cond_392_case_1.i ], [ %117, %__barray_mask_borrow.exit259.i ], [ %115, %"__hugr__.$measure_array$$n(10).280.exit.i" ] - %120 = and i64 %119, 2 - %.not290.i = icmp eq i64 %120, 0 - br i1 %.not290.i, label %__barray_mask_borrow.exit259.1.i, label %cond_exit_89.thread.1.i - -__barray_mask_borrow.exit259.1.i: ; preds = %cond_exit_89.thread.i - %121 = or disjoint i64 %119, 2 - store i64 %121, ptr %72, align 4 - %122 = getelementptr inbounds nuw i8, ptr %71, i64 24 - %123 = load { i1, i64, i1 }, ptr %122, align 4 - %.fca.0.extract167.1.i = extractvalue { i1, i64, i1 } %123, 0 +cond_exit_89.thread.i: ; preds = %cond_392_case_1.i, %__barray_mask_borrow.exit258.i, %"__hugr__.$measure_array$$n(10).280.exit.i" + %118 = phi i64 [ %.pre.i, %cond_392_case_1.i ], [ %116, %__barray_mask_borrow.exit258.i ], [ %114, %"__hugr__.$measure_array$$n(10).280.exit.i" ] + %119 = and i64 %118, 2 + %.not287.i = icmp eq i64 %119, 0 + br i1 %.not287.i, label %__barray_mask_borrow.exit258.1.i, label %cond_exit_89.thread.1.i + +__barray_mask_borrow.exit258.1.i: ; preds = %cond_exit_89.thread.i + %120 = or disjoint i64 %118, 2 + store i64 %120, ptr %72, align 4 + %121 = getelementptr inbounds nuw i8, ptr %71, i64 24 + %122 = load { i1, i64, i1 }, ptr %121, align 4 + %.fca.0.extract167.1.i = extractvalue { i1, i64, i1 } %122, 0 br i1 %.fca.0.extract167.1.i, label %cond_392_case_1.1.i, label %cond_exit_89.thread.1.i -cond_392_case_1.1.i: ; preds = %__barray_mask_borrow.exit259.1.i - %.fca.1.extract.1.i = extractvalue { i1, i64, i1 } %123, 1 +cond_392_case_1.1.i: ; preds = %__barray_mask_borrow.exit258.1.i + %.fca.1.extract.1.i = extractvalue { i1, i64, i1 } %122, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.1.i) - %.pre281.i = load i64, ptr %72, align 4 + %.pre278.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.1.i -cond_exit_89.thread.1.i: ; preds = %cond_392_case_1.1.i, %__barray_mask_borrow.exit259.1.i, %cond_exit_89.thread.i - %124 = phi i64 [ %.pre281.i, %cond_392_case_1.1.i ], [ %121, %__barray_mask_borrow.exit259.1.i ], [ %119, %cond_exit_89.thread.i ] - %125 = and i64 %124, 4 - %.not291.i = icmp eq i64 %125, 0 - br i1 %.not291.i, label %__barray_mask_borrow.exit259.2.i, label %cond_exit_89.thread.2.i - -__barray_mask_borrow.exit259.2.i: ; preds = %cond_exit_89.thread.1.i - %126 = or disjoint i64 %124, 4 - store i64 %126, ptr %72, align 4 - %127 = getelementptr inbounds nuw i8, ptr %71, i64 48 - %128 = load { i1, i64, i1 }, ptr %127, align 4 - %.fca.0.extract167.2.i = extractvalue { i1, i64, i1 } %128, 0 +cond_exit_89.thread.1.i: ; preds = %cond_392_case_1.1.i, %__barray_mask_borrow.exit258.1.i, %cond_exit_89.thread.i + %123 = phi i64 [ %.pre278.i, %cond_392_case_1.1.i ], [ %120, %__barray_mask_borrow.exit258.1.i ], [ %118, %cond_exit_89.thread.i ] + %124 = and i64 %123, 4 + %.not288.i = icmp eq i64 %124, 0 + br i1 %.not288.i, label %__barray_mask_borrow.exit258.2.i, label %cond_exit_89.thread.2.i + +__barray_mask_borrow.exit258.2.i: ; preds = %cond_exit_89.thread.1.i + %125 = or disjoint i64 %123, 4 + store i64 %125, ptr %72, align 4 + %126 = getelementptr inbounds nuw i8, ptr %71, i64 48 + %127 = load { i1, i64, i1 }, ptr %126, align 4 + %.fca.0.extract167.2.i = extractvalue { i1, i64, i1 } %127, 0 br i1 %.fca.0.extract167.2.i, label %cond_392_case_1.2.i, label %cond_exit_89.thread.2.i -cond_392_case_1.2.i: ; preds = %__barray_mask_borrow.exit259.2.i - %.fca.1.extract.2.i = extractvalue { i1, i64, i1 } %128, 1 +cond_392_case_1.2.i: ; preds = %__barray_mask_borrow.exit258.2.i + %.fca.1.extract.2.i = extractvalue { i1, i64, i1 } %127, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.2.i) - %.pre282.i = load i64, ptr %72, align 4 + %.pre279.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.2.i -cond_exit_89.thread.2.i: ; preds = %cond_392_case_1.2.i, %__barray_mask_borrow.exit259.2.i, %cond_exit_89.thread.1.i - %129 = phi i64 [ %.pre282.i, %cond_392_case_1.2.i ], [ %126, %__barray_mask_borrow.exit259.2.i ], [ %124, %cond_exit_89.thread.1.i ] - %130 = and i64 %129, 8 - %.not292.i = icmp eq i64 %130, 0 - br i1 %.not292.i, label %__barray_mask_borrow.exit259.3.i, label %cond_exit_89.thread.3.i - -__barray_mask_borrow.exit259.3.i: ; preds = %cond_exit_89.thread.2.i - %131 = or disjoint i64 %129, 8 - store i64 %131, ptr %72, align 4 - %132 = getelementptr inbounds nuw i8, ptr %71, i64 72 - %133 = load { i1, i64, i1 }, ptr %132, align 4 - %.fca.0.extract167.3.i = extractvalue { i1, i64, i1 } %133, 0 +cond_exit_89.thread.2.i: ; preds = %cond_392_case_1.2.i, %__barray_mask_borrow.exit258.2.i, %cond_exit_89.thread.1.i + %128 = phi i64 [ %.pre279.i, %cond_392_case_1.2.i ], [ %125, %__barray_mask_borrow.exit258.2.i ], [ %123, %cond_exit_89.thread.1.i ] + %129 = and i64 %128, 8 + %.not289.i = icmp eq i64 %129, 0 + br i1 %.not289.i, label %__barray_mask_borrow.exit258.3.i, label %cond_exit_89.thread.3.i + +__barray_mask_borrow.exit258.3.i: ; preds = %cond_exit_89.thread.2.i + %130 = or disjoint i64 %128, 8 + store i64 %130, ptr %72, align 4 + %131 = getelementptr inbounds nuw i8, ptr %71, i64 72 + %132 = load { i1, i64, i1 }, ptr %131, align 4 + %.fca.0.extract167.3.i = extractvalue { i1, i64, i1 } %132, 0 br i1 %.fca.0.extract167.3.i, label %cond_392_case_1.3.i, label %cond_exit_89.thread.3.i -cond_392_case_1.3.i: ; preds = %__barray_mask_borrow.exit259.3.i - %.fca.1.extract.3.i = extractvalue { i1, i64, i1 } %133, 1 +cond_392_case_1.3.i: ; preds = %__barray_mask_borrow.exit258.3.i + %.fca.1.extract.3.i = extractvalue { i1, i64, i1 } %132, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.3.i) - %.pre283.i = load i64, ptr %72, align 4 + %.pre280.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.3.i -cond_exit_89.thread.3.i: ; preds = %cond_392_case_1.3.i, %__barray_mask_borrow.exit259.3.i, %cond_exit_89.thread.2.i - %134 = phi i64 [ %.pre283.i, %cond_392_case_1.3.i ], [ %131, %__barray_mask_borrow.exit259.3.i ], [ %129, %cond_exit_89.thread.2.i ] - %135 = and i64 %134, 16 - %.not293.i = icmp eq i64 %135, 0 - br i1 %.not293.i, label %__barray_mask_borrow.exit259.4.i, label %cond_exit_89.thread.4.i - -__barray_mask_borrow.exit259.4.i: ; preds = %cond_exit_89.thread.3.i - %136 = or disjoint i64 %134, 16 - store i64 %136, ptr %72, align 4 - %137 = getelementptr inbounds nuw i8, ptr %71, i64 96 - %138 = load { i1, i64, i1 }, ptr %137, align 4 - %.fca.0.extract167.4.i = extractvalue { i1, i64, i1 } %138, 0 +cond_exit_89.thread.3.i: ; preds = %cond_392_case_1.3.i, %__barray_mask_borrow.exit258.3.i, %cond_exit_89.thread.2.i + %133 = phi i64 [ %.pre280.i, %cond_392_case_1.3.i ], [ %130, %__barray_mask_borrow.exit258.3.i ], [ %128, %cond_exit_89.thread.2.i ] + %134 = and i64 %133, 16 + %.not290.i = icmp eq i64 %134, 0 + br i1 %.not290.i, label %__barray_mask_borrow.exit258.4.i, label %cond_exit_89.thread.4.i + +__barray_mask_borrow.exit258.4.i: ; preds = %cond_exit_89.thread.3.i + %135 = or disjoint i64 %133, 16 + store i64 %135, ptr %72, align 4 + %136 = getelementptr inbounds nuw i8, ptr %71, i64 96 + %137 = load { i1, i64, i1 }, ptr %136, align 4 + %.fca.0.extract167.4.i = extractvalue { i1, i64, i1 } %137, 0 br i1 %.fca.0.extract167.4.i, label %cond_392_case_1.4.i, label %cond_exit_89.thread.4.i -cond_392_case_1.4.i: ; preds = %__barray_mask_borrow.exit259.4.i - %.fca.1.extract.4.i = extractvalue { i1, i64, i1 } %138, 1 +cond_392_case_1.4.i: ; preds = %__barray_mask_borrow.exit258.4.i + %.fca.1.extract.4.i = extractvalue { i1, i64, i1 } %137, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.4.i) - %.pre284.i = load i64, ptr %72, align 4 + %.pre281.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.4.i -cond_exit_89.thread.4.i: ; preds = %cond_392_case_1.4.i, %__barray_mask_borrow.exit259.4.i, %cond_exit_89.thread.3.i - %139 = phi i64 [ %.pre284.i, %cond_392_case_1.4.i ], [ %136, %__barray_mask_borrow.exit259.4.i ], [ %134, %cond_exit_89.thread.3.i ] - %140 = and i64 %139, 32 - %.not294.i = icmp eq i64 %140, 0 - br i1 %.not294.i, label %__barray_mask_borrow.exit259.5.i, label %cond_exit_89.thread.5.i - -__barray_mask_borrow.exit259.5.i: ; preds = %cond_exit_89.thread.4.i - %141 = or disjoint i64 %139, 32 - store i64 %141, ptr %72, align 4 - %142 = getelementptr inbounds nuw i8, ptr %71, i64 120 - %143 = load { i1, i64, i1 }, ptr %142, align 4 - %.fca.0.extract167.5.i = extractvalue { i1, i64, i1 } %143, 0 +cond_exit_89.thread.4.i: ; preds = %cond_392_case_1.4.i, %__barray_mask_borrow.exit258.4.i, %cond_exit_89.thread.3.i + %138 = phi i64 [ %.pre281.i, %cond_392_case_1.4.i ], [ %135, %__barray_mask_borrow.exit258.4.i ], [ %133, %cond_exit_89.thread.3.i ] + %139 = and i64 %138, 32 + %.not291.i = icmp eq i64 %139, 0 + br i1 %.not291.i, label %__barray_mask_borrow.exit258.5.i, label %cond_exit_89.thread.5.i + +__barray_mask_borrow.exit258.5.i: ; preds = %cond_exit_89.thread.4.i + %140 = or disjoint i64 %138, 32 + store i64 %140, ptr %72, align 4 + %141 = getelementptr inbounds nuw i8, ptr %71, i64 120 + %142 = load { i1, i64, i1 }, ptr %141, align 4 + %.fca.0.extract167.5.i = extractvalue { i1, i64, i1 } %142, 0 br i1 %.fca.0.extract167.5.i, label %cond_392_case_1.5.i, label %cond_exit_89.thread.5.i -cond_392_case_1.5.i: ; preds = %__barray_mask_borrow.exit259.5.i - %.fca.1.extract.5.i = extractvalue { i1, i64, i1 } %143, 1 +cond_392_case_1.5.i: ; preds = %__barray_mask_borrow.exit258.5.i + %.fca.1.extract.5.i = extractvalue { i1, i64, i1 } %142, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.5.i) - %.pre285.i = load i64, ptr %72, align 4 + %.pre282.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.5.i -cond_exit_89.thread.5.i: ; preds = %cond_392_case_1.5.i, %__barray_mask_borrow.exit259.5.i, %cond_exit_89.thread.4.i - %144 = phi i64 [ %.pre285.i, %cond_392_case_1.5.i ], [ %141, %__barray_mask_borrow.exit259.5.i ], [ %139, %cond_exit_89.thread.4.i ] - %145 = and i64 %144, 64 - %.not295.i = icmp eq i64 %145, 0 - br i1 %.not295.i, label %__barray_mask_borrow.exit259.6.i, label %cond_exit_89.thread.6.i - -__barray_mask_borrow.exit259.6.i: ; preds = %cond_exit_89.thread.5.i - %146 = or disjoint i64 %144, 64 - store i64 %146, ptr %72, align 4 - %147 = getelementptr inbounds nuw i8, ptr %71, i64 144 - %148 = load { i1, i64, i1 }, ptr %147, align 4 - %.fca.0.extract167.6.i = extractvalue { i1, i64, i1 } %148, 0 +cond_exit_89.thread.5.i: ; preds = %cond_392_case_1.5.i, %__barray_mask_borrow.exit258.5.i, %cond_exit_89.thread.4.i + %143 = phi i64 [ %.pre282.i, %cond_392_case_1.5.i ], [ %140, %__barray_mask_borrow.exit258.5.i ], [ %138, %cond_exit_89.thread.4.i ] + %144 = and i64 %143, 64 + %.not292.i = icmp eq i64 %144, 0 + br i1 %.not292.i, label %__barray_mask_borrow.exit258.6.i, label %cond_exit_89.thread.6.i + +__barray_mask_borrow.exit258.6.i: ; preds = %cond_exit_89.thread.5.i + %145 = or disjoint i64 %143, 64 + store i64 %145, ptr %72, align 4 + %146 = getelementptr inbounds nuw i8, ptr %71, i64 144 + %147 = load { i1, i64, i1 }, ptr %146, align 4 + %.fca.0.extract167.6.i = extractvalue { i1, i64, i1 } %147, 0 br i1 %.fca.0.extract167.6.i, label %cond_392_case_1.6.i, label %cond_exit_89.thread.6.i -cond_392_case_1.6.i: ; preds = %__barray_mask_borrow.exit259.6.i - %.fca.1.extract.6.i = extractvalue { i1, i64, i1 } %148, 1 +cond_392_case_1.6.i: ; preds = %__barray_mask_borrow.exit258.6.i + %.fca.1.extract.6.i = extractvalue { i1, i64, i1 } %147, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.6.i) - %.pre286.i = load i64, ptr %72, align 4 + %.pre283.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.6.i -cond_exit_89.thread.6.i: ; preds = %cond_392_case_1.6.i, %__barray_mask_borrow.exit259.6.i, %cond_exit_89.thread.5.i - %149 = phi i64 [ %.pre286.i, %cond_392_case_1.6.i ], [ %146, %__barray_mask_borrow.exit259.6.i ], [ %144, %cond_exit_89.thread.5.i ] - %150 = and i64 %149, 128 - %.not296.i = icmp eq i64 %150, 0 - br i1 %.not296.i, label %__barray_mask_borrow.exit259.7.i, label %cond_exit_89.thread.7.i - -__barray_mask_borrow.exit259.7.i: ; preds = %cond_exit_89.thread.6.i - %151 = or disjoint i64 %149, 128 - store i64 %151, ptr %72, align 4 - %152 = getelementptr inbounds nuw i8, ptr %71, i64 168 - %153 = load { i1, i64, i1 }, ptr %152, align 4 - %.fca.0.extract167.7.i = extractvalue { i1, i64, i1 } %153, 0 +cond_exit_89.thread.6.i: ; preds = %cond_392_case_1.6.i, %__barray_mask_borrow.exit258.6.i, %cond_exit_89.thread.5.i + %148 = phi i64 [ %.pre283.i, %cond_392_case_1.6.i ], [ %145, %__barray_mask_borrow.exit258.6.i ], [ %143, %cond_exit_89.thread.5.i ] + %149 = and i64 %148, 128 + %.not293.i = icmp eq i64 %149, 0 + br i1 %.not293.i, label %__barray_mask_borrow.exit258.7.i, label %cond_exit_89.thread.7.i + +__barray_mask_borrow.exit258.7.i: ; preds = %cond_exit_89.thread.6.i + %150 = or disjoint i64 %148, 128 + store i64 %150, ptr %72, align 4 + %151 = getelementptr inbounds nuw i8, ptr %71, i64 168 + %152 = load { i1, i64, i1 }, ptr %151, align 4 + %.fca.0.extract167.7.i = extractvalue { i1, i64, i1 } %152, 0 br i1 %.fca.0.extract167.7.i, label %cond_392_case_1.7.i, label %cond_exit_89.thread.7.i -cond_392_case_1.7.i: ; preds = %__barray_mask_borrow.exit259.7.i - %.fca.1.extract.7.i = extractvalue { i1, i64, i1 } %153, 1 +cond_392_case_1.7.i: ; preds = %__barray_mask_borrow.exit258.7.i + %.fca.1.extract.7.i = extractvalue { i1, i64, i1 } %152, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.7.i) - %.pre287.i = load i64, ptr %72, align 4 + %.pre284.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.7.i -cond_exit_89.thread.7.i: ; preds = %cond_392_case_1.7.i, %__barray_mask_borrow.exit259.7.i, %cond_exit_89.thread.6.i - %154 = phi i64 [ %.pre287.i, %cond_392_case_1.7.i ], [ %151, %__barray_mask_borrow.exit259.7.i ], [ %149, %cond_exit_89.thread.6.i ] - %155 = and i64 %154, 256 - %.not297.i = icmp eq i64 %155, 0 - br i1 %.not297.i, label %__barray_mask_borrow.exit259.8.i, label %cond_exit_89.thread.8.i - -__barray_mask_borrow.exit259.8.i: ; preds = %cond_exit_89.thread.7.i - %156 = or disjoint i64 %154, 256 - store i64 %156, ptr %72, align 4 - %157 = getelementptr inbounds nuw i8, ptr %71, i64 192 - %158 = load { i1, i64, i1 }, ptr %157, align 4 - %.fca.0.extract167.8.i = extractvalue { i1, i64, i1 } %158, 0 +cond_exit_89.thread.7.i: ; preds = %cond_392_case_1.7.i, %__barray_mask_borrow.exit258.7.i, %cond_exit_89.thread.6.i + %153 = phi i64 [ %.pre284.i, %cond_392_case_1.7.i ], [ %150, %__barray_mask_borrow.exit258.7.i ], [ %148, %cond_exit_89.thread.6.i ] + %154 = and i64 %153, 256 + %.not294.i = icmp eq i64 %154, 0 + br i1 %.not294.i, label %__barray_mask_borrow.exit258.8.i, label %cond_exit_89.thread.8.i + +__barray_mask_borrow.exit258.8.i: ; preds = %cond_exit_89.thread.7.i + %155 = or disjoint i64 %153, 256 + store i64 %155, ptr %72, align 4 + %156 = getelementptr inbounds nuw i8, ptr %71, i64 192 + %157 = load { i1, i64, i1 }, ptr %156, align 4 + %.fca.0.extract167.8.i = extractvalue { i1, i64, i1 } %157, 0 br i1 %.fca.0.extract167.8.i, label %cond_392_case_1.8.i, label %cond_exit_89.thread.8.i -cond_392_case_1.8.i: ; preds = %__barray_mask_borrow.exit259.8.i - %.fca.1.extract.8.i = extractvalue { i1, i64, i1 } %158, 1 +cond_392_case_1.8.i: ; preds = %__barray_mask_borrow.exit258.8.i + %.fca.1.extract.8.i = extractvalue { i1, i64, i1 } %157, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.8.i) - %.pre288.i = load i64, ptr %72, align 4 + %.pre285.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.8.i -cond_exit_89.thread.8.i: ; preds = %cond_392_case_1.8.i, %__barray_mask_borrow.exit259.8.i, %cond_exit_89.thread.7.i - %159 = phi i64 [ %.pre288.i, %cond_392_case_1.8.i ], [ %156, %__barray_mask_borrow.exit259.8.i ], [ %154, %cond_exit_89.thread.7.i ] - %160 = and i64 %159, 512 - %.not298.i = icmp eq i64 %160, 0 - br i1 %.not298.i, label %__barray_mask_borrow.exit259.9.i, label %cond_exit_89.thread.9.i - -__barray_mask_borrow.exit259.9.i: ; preds = %cond_exit_89.thread.8.i - %161 = or disjoint i64 %159, 512 - store i64 %161, ptr %72, align 4 - %162 = getelementptr inbounds nuw i8, ptr %71, i64 216 - %163 = load { i1, i64, i1 }, ptr %162, align 4 - %.fca.0.extract167.9.i = extractvalue { i1, i64, i1 } %163, 0 +cond_exit_89.thread.8.i: ; preds = %cond_392_case_1.8.i, %__barray_mask_borrow.exit258.8.i, %cond_exit_89.thread.7.i + %158 = phi i64 [ %.pre285.i, %cond_392_case_1.8.i ], [ %155, %__barray_mask_borrow.exit258.8.i ], [ %153, %cond_exit_89.thread.7.i ] + %159 = and i64 %158, 512 + %.not295.i = icmp eq i64 %159, 0 + br i1 %.not295.i, label %__barray_mask_borrow.exit258.9.i, label %cond_exit_89.thread.9.i + +__barray_mask_borrow.exit258.9.i: ; preds = %cond_exit_89.thread.8.i + %160 = or disjoint i64 %158, 512 + store i64 %160, ptr %72, align 4 + %161 = getelementptr inbounds nuw i8, ptr %71, i64 216 + %162 = load { i1, i64, i1 }, ptr %161, align 4 + %.fca.0.extract167.9.i = extractvalue { i1, i64, i1 } %162, 0 br i1 %.fca.0.extract167.9.i, label %cond_392_case_1.9.i, label %cond_exit_89.thread.9.i -cond_392_case_1.9.i: ; preds = %__barray_mask_borrow.exit259.9.i - %.fca.1.extract.9.i = extractvalue { i1, i64, i1 } %163, 1 +cond_392_case_1.9.i: ; preds = %__barray_mask_borrow.exit258.9.i + %.fca.1.extract.9.i = extractvalue { i1, i64, i1 } %162, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.9.i) - %.pre289.i = load i64, ptr %72, align 4 + %.pre286.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.9.i -cond_exit_89.thread.9.i: ; preds = %cond_392_case_1.9.i, %__barray_mask_borrow.exit259.9.i, %cond_exit_89.thread.8.i - %164 = phi i64 [ %.pre289.i, %cond_392_case_1.9.i ], [ %161, %__barray_mask_borrow.exit259.9.i ], [ %159, %cond_exit_89.thread.8.i ] - %165 = or i64 %164, -1024 - store i64 %165, ptr %72, align 4 - %166 = icmp eq i64 %165, -1 - br i1 %166, label %__hugr__.main.1.exit, label %mask_block_err.i.i +cond_exit_89.thread.9.i: ; preds = %cond_392_case_1.9.i, %__barray_mask_borrow.exit258.9.i, %cond_exit_89.thread.8.i + %163 = phi i64 [ %.pre286.i, %cond_392_case_1.9.i ], [ %160, %__barray_mask_borrow.exit258.9.i ], [ %158, %cond_exit_89.thread.8.i ] + %164 = or i64 %163, -1024 + store i64 %164, ptr %72, align 4 + %165 = icmp eq i64 %164, -1 + br i1 %165, label %__hugr__.main.1.exit, label %mask_block_err.i.i -cond_392_case_1.i: ; preds = %__barray_mask_borrow.exit259.i - %.fca.1.extract.i = extractvalue { i1, i64, i1 } %118, 1 +cond_392_case_1.i: ; preds = %__barray_mask_borrow.exit258.i + %.fca.1.extract.i = extractvalue { i1, i64, i1 } %117, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.i) %.pre.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.i @@ -622,8 +622,8 @@ cond_392_case_1.i: ; preds = %__barray_mask_borro __hugr__.main.1.exit: ; preds = %cond_exit_89.thread.9.i tail call void @heap_free(ptr %71) tail call void @heap_free(ptr nonnull %72) - %167 = tail call i64 @teardown() - ret i64 %167 + %166 = tail call i64 @teardown() + ret i64 %166 } declare void @setup(i64) local_unnamed_addr diff --git a/qis-compiler/rust/gpu.rs b/qis-compiler/rust/gpu.rs index 1c5bdc716..c8ba65661 100644 --- a/qis-compiler/rust/gpu.rs +++ b/qis-compiler/rust/gpu.rs @@ -1010,7 +1010,7 @@ mod test { .add_float_extensions() .add_extension(GpuCodegen) }); - let hugr = single_op_hugr(op.into()); + let mut hugr = single_op_hugr(op.into()); check_emission!(hugr, llvm_ctx); } } diff --git a/qis-compiler/rust/lib.rs b/qis-compiler/rust/lib.rs index a94eb19bf..9ca2cd084 100644 --- a/qis-compiler/rust/lib.rs +++ b/qis-compiler/rust/lib.rs @@ -5,7 +5,7 @@ use anyhow::{Result, anyhow}; use hugr::envelope::EnvelopeConfig; use hugr::llvm::CodegenExtsBuilder; use hugr::llvm::custom::CodegenExtsMap; -use hugr::llvm::emit::{EmitHugr, Namer}; +use hugr::llvm::emit::{EmitHugr, Namer, debug_info::DebugInfoContext}; use hugr::llvm::extension::int::IntCodegenExtension; use hugr::llvm::utils::fat::FatExt as _; use inkwell::OptimizationLevel; @@ -134,11 +134,12 @@ fn get_hugr_llvm_module<'c, 'hugr, 'a: 'c>( hugr: &'hugr Hugr, module_name: impl AsRef, exts: Rc>, -) -> Result> { + emit_debug: bool, +) -> Result<(Module<'c>, Option>)> { let module = context.create_module(module_name.as_ref()); let emit = EmitHugr::new(context, module, namer, exts); Ok(emit - .emit_module(hugr.try_fat(hugr.module_root()).unwrap())? + .emit_module(hugr.try_fat(hugr.module_root()).unwrap(), emit_debug)? .finish()) } @@ -181,7 +182,8 @@ fn get_module_with_std_exts<'c>( context: &'c Context, namer: Rc, hugr: &'c mut Hugr, -) -> Result> { + emit_debug: bool, +) -> Result<(Module<'c>, Option>)> { process_hugr(hugr)?; if let Some(filename) = &args.save_hugr { let file = fs::File::create(PathBuf::from(filename))?; @@ -193,6 +195,7 @@ fn get_module_with_std_exts<'c>( hugr, &args.name, Rc::new(codegen_extensions()), + emit_debug, ) } @@ -250,6 +253,7 @@ fn wrap_main<'c>( module: &Module<'c>, hugr_entry: &str, module_entry: &str, + mut maybe_di_ctx: Option<&mut DebugInfoContext<'c>>, ) -> Result<()> { let entry_ty = ctx.i64_type().fn_type(&[ctx.i64_type().into()], false); let entry_fun = module.add_function(module_entry, entry_ty, None); @@ -259,6 +263,11 @@ fn wrap_main<'c>( let teardown = module.add_function("teardown", teardown_type, None); let block = ctx.append_basic_block(entry_fun, "entry"); let builder = ctx.create_builder(); + + if let Some(ref mut di_ctx) = maybe_di_ctx { + di_ctx.set_compiler_generated(entry_fun, ctx, &builder)?; + } + builder.position_at_end(block); let initial_tc = entry_fun.get_nth_param(0).unwrap().into_int_value(); @@ -275,6 +284,10 @@ fn wrap_main<'c>( .ok_or_else(|| anyhow!("get_tc has no return value"))?; // Return the initial time cursor let _ = builder.build_return(Some(&tc))?; + + if let Some(di_ctx) = maybe_di_ctx { + di_ctx.unset_debug_loc(&builder)?; + } Ok(()) } @@ -315,6 +328,7 @@ fn compile<'c, 'hugr: 'c>( args: &CompileArgs, ctx: &'c Context, hugr: &'hugr mut Hugr, + emit_debug: bool, ) -> Result> { event!(Level::DEBUG, "starting primary compilation"); let namer = Rc::new(Namer::new("__hugr__.", true)); @@ -328,9 +342,15 @@ fn compile<'c, 'hugr: 'c>( let module_entry = args.entry.as_ref().map_or(LLVM_MAIN, |x| x.as_ref()); // Create a new LLVM module using hugr-llvm - let module = get_module_with_std_exts(args, ctx, namer, hugr)?; + let (module, mut maybe_di_ctx) = get_module_with_std_exts(args, ctx, namer, hugr, emit_debug)?; - wrap_main(ctx, &module, &hugr_entry, module_entry)?; + wrap_main( + ctx, + &module, + &hugr_entry, + module_entry, + maybe_di_ctx.as_mut(), + )?; let (data_layout, triple) = { ( @@ -354,7 +374,12 @@ fn compile<'c, 'hugr: 'c>( .add_global_metadata(key, &node) .map_err(ProcessErrs::from); } + + if let Some(di_ctx) = maybe_di_ctx.take() { + di_ctx.finish(); + } module.verify().map_err(Into::::into)?; + Ok(module) } @@ -436,11 +461,12 @@ mod selene_hugr_qis_compiler { /// Compile HUGR package to LLVM IR string #[pyfunction] - #[pyo3(signature = (pkg_bytes, opt_level=2, target_triple="native"))] + #[pyo3(signature = (pkg_bytes, opt_level=2, target_triple="native", emit_debug=false))] pub fn compile_to_llvm_ir( pkg_bytes: &[u8], opt_level: u32, target_triple: &str, + emit_debug: bool, ) -> PyResult { let opt = get_opt_level(opt_level)?; let target_machine = if target_triple == "native" { @@ -454,17 +480,19 @@ mod selene_hugr_qis_compiler { &CompileArgs::new(&"hugr", &target_machine, opt), &ctx, &mut hugr, + emit_debug, )?; Ok(llvm_module.to_string()) } /// Compile HUGR package to LLVM bitcode #[pyfunction] - #[pyo3(signature = (pkg_bytes, opt_level=2, target_triple="native"))] + #[pyo3(signature = (pkg_bytes, opt_level=2, target_triple="native", emit_debug=false))] pub fn compile_to_bitcode( pkg_bytes: &[u8], opt_level: u32, target_triple: &str, + emit_debug: bool, ) -> PyResult> { let opt = get_opt_level(opt_level)?; let target_machine = if target_triple == "native" { @@ -478,6 +506,7 @@ mod selene_hugr_qis_compiler { &CompileArgs::new(&"hugr", &target_machine, opt), &ctx, &mut hugr, + emit_debug, )?; Ok(llvm_module.write_bitcode_to_memory().as_slice().to_vec()) } diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_args.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_args.snap index 0ff4f43aa..2fa28eea1 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_args.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_args.snap @@ -8,29 +8,29 @@ source_filename = "test_context" @arg_types = private unnamed_addr constant [7 x i8] c"iifb:v\00", align 1 @no_gpu_error = private unnamed_addr constant [27 x i8] c"No error message available\00", align 1 -define internal i64 @_hl.main.1(i64 %0, i64 %1, i64 %2, i64 %3, double %4, i1 %5) { +define internal i64 @_hl.main.1(i64 %0, i64 %1, i64 %2, i64 %3, double %4, i1 %5) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %gpu_input_blob = alloca [25 x i8], align 1 - %dest_ptr = getelementptr inbounds [25 x i8], ptr %gpu_input_blob, i64 0, i64 0 - %arg_i64_tmp = alloca i64, align 8 - store i64 %2, ptr %arg_i64_tmp, align 4 - call void @llvm.memcpy.p0.p0.i64(ptr align 1 %dest_ptr, ptr align 1 %arg_i64_tmp, i64 8, i1 false) - %dest_ptr7 = getelementptr inbounds [25 x i8], ptr %gpu_input_blob, i64 0, i64 8 - %arg_i64_tmp8 = alloca i64, align 8 - store i64 %3, ptr %arg_i64_tmp8, align 4 - call void @llvm.memcpy.p0.p0.i64(ptr align 1 %dest_ptr7, ptr align 1 %arg_i64_tmp8, i64 8, i1 false) - %dest_ptr9 = getelementptr inbounds [25 x i8], ptr %gpu_input_blob, i64 0, i64 16 - %arg_f64_tmp = alloca double, align 8 - store double %4, ptr %arg_f64_tmp, align 8 - call void @llvm.memcpy.p0.p0.i64(ptr align 1 %dest_ptr9, ptr align 1 %arg_f64_tmp, i64 8, i1 false) - %dest_ptr10 = getelementptr inbounds [25 x i8], ptr %gpu_input_blob, i64 0, i64 24 - %arg_i8 = zext i1 %5 to i8 - store i8 %arg_i8, ptr %dest_ptr10, align 1 - %6 = call i8 @gpu_call(i64 %0, i64 %1, i64 25, ptr %gpu_input_blob, ptr @arg_types) - call void @validate_gpu_response(i8 %6) + %gpu_input_blob = alloca [25 x i8], align 1, !dbg !10 + %dest_ptr = getelementptr inbounds [25 x i8], ptr %gpu_input_blob, i64 0, i64 0, !dbg !10 + %arg_i64_tmp = alloca i64, align 8, !dbg !10 + store i64 %2, ptr %arg_i64_tmp, align 4, !dbg !10 + call void @llvm.memcpy.p0.p0.i64(ptr align 1 %dest_ptr, ptr align 1 %arg_i64_tmp, i64 8, i1 false), !dbg !10 + %dest_ptr7 = getelementptr inbounds [25 x i8], ptr %gpu_input_blob, i64 0, i64 8, !dbg !10 + %arg_i64_tmp8 = alloca i64, align 8, !dbg !10 + store i64 %3, ptr %arg_i64_tmp8, align 4, !dbg !10 + call void @llvm.memcpy.p0.p0.i64(ptr align 1 %dest_ptr7, ptr align 1 %arg_i64_tmp8, i64 8, i1 false), !dbg !10 + %dest_ptr9 = getelementptr inbounds [25 x i8], ptr %gpu_input_blob, i64 0, i64 16, !dbg !10 + %arg_f64_tmp = alloca double, align 8, !dbg !10 + store double %4, ptr %arg_f64_tmp, align 8, !dbg !10 + call void @llvm.memcpy.p0.p0.i64(ptr align 1 %dest_ptr9, ptr align 1 %arg_f64_tmp, i64 8, i1 false), !dbg !10 + %dest_ptr10 = getelementptr inbounds [25 x i8], ptr %gpu_input_blob, i64 0, i64 24, !dbg !10 + %arg_i8 = zext i1 %5 to i8, !dbg !10 + store i8 %arg_i8, ptr %dest_ptr10, align 1, !dbg !10 + %6 = call i8 @gpu_call(i64 %0, i64 %1, i64 25, ptr %gpu_input_blob, ptr @arg_types), !dbg !10 + call void @validate_gpu_response(i8 %6), !dbg !10 ret i64 %0 } @@ -42,25 +42,25 @@ declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr no ; Function Attrs: noinline define void @validate_gpu_response(i8 %0) #1 { entry: - %success = icmp ne i8 %0, 0 - br i1 %success, label %ok, label %err + %success = icmp ne i8 %0, 0, !dbg !10 + br i1 %success, label %ok, label %err, !dbg !10 ok: ; preds = %entry - ret void + ret void, !dbg !10 err: ; preds = %entry - call void @gpu_error_handler() - unreachable + call void @gpu_error_handler(), !dbg !10 + unreachable, !dbg !10 } ; Function Attrs: noinline define void @gpu_error_handler() #1 { entry: - %error_message = call ptr @gpu_get_error() - %is_null = icmp eq ptr %error_message, null - %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message - call void @panic_str(i32 70002, ptr %error_message_nonnull) - unreachable + %error_message = call ptr @gpu_get_error(), !dbg !10 + %is_null = icmp eq ptr %error_message, null, !dbg !10 + %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message, !dbg !10 + call void @panic_str(i32 70002, ptr %error_message_nonnull), !dbg !10 + unreachable, !dbg !10 } declare ptr @gpu_get_error() @@ -71,3 +71,18 @@ declare void @panic_str(i32, ptr) #2 attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) } attributes #1 = { noinline } attributes #2 = { noreturn } + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !7, !7, !7, !7, !8, !9} +!7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!8 = !DIBasicType(name: "f64", size: 64, encoding: DW_ATE_float) +!9 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) +!10 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_ret_float.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_ret_float.snap index fd16e5f37..bb76dc967 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_ret_float.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_ret_float.snap @@ -8,14 +8,14 @@ source_filename = "test_context" @arg_types = private unnamed_addr constant [3 x i8] c":f\00", align 1 @no_gpu_error = private unnamed_addr constant [27 x i8] c"No error message available\00", align 1 -define internal i64 @_hl.main.1(i64 %0, i64 %1) { +define internal i64 @_hl.main.1(i64 %0, i64 %1) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %gpu_input_blob = alloca [0 x i8], align 1 - %2 = call i8 @gpu_call(i64 %0, i64 %1, i64 0, ptr %gpu_input_blob, ptr @arg_types) - call void @validate_gpu_response(i8 %2) + %gpu_input_blob = alloca [0 x i8], align 1, !dbg !8 + %2 = call i8 @gpu_call(i64 %0, i64 %1, i64 0, ptr %gpu_input_blob, ptr @arg_types), !dbg !8 + call void @validate_gpu_response(i8 %2), !dbg !8 ret i64 %0 } @@ -24,25 +24,25 @@ declare i8 @gpu_call(i64, i64, i64, ptr, ptr) ; Function Attrs: noinline define void @validate_gpu_response(i8 %0) #0 { entry: - %success = icmp ne i8 %0, 0 - br i1 %success, label %ok, label %err + %success = icmp ne i8 %0, 0, !dbg !8 + br i1 %success, label %ok, label %err, !dbg !8 ok: ; preds = %entry - ret void + ret void, !dbg !8 err: ; preds = %entry - call void @gpu_error_handler() - unreachable + call void @gpu_error_handler(), !dbg !8 + unreachable, !dbg !8 } ; Function Attrs: noinline define void @gpu_error_handler() #0 { entry: - %error_message = call ptr @gpu_get_error() - %is_null = icmp eq ptr %error_message, null - %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message - call void @panic_str(i32 70002, ptr %error_message_nonnull) - unreachable + %error_message = call ptr @gpu_get_error(), !dbg !8 + %is_null = icmp eq ptr %error_message, null, !dbg !8 + %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message, !dbg !8 + call void @panic_str(i32 70002, ptr %error_message_nonnull), !dbg !8 + unreachable, !dbg !8 } declare ptr @gpu_get_error() @@ -52,3 +52,16 @@ declare void @panic_str(i32, ptr) #1 attributes #0 = { noinline } attributes #1 = { noreturn } + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !7, !7} +!7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_ret_int.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_ret_int.snap index 7ce1e98ad..4326a050e 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_ret_int.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_ret_int.snap @@ -8,14 +8,14 @@ source_filename = "test_context" @arg_types = private unnamed_addr constant [3 x i8] c":i\00", align 1 @no_gpu_error = private unnamed_addr constant [27 x i8] c"No error message available\00", align 1 -define internal i64 @_hl.main.1(i64 %0, i64 %1) { +define internal i64 @_hl.main.1(i64 %0, i64 %1) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %gpu_input_blob = alloca [0 x i8], align 1 - %2 = call i8 @gpu_call(i64 %0, i64 %1, i64 0, ptr %gpu_input_blob, ptr @arg_types) - call void @validate_gpu_response(i8 %2) + %gpu_input_blob = alloca [0 x i8], align 1, !dbg !8 + %2 = call i8 @gpu_call(i64 %0, i64 %1, i64 0, ptr %gpu_input_blob, ptr @arg_types), !dbg !8 + call void @validate_gpu_response(i8 %2), !dbg !8 ret i64 %0 } @@ -24,25 +24,25 @@ declare i8 @gpu_call(i64, i64, i64, ptr, ptr) ; Function Attrs: noinline define void @validate_gpu_response(i8 %0) #0 { entry: - %success = icmp ne i8 %0, 0 - br i1 %success, label %ok, label %err + %success = icmp ne i8 %0, 0, !dbg !8 + br i1 %success, label %ok, label %err, !dbg !8 ok: ; preds = %entry - ret void + ret void, !dbg !8 err: ; preds = %entry - call void @gpu_error_handler() - unreachable + call void @gpu_error_handler(), !dbg !8 + unreachable, !dbg !8 } ; Function Attrs: noinline define void @gpu_error_handler() #0 { entry: - %error_message = call ptr @gpu_get_error() - %is_null = icmp eq ptr %error_message, null - %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message - call void @panic_str(i32 70002, ptr %error_message_nonnull) - unreachable + %error_message = call ptr @gpu_get_error(), !dbg !8 + %is_null = icmp eq ptr %error_message, null, !dbg !8 + %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message, !dbg !8 + call void @panic_str(i32 70002, ptr %error_message_nonnull), !dbg !8 + unreachable, !dbg !8 } declare ptr @gpu_get_error() @@ -52,3 +52,16 @@ declare void @panic_str(i32, ptr) #1 attributes #0 = { noinline } attributes #1 = { noreturn } + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !7, !7} +!7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_dispose_context.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_dispose_context.snap index 25efa7d01..c97e4eb02 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_dispose_context.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_dispose_context.snap @@ -7,13 +7,13 @@ source_filename = "test_context" @no_gpu_error = private unnamed_addr constant [27 x i8] c"No error message available\00", align 1 -define internal void @_hl.main.1(i64 %0) { +define internal void @_hl.main.1(i64 %0) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %1 = call i8 @gpu_discard(i64 %0) - call void @validate_gpu_response(i8 %1) + %1 = call i8 @gpu_discard(i64 %0), !dbg !8 + call void @validate_gpu_response(i8 %1), !dbg !8 ret void } @@ -22,25 +22,25 @@ declare i8 @gpu_discard(i64) ; Function Attrs: noinline define void @validate_gpu_response(i8 %0) #0 { entry: - %success = icmp ne i8 %0, 0 - br i1 %success, label %ok, label %err + %success = icmp ne i8 %0, 0, !dbg !8 + br i1 %success, label %ok, label %err, !dbg !8 ok: ; preds = %entry - ret void + ret void, !dbg !8 err: ; preds = %entry - call void @gpu_error_handler() - unreachable + call void @gpu_error_handler(), !dbg !8 + unreachable, !dbg !8 } ; Function Attrs: noinline define void @gpu_error_handler() #0 { entry: - %error_message = call ptr @gpu_get_error() - %is_null = icmp eq ptr %error_message, null - %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message - call void @panic_str(i32 70002, ptr %error_message_nonnull) - unreachable + %error_message = call ptr @gpu_get_error(), !dbg !8 + %is_null = icmp eq ptr %error_message, null, !dbg !8 + %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message, !dbg !8 + call void @panic_str(i32 70002, ptr %error_message_nonnull), !dbg !8 + unreachable, !dbg !8 } declare ptr @gpu_get_error() @@ -50,3 +50,16 @@ declare void @panic_str(i32, ptr) #1 attributes #0 = { noinline } attributes #1 = { noreturn } + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{null, !7} +!7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_get_context.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_get_context.snap index 7398e3bdf..be2cea13d 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_get_context.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_get_context.snap @@ -8,35 +8,35 @@ source_filename = "test_context" @gpu_validated = thread_local global i8 0 @no_gpu_error = private unnamed_addr constant [27 x i8] c"No error message available\00", align 1 -define internal { i1, i64 } @_hl.main.1(i64 %0) { +define internal { i1, i64 } @_hl.main.1(i64 %0) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - call void @run_gpu_validation() - %gpu_ref_ptr = alloca i64, align 8 - %gpu_ref_call = call i8 @gpu_init(i64 %0, ptr %gpu_ref_ptr) - call void @validate_gpu_response(i8 %gpu_ref_call) - %gpu_ref = load i64, ptr %gpu_ref_ptr, align 4 - %1 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %gpu_ref, 1 + call void @run_gpu_validation(), !dbg !11 + %gpu_ref_ptr = alloca i64, align 8, !dbg !11 + %gpu_ref_call = call i8 @gpu_init(i64 %0, ptr %gpu_ref_ptr), !dbg !11 + call void @validate_gpu_response(i8 %gpu_ref_call), !dbg !11 + %gpu_ref = load i64, ptr %gpu_ref_ptr, align 4, !dbg !11 + %1 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %gpu_ref, 1, !dbg !11 ret { i1, i64 } %1 } ; Function Attrs: noinline define void @run_gpu_validation() #0 { entry: - %validated = load i8, ptr @gpu_validated, align 1 - %already_validated = icmp ne i8 %validated, 0 - br i1 %already_validated, label %done, label %validate + %validated = load i8, ptr @gpu_validated, align 1, !dbg !11 + %already_validated = icmp ne i8 %validated, 0, !dbg !11 + br i1 %already_validated, label %done, label %validate, !dbg !11 done: ; preds = %entry - ret void + ret void, !dbg !11 validate: ; preds = %entry - %validate_call = call i8 @gpu_validate_api(i64 0, i64 1, i64 0) - call void @validate_gpu_response(i8 %validate_call) - store i8 1, ptr @gpu_validated, align 1 - ret void + %validate_call = call i8 @gpu_validate_api(i64 0, i64 1, i64 0), !dbg !11 + call void @validate_gpu_response(i8 %validate_call), !dbg !11 + store i8 1, ptr @gpu_validated, align 1, !dbg !11 + ret void, !dbg !11 } declare i8 @gpu_validate_api(i64, i64, i64) @@ -44,25 +44,25 @@ declare i8 @gpu_validate_api(i64, i64, i64) ; Function Attrs: noinline define void @validate_gpu_response(i8 %0) #0 { entry: - %success = icmp ne i8 %0, 0 - br i1 %success, label %ok, label %err + %success = icmp ne i8 %0, 0, !dbg !11 + br i1 %success, label %ok, label %err, !dbg !11 ok: ; preds = %entry - ret void + ret void, !dbg !11 err: ; preds = %entry - call void @gpu_error_handler() - unreachable + call void @gpu_error_handler(), !dbg !11 + unreachable, !dbg !11 } ; Function Attrs: noinline define void @gpu_error_handler() #0 { entry: - %error_message = call ptr @gpu_get_error() - %is_null = icmp eq ptr %error_message, null - %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message - call void @panic_str(i32 70002, ptr %error_message_nonnull) - unreachable + %error_message = call ptr @gpu_get_error(), !dbg !11 + %is_null = icmp eq ptr %error_message, null, !dbg !11 + %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message, !dbg !11 + call void @panic_str(i32 70002, ptr %error_message_nonnull), !dbg !11 + unreachable, !dbg !11 } declare ptr @gpu_get_error() @@ -74,3 +74,19 @@ declare i8 @gpu_init(i64, ptr) attributes #0 = { noinline } attributes #1 = { noreturn } + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !10} +!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i1, i64 }", file: !2, size: 8, align: 8, elements: !8) +!8 = !{!9, !10} +!9 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) +!10 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!11 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_lookup_by_id.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_lookup_by_id.snap index 16374dfb8..f76aa052e 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_lookup_by_id.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_lookup_by_id.snap @@ -5,10 +5,24 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal i64 @_hl.main.1({} %0) { +define internal i64 @_hl.main.1({} %0) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block ret i64 42 } + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !8} +!7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!8 = !DICompositeType(tag: DW_TAG_structure_type, name: "{}", file: !2, align: 8, elements: !9) +!9 = !{} diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_lookup_by_name.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_lookup_by_name.snap index 0f69bb55d..f6192e738 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_lookup_by_name.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_lookup_by_name.snap @@ -11,52 +11,52 @@ source_filename = "test_context" @no_gpu_error = private unnamed_addr constant [27 x i8] c"No error message available\00", align 1 @function_name = private unnamed_addr constant [17 x i8] c"example_function\00", align 1 -define internal i64 @_hl.main.1({} %0) { +define internal i64 @_hl.main.1({} %0) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %function_id_call = call i64 @gpu_function_id_example_function() + %function_id_call = call i64 @gpu_function_id_example_function(), !dbg !10 ret i64 %function_id_call } ; Function Attrs: noinline define i64 @gpu_function_id_example_function() #0 { entry: - %function_id = load i8, ptr @gpu_cache_is_set_function_id_example_function, align 1 - %needs_lookup = icmp eq i8 %function_id, 0 - br i1 %needs_lookup, label %lookup, label %read_cache + %function_id = load i8, ptr @gpu_cache_is_set_function_id_example_function, align 1, !dbg !10 + %needs_lookup = icmp eq i8 %function_id, 0, !dbg !10 + br i1 %needs_lookup, label %lookup, label %read_cache, !dbg !10 lookup: ; preds = %entry - call void @run_gpu_validation() - %function_id_ptr = alloca i64, align 8 - %function_id_call = call i8 @gpu_get_function_id(ptr @function_name, ptr %function_id_ptr) - call void @validate_gpu_response(i8 %function_id_call) - %function_id2 = load i64, ptr %function_id_ptr, align 4 - store i64 %function_id2, ptr @gpu_cache_function_id_example_function, align 4 - store i8 1, ptr @gpu_cache_is_set_function_id_example_function, align 1 - ret i64 %function_id2 + call void @run_gpu_validation(), !dbg !10 + %function_id_ptr = alloca i64, align 8, !dbg !10 + %function_id_call = call i8 @gpu_get_function_id(ptr @function_name, ptr %function_id_ptr), !dbg !10 + call void @validate_gpu_response(i8 %function_id_call), !dbg !10 + %function_id2 = load i64, ptr %function_id_ptr, align 4, !dbg !10 + store i64 %function_id2, ptr @gpu_cache_function_id_example_function, align 4, !dbg !10 + store i8 1, ptr @gpu_cache_is_set_function_id_example_function, align 1, !dbg !10 + ret i64 %function_id2, !dbg !10 read_cache: ; preds = %entry - %function_id1 = load i64, ptr @gpu_cache_function_id_example_function, align 4 - ret i64 %function_id1 + %function_id1 = load i64, ptr @gpu_cache_function_id_example_function, align 4, !dbg !10 + ret i64 %function_id1, !dbg !10 } ; Function Attrs: noinline define void @run_gpu_validation() #0 { entry: - %validated = load i8, ptr @gpu_validated, align 1 - %already_validated = icmp ne i8 %validated, 0 - br i1 %already_validated, label %done, label %validate + %validated = load i8, ptr @gpu_validated, align 1, !dbg !10 + %already_validated = icmp ne i8 %validated, 0, !dbg !10 + br i1 %already_validated, label %done, label %validate, !dbg !10 done: ; preds = %entry - ret void + ret void, !dbg !10 validate: ; preds = %entry - %validate_call = call i8 @gpu_validate_api(i64 0, i64 1, i64 0) - call void @validate_gpu_response(i8 %validate_call) - store i8 1, ptr @gpu_validated, align 1 - ret void + %validate_call = call i8 @gpu_validate_api(i64 0, i64 1, i64 0), !dbg !10 + call void @validate_gpu_response(i8 %validate_call), !dbg !10 + store i8 1, ptr @gpu_validated, align 1, !dbg !10 + ret void, !dbg !10 } declare i8 @gpu_validate_api(i64, i64, i64) @@ -64,25 +64,25 @@ declare i8 @gpu_validate_api(i64, i64, i64) ; Function Attrs: noinline define void @validate_gpu_response(i8 %0) #0 { entry: - %success = icmp ne i8 %0, 0 - br i1 %success, label %ok, label %err + %success = icmp ne i8 %0, 0, !dbg !10 + br i1 %success, label %ok, label %err, !dbg !10 ok: ; preds = %entry - ret void + ret void, !dbg !10 err: ; preds = %entry - call void @gpu_error_handler() - unreachable + call void @gpu_error_handler(), !dbg !10 + unreachable, !dbg !10 } ; Function Attrs: noinline define void @gpu_error_handler() #0 { entry: - %error_message = call ptr @gpu_get_error() - %is_null = icmp eq ptr %error_message, null - %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message - call void @panic_str(i32 70002, ptr %error_message_nonnull) - unreachable + %error_message = call ptr @gpu_get_error(), !dbg !10 + %is_null = icmp eq ptr %error_message, null, !dbg !10 + %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message, !dbg !10 + call void @panic_str(i32 70002, ptr %error_message_nonnull), !dbg !10 + unreachable, !dbg !10 } declare ptr @gpu_get_error() @@ -94,3 +94,18 @@ declare i8 @gpu_get_function_id(ptr, ptr) attributes #0 = { noinline } attributes #1 = { noreturn } + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !8} +!7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!8 = !DICompositeType(tag: DW_TAG_structure_type, name: "{}", file: !2, align: 8, elements: !9) +!9 = !{} +!10 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_read_result_float.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_read_result_float.snap index 48745fbc6..d5296d18c 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_read_result_float.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_read_result_float.snap @@ -7,15 +7,15 @@ source_filename = "test_context" @no_gpu_error = private unnamed_addr constant [27 x i8] c"No error message available\00", align 1 -define internal { i64, double } @_hl.main.1(i64 %0) { +define internal { i64, double } @_hl.main.1(i64 %0) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %int_result = alloca i64, align 8 - %read_status = call i8 @gpu_get_result(i64 %0, i64 8, ptr %int_result) - call void @validate_gpu_response(i8 %read_status) - %result = load double, ptr %int_result, align 8 + %int_result = alloca i64, align 8, !dbg !11 + %read_status = call i8 @gpu_get_result(i64 %0, i64 8, ptr %int_result), !dbg !11 + call void @validate_gpu_response(i8 %read_status), !dbg !11 + %result = load double, ptr %int_result, align 8, !dbg !11 %mrv = insertvalue { i64, double } poison, i64 %0, 0 %mrv6 = insertvalue { i64, double } %mrv, double %result, 1 ret { i64, double } %mrv6 @@ -26,25 +26,25 @@ declare i8 @gpu_get_result(i64, i64, ptr) ; Function Attrs: noinline define void @validate_gpu_response(i8 %0) #0 { entry: - %success = icmp ne i8 %0, 0 - br i1 %success, label %ok, label %err + %success = icmp ne i8 %0, 0, !dbg !11 + br i1 %success, label %ok, label %err, !dbg !11 ok: ; preds = %entry - ret void + ret void, !dbg !11 err: ; preds = %entry - call void @gpu_error_handler() - unreachable + call void @gpu_error_handler(), !dbg !11 + unreachable, !dbg !11 } ; Function Attrs: noinline define void @gpu_error_handler() #0 { entry: - %error_message = call ptr @gpu_get_error() - %is_null = icmp eq ptr %error_message, null - %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message - call void @panic_str(i32 70002, ptr %error_message_nonnull) - unreachable + %error_message = call ptr @gpu_get_error(), !dbg !11 + %is_null = icmp eq ptr %error_message, null, !dbg !11 + %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message, !dbg !11 + call void @panic_str(i32 70002, ptr %error_message_nonnull), !dbg !11 + unreachable, !dbg !11 } declare ptr @gpu_get_error() @@ -54,3 +54,19 @@ declare void @panic_str(i32, ptr) #1 attributes #0 = { noinline } attributes #1 = { noreturn } + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !9} +!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i64, double }", file: !2, size: 16, align: 8, elements: !8) +!8 = !{!9, !10} +!9 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!10 = !DIBasicType(name: "f64", size: 64, encoding: DW_ATE_float) +!11 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_read_result_int.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_read_result_int.snap index 6d22a6ce3..5507ce894 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_read_result_int.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_read_result_int.snap @@ -7,15 +7,15 @@ source_filename = "test_context" @no_gpu_error = private unnamed_addr constant [27 x i8] c"No error message available\00", align 1 -define internal { i64, i64 } @_hl.main.1(i64 %0) { +define internal { i64, i64 } @_hl.main.1(i64 %0) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %int_result = alloca i64, align 8 - %read_status = call i8 @gpu_get_result(i64 %0, i64 8, ptr %int_result) - call void @validate_gpu_response(i8 %read_status) - %result = load i64, ptr %int_result, align 4 + %int_result = alloca i64, align 8, !dbg !10 + %read_status = call i8 @gpu_get_result(i64 %0, i64 8, ptr %int_result), !dbg !10 + call void @validate_gpu_response(i8 %read_status), !dbg !10 + %result = load i64, ptr %int_result, align 4, !dbg !10 %mrv = insertvalue { i64, i64 } poison, i64 %0, 0 %mrv6 = insertvalue { i64, i64 } %mrv, i64 %result, 1 ret { i64, i64 } %mrv6 @@ -26,25 +26,25 @@ declare i8 @gpu_get_result(i64, i64, ptr) ; Function Attrs: noinline define void @validate_gpu_response(i8 %0) #0 { entry: - %success = icmp ne i8 %0, 0 - br i1 %success, label %ok, label %err + %success = icmp ne i8 %0, 0, !dbg !10 + br i1 %success, label %ok, label %err, !dbg !10 ok: ; preds = %entry - ret void + ret void, !dbg !10 err: ; preds = %entry - call void @gpu_error_handler() - unreachable + call void @gpu_error_handler(), !dbg !10 + unreachable, !dbg !10 } ; Function Attrs: noinline define void @gpu_error_handler() #0 { entry: - %error_message = call ptr @gpu_get_error() - %is_null = icmp eq ptr %error_message, null - %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message - call void @panic_str(i32 70002, ptr %error_message_nonnull) - unreachable + %error_message = call ptr @gpu_get_error(), !dbg !10 + %is_null = icmp eq ptr %error_message, null, !dbg !10 + %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message, !dbg !10 + call void @panic_str(i32 70002, ptr %error_message_nonnull), !dbg !10 + unreachable, !dbg !10 } declare ptr @gpu_get_error() @@ -54,3 +54,18 @@ declare void @panic_str(i32, ptr) #1 attributes #0 = { noinline } attributes #1 = { noreturn } + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !9} +!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i64, i64 }", file: !2, size: 16, align: 8, elements: !8) +!8 = !{!9, !9} +!9 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!10 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_args.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_args.snap index 468dcebaf..8f747c360 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_args.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_args.snap @@ -8,7 +8,7 @@ source_filename = "test_context" @arg_types = private unnamed_addr constant [7 x i8] c"iifb:v\00", align 1 @no_gpu_error = private unnamed_addr constant [27 x i8] c"No error message available\00", align 1 -define internal i64 @_hl.main.1(i64 %0, i64 %1, i64 %2, i64 %3, double %4, i1 %5) { +define internal i64 @_hl.main.1(i64 %0, i64 %1, i64 %2, i64 %3, double %4, i1 %5) !dbg !3 { alloca_block: %"0" = alloca i64, align 8 %"2_0" = alloca i64, align 8 @@ -33,25 +33,25 @@ entry_block: ; preds = %alloca_block %"2_34" = load i64, ptr %"2_3", align 4 %"2_45" = load double, ptr %"2_4", align 8 %"2_56" = load i1, ptr %"2_5", align 1 - %gpu_input_blob = alloca [25 x i8], align 1 - %dest_ptr = getelementptr inbounds [25 x i8], ptr %gpu_input_blob, i64 0, i64 0 - %arg_i64_tmp = alloca i64, align 8 - store i64 %"2_23", ptr %arg_i64_tmp, align 4 - call void @llvm.memcpy.p0.p0.i64(ptr align 1 %dest_ptr, ptr align 1 %arg_i64_tmp, i64 8, i1 false) - %dest_ptr7 = getelementptr inbounds [25 x i8], ptr %gpu_input_blob, i64 0, i64 8 - %arg_i64_tmp8 = alloca i64, align 8 - store i64 %"2_34", ptr %arg_i64_tmp8, align 4 - call void @llvm.memcpy.p0.p0.i64(ptr align 1 %dest_ptr7, ptr align 1 %arg_i64_tmp8, i64 8, i1 false) - %dest_ptr9 = getelementptr inbounds [25 x i8], ptr %gpu_input_blob, i64 0, i64 16 - %arg_f64_tmp = alloca double, align 8 - store double %"2_45", ptr %arg_f64_tmp, align 8 - call void @llvm.memcpy.p0.p0.i64(ptr align 1 %dest_ptr9, ptr align 1 %arg_f64_tmp, i64 8, i1 false) - %dest_ptr10 = getelementptr inbounds [25 x i8], ptr %gpu_input_blob, i64 0, i64 24 - %arg_i8 = zext i1 %"2_56" to i8 - store i8 %arg_i8, ptr %dest_ptr10, align 1 - %6 = call i8 @gpu_call(i64 %"2_01", i64 %"2_12", i64 25, ptr %gpu_input_blob, ptr @arg_types) - call void @validate_gpu_response(i8 %6) - store i64 %"2_01", ptr %"4_0", align 4 + %gpu_input_blob = alloca [25 x i8], align 1, !dbg !10 + %dest_ptr = getelementptr inbounds [25 x i8], ptr %gpu_input_blob, i64 0, i64 0, !dbg !10 + %arg_i64_tmp = alloca i64, align 8, !dbg !10 + store i64 %"2_23", ptr %arg_i64_tmp, align 4, !dbg !10 + call void @llvm.memcpy.p0.p0.i64(ptr align 1 %dest_ptr, ptr align 1 %arg_i64_tmp, i64 8, i1 false), !dbg !10 + %dest_ptr7 = getelementptr inbounds [25 x i8], ptr %gpu_input_blob, i64 0, i64 8, !dbg !10 + %arg_i64_tmp8 = alloca i64, align 8, !dbg !10 + store i64 %"2_34", ptr %arg_i64_tmp8, align 4, !dbg !10 + call void @llvm.memcpy.p0.p0.i64(ptr align 1 %dest_ptr7, ptr align 1 %arg_i64_tmp8, i64 8, i1 false), !dbg !10 + %dest_ptr9 = getelementptr inbounds [25 x i8], ptr %gpu_input_blob, i64 0, i64 16, !dbg !10 + %arg_f64_tmp = alloca double, align 8, !dbg !10 + store double %"2_45", ptr %arg_f64_tmp, align 8, !dbg !10 + call void @llvm.memcpy.p0.p0.i64(ptr align 1 %dest_ptr9, ptr align 1 %arg_f64_tmp, i64 8, i1 false), !dbg !10 + %dest_ptr10 = getelementptr inbounds [25 x i8], ptr %gpu_input_blob, i64 0, i64 24, !dbg !10 + %arg_i8 = zext i1 %"2_56" to i8, !dbg !10 + store i8 %arg_i8, ptr %dest_ptr10, align 1, !dbg !10 + %6 = call i8 @gpu_call(i64 %"2_01", i64 %"2_12", i64 25, ptr %gpu_input_blob, ptr @arg_types), !dbg !10 + call void @validate_gpu_response(i8 %6), !dbg !10 + store i64 %"2_01", ptr %"4_0", align 4, !dbg !10 %"4_011" = load i64, ptr %"4_0", align 4 store i64 %"4_011", ptr %"0", align 4 %"012" = load i64, ptr %"0", align 4 @@ -66,25 +66,25 @@ declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr no ; Function Attrs: noinline define void @validate_gpu_response(i8 %0) #1 { entry: - %success = icmp ne i8 %0, 0 - br i1 %success, label %ok, label %err + %success = icmp ne i8 %0, 0, !dbg !10 + br i1 %success, label %ok, label %err, !dbg !10 ok: ; preds = %entry - ret void + ret void, !dbg !10 err: ; preds = %entry - call void @gpu_error_handler() - unreachable + call void @gpu_error_handler(), !dbg !10 + unreachable, !dbg !10 } ; Function Attrs: noinline define void @gpu_error_handler() #1 { entry: - %error_message = call ptr @gpu_get_error() - %is_null = icmp eq ptr %error_message, null - %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message - call void @panic_str(i32 70002, ptr %error_message_nonnull) - unreachable + %error_message = call ptr @gpu_get_error(), !dbg !10 + %is_null = icmp eq ptr %error_message, null, !dbg !10 + %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message, !dbg !10 + call void @panic_str(i32 70002, ptr %error_message_nonnull), !dbg !10 + unreachable, !dbg !10 } declare ptr @gpu_get_error() @@ -95,3 +95,18 @@ declare void @panic_str(i32, ptr) #2 attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) } attributes #1 = { noinline } attributes #2 = { noreturn } + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !7, !7, !7, !7, !8, !9} +!7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!8 = !DIBasicType(name: "f64", size: 64, encoding: DW_ATE_float) +!9 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) +!10 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_ret_float.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_ret_float.snap index b7607bcd1..29a8c86b3 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_ret_float.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_ret_float.snap @@ -8,7 +8,7 @@ source_filename = "test_context" @arg_types = private unnamed_addr constant [3 x i8] c":f\00", align 1 @no_gpu_error = private unnamed_addr constant [27 x i8] c"No error message available\00", align 1 -define internal i64 @_hl.main.1(i64 %0, i64 %1) { +define internal i64 @_hl.main.1(i64 %0, i64 %1) !dbg !3 { alloca_block: %"0" = alloca i64, align 8 %"2_0" = alloca i64, align 8 @@ -21,10 +21,10 @@ entry_block: ; preds = %alloca_block store i64 %1, ptr %"2_1", align 4 %"2_01" = load i64, ptr %"2_0", align 4 %"2_12" = load i64, ptr %"2_1", align 4 - %gpu_input_blob = alloca [0 x i8], align 1 - %2 = call i8 @gpu_call(i64 %"2_01", i64 %"2_12", i64 0, ptr %gpu_input_blob, ptr @arg_types) - call void @validate_gpu_response(i8 %2) - store i64 %"2_01", ptr %"4_0", align 4 + %gpu_input_blob = alloca [0 x i8], align 1, !dbg !8 + %2 = call i8 @gpu_call(i64 %"2_01", i64 %"2_12", i64 0, ptr %gpu_input_blob, ptr @arg_types), !dbg !8 + call void @validate_gpu_response(i8 %2), !dbg !8 + store i64 %"2_01", ptr %"4_0", align 4, !dbg !8 %"4_03" = load i64, ptr %"4_0", align 4 store i64 %"4_03", ptr %"0", align 4 %"04" = load i64, ptr %"0", align 4 @@ -36,25 +36,25 @@ declare i8 @gpu_call(i64, i64, i64, ptr, ptr) ; Function Attrs: noinline define void @validate_gpu_response(i8 %0) #0 { entry: - %success = icmp ne i8 %0, 0 - br i1 %success, label %ok, label %err + %success = icmp ne i8 %0, 0, !dbg !8 + br i1 %success, label %ok, label %err, !dbg !8 ok: ; preds = %entry - ret void + ret void, !dbg !8 err: ; preds = %entry - call void @gpu_error_handler() - unreachable + call void @gpu_error_handler(), !dbg !8 + unreachable, !dbg !8 } ; Function Attrs: noinline define void @gpu_error_handler() #0 { entry: - %error_message = call ptr @gpu_get_error() - %is_null = icmp eq ptr %error_message, null - %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message - call void @panic_str(i32 70002, ptr %error_message_nonnull) - unreachable + %error_message = call ptr @gpu_get_error(), !dbg !8 + %is_null = icmp eq ptr %error_message, null, !dbg !8 + %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message, !dbg !8 + call void @panic_str(i32 70002, ptr %error_message_nonnull), !dbg !8 + unreachable, !dbg !8 } declare ptr @gpu_get_error() @@ -64,3 +64,16 @@ declare void @panic_str(i32, ptr) #1 attributes #0 = { noinline } attributes #1 = { noreturn } + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !7, !7} +!7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_ret_int.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_ret_int.snap index 887dcc397..2d3f22019 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_ret_int.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_ret_int.snap @@ -8,7 +8,7 @@ source_filename = "test_context" @arg_types = private unnamed_addr constant [3 x i8] c":i\00", align 1 @no_gpu_error = private unnamed_addr constant [27 x i8] c"No error message available\00", align 1 -define internal i64 @_hl.main.1(i64 %0, i64 %1) { +define internal i64 @_hl.main.1(i64 %0, i64 %1) !dbg !3 { alloca_block: %"0" = alloca i64, align 8 %"2_0" = alloca i64, align 8 @@ -21,10 +21,10 @@ entry_block: ; preds = %alloca_block store i64 %1, ptr %"2_1", align 4 %"2_01" = load i64, ptr %"2_0", align 4 %"2_12" = load i64, ptr %"2_1", align 4 - %gpu_input_blob = alloca [0 x i8], align 1 - %2 = call i8 @gpu_call(i64 %"2_01", i64 %"2_12", i64 0, ptr %gpu_input_blob, ptr @arg_types) - call void @validate_gpu_response(i8 %2) - store i64 %"2_01", ptr %"4_0", align 4 + %gpu_input_blob = alloca [0 x i8], align 1, !dbg !8 + %2 = call i8 @gpu_call(i64 %"2_01", i64 %"2_12", i64 0, ptr %gpu_input_blob, ptr @arg_types), !dbg !8 + call void @validate_gpu_response(i8 %2), !dbg !8 + store i64 %"2_01", ptr %"4_0", align 4, !dbg !8 %"4_03" = load i64, ptr %"4_0", align 4 store i64 %"4_03", ptr %"0", align 4 %"04" = load i64, ptr %"0", align 4 @@ -36,25 +36,25 @@ declare i8 @gpu_call(i64, i64, i64, ptr, ptr) ; Function Attrs: noinline define void @validate_gpu_response(i8 %0) #0 { entry: - %success = icmp ne i8 %0, 0 - br i1 %success, label %ok, label %err + %success = icmp ne i8 %0, 0, !dbg !8 + br i1 %success, label %ok, label %err, !dbg !8 ok: ; preds = %entry - ret void + ret void, !dbg !8 err: ; preds = %entry - call void @gpu_error_handler() - unreachable + call void @gpu_error_handler(), !dbg !8 + unreachable, !dbg !8 } ; Function Attrs: noinline define void @gpu_error_handler() #0 { entry: - %error_message = call ptr @gpu_get_error() - %is_null = icmp eq ptr %error_message, null - %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message - call void @panic_str(i32 70002, ptr %error_message_nonnull) - unreachable + %error_message = call ptr @gpu_get_error(), !dbg !8 + %is_null = icmp eq ptr %error_message, null, !dbg !8 + %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message, !dbg !8 + call void @panic_str(i32 70002, ptr %error_message_nonnull), !dbg !8 + unreachable, !dbg !8 } declare ptr @gpu_get_error() @@ -64,3 +64,16 @@ declare void @panic_str(i32, ptr) #1 attributes #0 = { noinline } attributes #1 = { noreturn } + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !7, !7} +!7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_dispose_context.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_dispose_context.snap index 493e89095..93779c5dc 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_dispose_context.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_dispose_context.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @no_gpu_error = private unnamed_addr constant [27 x i8] c"No error message available\00", align 1 -define internal void @_hl.main.1(i64 %0) { +define internal void @_hl.main.1(i64 %0) !dbg !3 { alloca_block: %"2_0" = alloca i64, align 8 br label %entry_block @@ -15,8 +15,8 @@ alloca_block: entry_block: ; preds = %alloca_block store i64 %0, ptr %"2_0", align 4 %"2_01" = load i64, ptr %"2_0", align 4 - %1 = call i8 @gpu_discard(i64 %"2_01") - call void @validate_gpu_response(i8 %1) + %1 = call i8 @gpu_discard(i64 %"2_01"), !dbg !8 + call void @validate_gpu_response(i8 %1), !dbg !8 ret void } @@ -25,25 +25,25 @@ declare i8 @gpu_discard(i64) ; Function Attrs: noinline define void @validate_gpu_response(i8 %0) #0 { entry: - %success = icmp ne i8 %0, 0 - br i1 %success, label %ok, label %err + %success = icmp ne i8 %0, 0, !dbg !8 + br i1 %success, label %ok, label %err, !dbg !8 ok: ; preds = %entry - ret void + ret void, !dbg !8 err: ; preds = %entry - call void @gpu_error_handler() - unreachable + call void @gpu_error_handler(), !dbg !8 + unreachable, !dbg !8 } ; Function Attrs: noinline define void @gpu_error_handler() #0 { entry: - %error_message = call ptr @gpu_get_error() - %is_null = icmp eq ptr %error_message, null - %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message - call void @panic_str(i32 70002, ptr %error_message_nonnull) - unreachable + %error_message = call ptr @gpu_get_error(), !dbg !8 + %is_null = icmp eq ptr %error_message, null, !dbg !8 + %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message, !dbg !8 + call void @panic_str(i32 70002, ptr %error_message_nonnull), !dbg !8 + unreachable, !dbg !8 } declare ptr @gpu_get_error() @@ -53,3 +53,16 @@ declare void @panic_str(i32, ptr) #1 attributes #0 = { noinline } attributes #1 = { noreturn } + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{null, !7} +!7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_get_context.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_get_context.snap index 246127c30..2aab9e85f 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_get_context.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_get_context.snap @@ -8,7 +8,7 @@ source_filename = "test_context" @gpu_validated = thread_local global i8 0 @no_gpu_error = private unnamed_addr constant [27 x i8] c"No error message available\00", align 1 -define internal { i1, i64 } @_hl.main.1(i64 %0) { +define internal { i1, i64 } @_hl.main.1(i64 %0) !dbg !3 { alloca_block: %"0" = alloca { i1, i64 }, align 8 %"2_0" = alloca i64, align 8 @@ -18,13 +18,13 @@ alloca_block: entry_block: ; preds = %alloca_block store i64 %0, ptr %"2_0", align 4 %"2_01" = load i64, ptr %"2_0", align 4 - call void @run_gpu_validation() - %gpu_ref_ptr = alloca i64, align 8 - %gpu_ref_call = call i8 @gpu_init(i64 %"2_01", ptr %gpu_ref_ptr) - call void @validate_gpu_response(i8 %gpu_ref_call) - %gpu_ref = load i64, ptr %gpu_ref_ptr, align 4 - %1 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %gpu_ref, 1 - store { i1, i64 } %1, ptr %"4_0", align 4 + call void @run_gpu_validation(), !dbg !11 + %gpu_ref_ptr = alloca i64, align 8, !dbg !11 + %gpu_ref_call = call i8 @gpu_init(i64 %"2_01", ptr %gpu_ref_ptr), !dbg !11 + call void @validate_gpu_response(i8 %gpu_ref_call), !dbg !11 + %gpu_ref = load i64, ptr %gpu_ref_ptr, align 4, !dbg !11 + %1 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %gpu_ref, 1, !dbg !11 + store { i1, i64 } %1, ptr %"4_0", align 4, !dbg !11 %"4_02" = load { i1, i64 }, ptr %"4_0", align 4 store { i1, i64 } %"4_02", ptr %"0", align 4 %"03" = load { i1, i64 }, ptr %"0", align 4 @@ -34,18 +34,18 @@ entry_block: ; preds = %alloca_block ; Function Attrs: noinline define void @run_gpu_validation() #0 { entry: - %validated = load i8, ptr @gpu_validated, align 1 - %already_validated = icmp ne i8 %validated, 0 - br i1 %already_validated, label %done, label %validate + %validated = load i8, ptr @gpu_validated, align 1, !dbg !11 + %already_validated = icmp ne i8 %validated, 0, !dbg !11 + br i1 %already_validated, label %done, label %validate, !dbg !11 done: ; preds = %entry - ret void + ret void, !dbg !11 validate: ; preds = %entry - %validate_call = call i8 @gpu_validate_api(i64 0, i64 1, i64 0) - call void @validate_gpu_response(i8 %validate_call) - store i8 1, ptr @gpu_validated, align 1 - ret void + %validate_call = call i8 @gpu_validate_api(i64 0, i64 1, i64 0), !dbg !11 + call void @validate_gpu_response(i8 %validate_call), !dbg !11 + store i8 1, ptr @gpu_validated, align 1, !dbg !11 + ret void, !dbg !11 } declare i8 @gpu_validate_api(i64, i64, i64) @@ -53,25 +53,25 @@ declare i8 @gpu_validate_api(i64, i64, i64) ; Function Attrs: noinline define void @validate_gpu_response(i8 %0) #0 { entry: - %success = icmp ne i8 %0, 0 - br i1 %success, label %ok, label %err + %success = icmp ne i8 %0, 0, !dbg !11 + br i1 %success, label %ok, label %err, !dbg !11 ok: ; preds = %entry - ret void + ret void, !dbg !11 err: ; preds = %entry - call void @gpu_error_handler() - unreachable + call void @gpu_error_handler(), !dbg !11 + unreachable, !dbg !11 } ; Function Attrs: noinline define void @gpu_error_handler() #0 { entry: - %error_message = call ptr @gpu_get_error() - %is_null = icmp eq ptr %error_message, null - %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message - call void @panic_str(i32 70002, ptr %error_message_nonnull) - unreachable + %error_message = call ptr @gpu_get_error(), !dbg !11 + %is_null = icmp eq ptr %error_message, null, !dbg !11 + %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message, !dbg !11 + call void @panic_str(i32 70002, ptr %error_message_nonnull), !dbg !11 + unreachable, !dbg !11 } declare ptr @gpu_get_error() @@ -83,3 +83,19 @@ declare i8 @gpu_init(i64, ptr) attributes #0 = { noinline } attributes #1 = { noreturn } + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !10} +!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i1, i64 }", file: !2, size: 8, align: 8, elements: !8) +!8 = !{!9, !10} +!9 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) +!10 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!11 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_lookup_by_id.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_lookup_by_id.snap index 6404ffa44..25bb13e95 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_lookup_by_id.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_lookup_by_id.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal i64 @_hl.main.1({} %0) { +define internal i64 @_hl.main.1({} %0) !dbg !3 { alloca_block: %"0" = alloca i64, align 8 %"2_0" = alloca {}, align 8 @@ -15,9 +15,24 @@ alloca_block: entry_block: ; preds = %alloca_block store {} %0, ptr %"2_0", align 1 %"2_01" = load {}, ptr %"2_0", align 1 - store i64 42, ptr %"4_0", align 4 + store i64 42, ptr %"4_0", align 4, !dbg !10 %"4_02" = load i64, ptr %"4_0", align 4 store i64 %"4_02", ptr %"0", align 4 %"03" = load i64, ptr %"0", align 4 ret i64 %"03" } + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !8} +!7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!8 = !DICompositeType(tag: DW_TAG_structure_type, name: "{}", file: !2, align: 8, elements: !9) +!9 = !{} +!10 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_lookup_by_name.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_lookup_by_name.snap index 4eeaf454f..aac6d7621 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_lookup_by_name.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_lookup_by_name.snap @@ -11,7 +11,7 @@ source_filename = "test_context" @no_gpu_error = private unnamed_addr constant [27 x i8] c"No error message available\00", align 1 @function_name = private unnamed_addr constant [17 x i8] c"example_function\00", align 1 -define internal i64 @_hl.main.1({} %0) { +define internal i64 @_hl.main.1({} %0) !dbg !3 { alloca_block: %"0" = alloca i64, align 8 %"2_0" = alloca {}, align 8 @@ -21,8 +21,8 @@ alloca_block: entry_block: ; preds = %alloca_block store {} %0, ptr %"2_0", align 1 %"2_01" = load {}, ptr %"2_0", align 1 - %function_id_call = call i64 @gpu_function_id_example_function() - store i64 %function_id_call, ptr %"4_0", align 4 + %function_id_call = call i64 @gpu_function_id_example_function(), !dbg !10 + store i64 %function_id_call, ptr %"4_0", align 4, !dbg !10 %"4_02" = load i64, ptr %"4_0", align 4 store i64 %"4_02", ptr %"0", align 4 %"03" = load i64, ptr %"0", align 4 @@ -32,40 +32,40 @@ entry_block: ; preds = %alloca_block ; Function Attrs: noinline define i64 @gpu_function_id_example_function() #0 { entry: - %function_id = load i8, ptr @gpu_cache_is_set_function_id_example_function, align 1 - %needs_lookup = icmp eq i8 %function_id, 0 - br i1 %needs_lookup, label %lookup, label %read_cache + %function_id = load i8, ptr @gpu_cache_is_set_function_id_example_function, align 1, !dbg !10 + %needs_lookup = icmp eq i8 %function_id, 0, !dbg !10 + br i1 %needs_lookup, label %lookup, label %read_cache, !dbg !10 lookup: ; preds = %entry - call void @run_gpu_validation() - %function_id_ptr = alloca i64, align 8 - %function_id_call = call i8 @gpu_get_function_id(ptr @function_name, ptr %function_id_ptr) - call void @validate_gpu_response(i8 %function_id_call) - %function_id2 = load i64, ptr %function_id_ptr, align 4 - store i64 %function_id2, ptr @gpu_cache_function_id_example_function, align 4 - store i8 1, ptr @gpu_cache_is_set_function_id_example_function, align 1 - ret i64 %function_id2 + call void @run_gpu_validation(), !dbg !10 + %function_id_ptr = alloca i64, align 8, !dbg !10 + %function_id_call = call i8 @gpu_get_function_id(ptr @function_name, ptr %function_id_ptr), !dbg !10 + call void @validate_gpu_response(i8 %function_id_call), !dbg !10 + %function_id2 = load i64, ptr %function_id_ptr, align 4, !dbg !10 + store i64 %function_id2, ptr @gpu_cache_function_id_example_function, align 4, !dbg !10 + store i8 1, ptr @gpu_cache_is_set_function_id_example_function, align 1, !dbg !10 + ret i64 %function_id2, !dbg !10 read_cache: ; preds = %entry - %function_id1 = load i64, ptr @gpu_cache_function_id_example_function, align 4 - ret i64 %function_id1 + %function_id1 = load i64, ptr @gpu_cache_function_id_example_function, align 4, !dbg !10 + ret i64 %function_id1, !dbg !10 } ; Function Attrs: noinline define void @run_gpu_validation() #0 { entry: - %validated = load i8, ptr @gpu_validated, align 1 - %already_validated = icmp ne i8 %validated, 0 - br i1 %already_validated, label %done, label %validate + %validated = load i8, ptr @gpu_validated, align 1, !dbg !10 + %already_validated = icmp ne i8 %validated, 0, !dbg !10 + br i1 %already_validated, label %done, label %validate, !dbg !10 done: ; preds = %entry - ret void + ret void, !dbg !10 validate: ; preds = %entry - %validate_call = call i8 @gpu_validate_api(i64 0, i64 1, i64 0) - call void @validate_gpu_response(i8 %validate_call) - store i8 1, ptr @gpu_validated, align 1 - ret void + %validate_call = call i8 @gpu_validate_api(i64 0, i64 1, i64 0), !dbg !10 + call void @validate_gpu_response(i8 %validate_call), !dbg !10 + store i8 1, ptr @gpu_validated, align 1, !dbg !10 + ret void, !dbg !10 } declare i8 @gpu_validate_api(i64, i64, i64) @@ -73,25 +73,25 @@ declare i8 @gpu_validate_api(i64, i64, i64) ; Function Attrs: noinline define void @validate_gpu_response(i8 %0) #0 { entry: - %success = icmp ne i8 %0, 0 - br i1 %success, label %ok, label %err + %success = icmp ne i8 %0, 0, !dbg !10 + br i1 %success, label %ok, label %err, !dbg !10 ok: ; preds = %entry - ret void + ret void, !dbg !10 err: ; preds = %entry - call void @gpu_error_handler() - unreachable + call void @gpu_error_handler(), !dbg !10 + unreachable, !dbg !10 } ; Function Attrs: noinline define void @gpu_error_handler() #0 { entry: - %error_message = call ptr @gpu_get_error() - %is_null = icmp eq ptr %error_message, null - %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message - call void @panic_str(i32 70002, ptr %error_message_nonnull) - unreachable + %error_message = call ptr @gpu_get_error(), !dbg !10 + %is_null = icmp eq ptr %error_message, null, !dbg !10 + %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message, !dbg !10 + call void @panic_str(i32 70002, ptr %error_message_nonnull), !dbg !10 + unreachable, !dbg !10 } declare ptr @gpu_get_error() @@ -103,3 +103,18 @@ declare i8 @gpu_get_function_id(ptr, ptr) attributes #0 = { noinline } attributes #1 = { noreturn } + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !8} +!7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!8 = !DICompositeType(tag: DW_TAG_structure_type, name: "{}", file: !2, align: 8, elements: !9) +!9 = !{} +!10 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_read_result_float.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_read_result_float.snap index 54c895b5a..fdd9a09cc 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_read_result_float.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_read_result_float.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @no_gpu_error = private unnamed_addr constant [27 x i8] c"No error message available\00", align 1 -define internal { i64, double } @_hl.main.1(i64 %0) { +define internal { i64, double } @_hl.main.1(i64 %0) !dbg !3 { alloca_block: %"0" = alloca i64, align 8 %"1" = alloca double, align 8 @@ -19,12 +19,12 @@ alloca_block: entry_block: ; preds = %alloca_block store i64 %0, ptr %"2_0", align 4 %"2_01" = load i64, ptr %"2_0", align 4 - %int_result = alloca i64, align 8 - %read_status = call i8 @gpu_get_result(i64 %"2_01", i64 8, ptr %int_result) - call void @validate_gpu_response(i8 %read_status) - %result = load double, ptr %int_result, align 8 - store i64 %"2_01", ptr %"4_0", align 4 - store double %result, ptr %"4_1", align 8 + %int_result = alloca i64, align 8, !dbg !11 + %read_status = call i8 @gpu_get_result(i64 %"2_01", i64 8, ptr %int_result), !dbg !11 + call void @validate_gpu_response(i8 %read_status), !dbg !11 + %result = load double, ptr %int_result, align 8, !dbg !11 + store i64 %"2_01", ptr %"4_0", align 4, !dbg !11 + store double %result, ptr %"4_1", align 8, !dbg !11 %"4_02" = load i64, ptr %"4_0", align 4 %"4_13" = load double, ptr %"4_1", align 8 store i64 %"4_02", ptr %"0", align 4 @@ -41,25 +41,25 @@ declare i8 @gpu_get_result(i64, i64, ptr) ; Function Attrs: noinline define void @validate_gpu_response(i8 %0) #0 { entry: - %success = icmp ne i8 %0, 0 - br i1 %success, label %ok, label %err + %success = icmp ne i8 %0, 0, !dbg !11 + br i1 %success, label %ok, label %err, !dbg !11 ok: ; preds = %entry - ret void + ret void, !dbg !11 err: ; preds = %entry - call void @gpu_error_handler() - unreachable + call void @gpu_error_handler(), !dbg !11 + unreachable, !dbg !11 } ; Function Attrs: noinline define void @gpu_error_handler() #0 { entry: - %error_message = call ptr @gpu_get_error() - %is_null = icmp eq ptr %error_message, null - %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message - call void @panic_str(i32 70002, ptr %error_message_nonnull) - unreachable + %error_message = call ptr @gpu_get_error(), !dbg !11 + %is_null = icmp eq ptr %error_message, null, !dbg !11 + %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message, !dbg !11 + call void @panic_str(i32 70002, ptr %error_message_nonnull), !dbg !11 + unreachable, !dbg !11 } declare ptr @gpu_get_error() @@ -69,3 +69,19 @@ declare void @panic_str(i32, ptr) #1 attributes #0 = { noinline } attributes #1 = { noreturn } + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !9} +!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i64, double }", file: !2, size: 16, align: 8, elements: !8) +!8 = !{!9, !10} +!9 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!10 = !DIBasicType(name: "f64", size: 64, encoding: DW_ATE_float) +!11 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_read_result_int.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_read_result_int.snap index 1583dfee4..355c1e29c 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_read_result_int.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_read_result_int.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @no_gpu_error = private unnamed_addr constant [27 x i8] c"No error message available\00", align 1 -define internal { i64, i64 } @_hl.main.1(i64 %0) { +define internal { i64, i64 } @_hl.main.1(i64 %0) !dbg !3 { alloca_block: %"0" = alloca i64, align 8 %"1" = alloca i64, align 8 @@ -19,12 +19,12 @@ alloca_block: entry_block: ; preds = %alloca_block store i64 %0, ptr %"2_0", align 4 %"2_01" = load i64, ptr %"2_0", align 4 - %int_result = alloca i64, align 8 - %read_status = call i8 @gpu_get_result(i64 %"2_01", i64 8, ptr %int_result) - call void @validate_gpu_response(i8 %read_status) - %result = load i64, ptr %int_result, align 4 - store i64 %"2_01", ptr %"4_0", align 4 - store i64 %result, ptr %"4_1", align 4 + %int_result = alloca i64, align 8, !dbg !10 + %read_status = call i8 @gpu_get_result(i64 %"2_01", i64 8, ptr %int_result), !dbg !10 + call void @validate_gpu_response(i8 %read_status), !dbg !10 + %result = load i64, ptr %int_result, align 4, !dbg !10 + store i64 %"2_01", ptr %"4_0", align 4, !dbg !10 + store i64 %result, ptr %"4_1", align 4, !dbg !10 %"4_02" = load i64, ptr %"4_0", align 4 %"4_13" = load i64, ptr %"4_1", align 4 store i64 %"4_02", ptr %"0", align 4 @@ -41,25 +41,25 @@ declare i8 @gpu_get_result(i64, i64, ptr) ; Function Attrs: noinline define void @validate_gpu_response(i8 %0) #0 { entry: - %success = icmp ne i8 %0, 0 - br i1 %success, label %ok, label %err + %success = icmp ne i8 %0, 0, !dbg !10 + br i1 %success, label %ok, label %err, !dbg !10 ok: ; preds = %entry - ret void + ret void, !dbg !10 err: ; preds = %entry - call void @gpu_error_handler() - unreachable + call void @gpu_error_handler(), !dbg !10 + unreachable, !dbg !10 } ; Function Attrs: noinline define void @gpu_error_handler() #0 { entry: - %error_message = call ptr @gpu_get_error() - %is_null = icmp eq ptr %error_message, null - %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message - call void @panic_str(i32 70002, ptr %error_message_nonnull) - unreachable + %error_message = call ptr @gpu_get_error(), !dbg !10 + %is_null = icmp eq ptr %error_message, null, !dbg !10 + %error_message_nonnull = select i1 %is_null, ptr @no_gpu_error, ptr %error_message, !dbg !10 + call void @panic_str(i32 70002, ptr %error_message_nonnull), !dbg !10 + unreachable, !dbg !10 } declare ptr @gpu_get_error() @@ -69,3 +69,18 @@ declare void @panic_str(i32, ptr) #1 attributes #0 = { noinline } attributes #1 = { noreturn } + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !9} +!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i64, i64 }", file: !2, size: 16, align: 8, elements: !8) +!8 = !{!9, !9} +!9 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!10 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/debug.rs b/tket-qsystem/src/llvm/debug.rs index ac4823ec3..5cd992ba7 100644 --- a/tket-qsystem/src/llvm/debug.rs +++ b/tket-qsystem/src/llvm/debug.rs @@ -139,7 +139,7 @@ mod test { .add_float_extensions() }); let ext_op = op.to_extension_op().unwrap().into(); - let hugr = single_op_hugr(ext_op); + let mut hugr = single_op_hugr(ext_op); check_emission!(hugr, llvm_ctx); } } diff --git a/tket-qsystem/src/llvm/futures.rs b/tket-qsystem/src/llvm/futures.rs index 993f744b9..85cab3bd2 100644 --- a/tket-qsystem/src/llvm/futures.rs +++ b/tket-qsystem/src/llvm/futures.rs @@ -211,7 +211,7 @@ mod test { ceb.add_extension(FuturesCodegenExtension) .add_default_int_extensions() }); - let hugr = single_op_hugr(op.to_extension_op().unwrap().into()); + let mut hugr = single_op_hugr(op.to_extension_op().unwrap().into()); check_emission!(hugr, llvm_ctx); } } diff --git a/tket-qsystem/src/llvm/prelude.rs b/tket-qsystem/src/llvm/prelude.rs index c0763741c..379ecc93c 100644 --- a/tket-qsystem/src/llvm/prelude.rs +++ b/tket-qsystem/src/llvm/prelude.rs @@ -227,7 +227,7 @@ mod test { .instantiate_extension_op(&PANIC_OP_ID, [type_arg_2q.clone(), type_arg_2q.clone()]) .unwrap(); - let hugr = SimpleHugrConfig::new() + let mut hugr = SimpleHugrConfig::new() .with_ins(vec![qb_t(), qb_t()]) .with_outs(vec![qb_t(), qb_t()]) .with_extensions(prelude::PRELUDE_REGISTRY.to_owned()) @@ -257,7 +257,7 @@ mod test { .instantiate_extension_op(&EXIT_OP_ID, [type_arg_2q.clone(), type_arg_2q.clone()]) .unwrap(); - let hugr = SimpleHugrConfig::new() + let mut hugr = SimpleHugrConfig::new() .with_ins(vec![qb_t(), qb_t()]) .with_outs(vec![qb_t(), qb_t()]) .with_extensions(prelude::PRELUDE_REGISTRY.to_owned()) diff --git a/tket-qsystem/src/llvm/random.rs b/tket-qsystem/src/llvm/random.rs index 133c09d35..10d976337 100644 --- a/tket-qsystem/src/llvm/random.rs +++ b/tket-qsystem/src/llvm/random.rs @@ -183,7 +183,7 @@ mod test { .add_logic_extensions() }); let ext_op = op.to_extension_op().unwrap().into(); - let hugr = single_op_hugr(ext_op); + let mut hugr = single_op_hugr(ext_op); check_emission!(hugr, llvm_ctx); } } diff --git a/tket-qsystem/src/llvm/result.rs b/tket-qsystem/src/llvm/result.rs index 3d85323ee..7727ad746 100644 --- a/tket-qsystem/src/llvm/result.rs +++ b/tket-qsystem/src/llvm/result.rs @@ -332,7 +332,7 @@ mod test { .add_float_extensions() }); let ext_op = op.to_extension_op().unwrap().into(); - let hugr = single_op_hugr(ext_op); + let mut hugr = single_op_hugr(ext_op); check_emission!(hugr, llvm_ctx); } } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@llvm21_2.snap index 94ba83daa..8172f7fb3 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@llvm21_2.snap @@ -7,30 +7,46 @@ source_filename = "test_context" @res_test_state.900F7606.0 = private constant [29 x i8] c"\1CUSER:STATE:test_state_result" -define internal { ptr, i64 } @_hl.main.1({ ptr, i64 } %0) { +define internal { ptr, i64 } @_hl.main.1({ ptr, i64 } %0) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %tag_len = load i8, ptr @res_test_state.900F7606.0, align 1 - %tag_len2 = zext i8 %tag_len to i64 - %array_ptr = extractvalue { ptr, i64 } %0, 0 - %array_offset = extractvalue { ptr, i64 } %0, 1 - %1 = getelementptr inbounds [2 x i64], ptr %array_ptr, i64 %array_offset - %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 - %x_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 0 - %y_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 1 - %arr_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 2 - %mask_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 3 - %2 = alloca i1, i32 2, align 1 - store [2 x i1] zeroinitializer, ptr %2, align 1 - store i32 2, ptr %x_ptr, align 4 - store i32 1, ptr %y_ptr, align 4 - store ptr %1, ptr %arr_ptr, align 8 - store ptr %2, ptr %mask_ptr, align 8 - %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1 - call void @print_state_result(ptr @res_test_state.900F7606.0, i64 %tag_len2, ptr %out_arr_alloca) + %tag_len = load i8, ptr @res_test_state.900F7606.0, align 1, !dbg !11 + %tag_len2 = zext i8 %tag_len to i64, !dbg !11 + %array_ptr = extractvalue { ptr, i64 } %0, 0, !dbg !11 + %array_offset = extractvalue { ptr, i64 } %0, 1, !dbg !11 + %1 = getelementptr inbounds [2 x i64], ptr %array_ptr, i64 %array_offset, !dbg !11 + %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8, !dbg !11 + %x_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 0, !dbg !11 + %y_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 1, !dbg !11 + %arr_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 2, !dbg !11 + %mask_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 3, !dbg !11 + %2 = alloca i1, i32 2, align 1, !dbg !11 + store [2 x i1] zeroinitializer, ptr %2, align 1, !dbg !11 + store i32 2, ptr %x_ptr, align 4, !dbg !11 + store i32 1, ptr %y_ptr, align 4, !dbg !11 + store ptr %1, ptr %arr_ptr, align 8, !dbg !11 + store ptr %2, ptr %mask_ptr, align 8, !dbg !11 + %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1, !dbg !11 + call void @print_state_result(ptr @res_test_state.900F7606.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 ret { ptr, i64 } %0 } declare void @print_state_result(ptr, i64, ptr) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !7} +!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ ptr, i64 }", file: !2, size: 16, align: 8, elements: !8) +!8 = !{!9, !10} +!9 = !DIBasicType(name: "ptr", size: 64, encoding: DW_ATE_address) +!10 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!11 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@pre-mem2reg@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@pre-mem2reg@llvm21_2.snap index ad0c265b3..905b04933 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@pre-mem2reg@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@pre-mem2reg@llvm21_2.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @res_test_state.900F7606.0 = private constant [29 x i8] c"\1CUSER:STATE:test_state_result" -define internal { ptr, i64 } @_hl.main.1({ ptr, i64 } %0) { +define internal { ptr, i64 } @_hl.main.1({ ptr, i64 } %0) !dbg !3 { alloca_block: %"0" = alloca { ptr, i64 }, align 8 %"2_0" = alloca { ptr, i64 }, align 8 @@ -17,25 +17,25 @@ alloca_block: entry_block: ; preds = %alloca_block store { ptr, i64 } %0, ptr %"2_0", align 8 %"2_01" = load { ptr, i64 }, ptr %"2_0", align 8 - %tag_len = load i8, ptr @res_test_state.900F7606.0, align 1 - %tag_len2 = zext i8 %tag_len to i64 - %array_ptr = extractvalue { ptr, i64 } %"2_01", 0 - %array_offset = extractvalue { ptr, i64 } %"2_01", 1 - %1 = getelementptr inbounds [2 x i64], ptr %array_ptr, i64 %array_offset - %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 - %x_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 0 - %y_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 1 - %arr_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 2 - %mask_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 3 - %2 = alloca i1, i32 2, align 1 - store [2 x i1] zeroinitializer, ptr %2, align 1 - store i32 2, ptr %x_ptr, align 4 - store i32 1, ptr %y_ptr, align 4 - store ptr %1, ptr %arr_ptr, align 8 - store ptr %2, ptr %mask_ptr, align 8 - %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1 - call void @print_state_result(ptr @res_test_state.900F7606.0, i64 %tag_len2, ptr %out_arr_alloca) - store { ptr, i64 } %"2_01", ptr %"4_0", align 8 + %tag_len = load i8, ptr @res_test_state.900F7606.0, align 1, !dbg !11 + %tag_len2 = zext i8 %tag_len to i64, !dbg !11 + %array_ptr = extractvalue { ptr, i64 } %"2_01", 0, !dbg !11 + %array_offset = extractvalue { ptr, i64 } %"2_01", 1, !dbg !11 + %1 = getelementptr inbounds [2 x i64], ptr %array_ptr, i64 %array_offset, !dbg !11 + %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8, !dbg !11 + %x_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 0, !dbg !11 + %y_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 1, !dbg !11 + %arr_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 2, !dbg !11 + %mask_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 3, !dbg !11 + %2 = alloca i1, i32 2, align 1, !dbg !11 + store [2 x i1] zeroinitializer, ptr %2, align 1, !dbg !11 + store i32 2, ptr %x_ptr, align 4, !dbg !11 + store i32 1, ptr %y_ptr, align 4, !dbg !11 + store ptr %1, ptr %arr_ptr, align 8, !dbg !11 + store ptr %2, ptr %mask_ptr, align 8, !dbg !11 + %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1, !dbg !11 + call void @print_state_result(ptr @res_test_state.900F7606.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 + store { ptr, i64 } %"2_01", ptr %"4_0", align 8, !dbg !11 %"4_03" = load { ptr, i64 }, ptr %"4_0", align 8 store { ptr, i64 } %"4_03", ptr %"0", align 8 %"04" = load { ptr, i64 }, ptr %"0", align 8 @@ -43,3 +43,19 @@ entry_block: ; preds = %alloca_block } declare void @print_state_result(ptr, i64, ptr) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !7} +!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ ptr, i64 }", file: !2, size: 16, align: 8, elements: !8) +!8 = !{!9, !10} +!9 = !DIBasicType(name: "ptr", size: 64, encoding: DW_ATE_address) +!10 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!11 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_1.snap index 03ded3943..d118124a6 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_1.snap @@ -5,17 +5,31 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal i1 @_hl.main.1(i64 %0) { +define internal i1 @_hl.main.1(i64 %0) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %read_bool = call i1 @___read_future_bool(i64 %0) - call void @___dec_future_refcount(i64 %0) - %measure = select i1 %read_bool, i1 true, i1 false + %read_bool = call i1 @___read_future_bool(i64 %0), !dbg !9 + call void @___dec_future_refcount(i64 %0), !dbg !9 + %measure = select i1 %read_bool, i1 true, i1 false, !dbg !9 ret i1 %measure } declare i1 @___read_future_bool(i64) declare void @___dec_future_refcount(i64) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !8} +!7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) +!8 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!9 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_2.snap index 9437cd92a..8a5a32420 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_2.snap @@ -5,15 +5,30 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal { i64, i64 } @_hl.main.1(i64 %0) { +define internal { i64, i64 } @_hl.main.1(i64 %0) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - call void @___inc_future_refcount(i64 %0) + call void @___inc_future_refcount(i64 %0), !dbg !10 %mrv = insertvalue { i64, i64 } poison, i64 %0, 0 %mrv6 = insertvalue { i64, i64 } %mrv, i64 %0, 1 ret { i64, i64 } %mrv6 } declare void @___inc_future_refcount(i64) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !9} +!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i64, i64 }", file: !2, size: 16, align: 8, elements: !8) +!8 = !{!9, !9} +!9 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!10 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_3.snap index 1dc8154d9..0e2716153 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_3.snap @@ -5,13 +5,26 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal void @_hl.main.1(i64 %0) { +define internal void @_hl.main.1(i64 %0) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - call void @___dec_future_refcount(i64 %0) + call void @___dec_future_refcount(i64 %0), !dbg !8 ret void } declare void @___dec_future_refcount(i64) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{null, !7} +!7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_4.snap index 3dd7fa44c..9e2ac5419 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_4.snap @@ -5,16 +5,29 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal i64 @_hl.main.1(i64 %0) { +define internal i64 @_hl.main.1(i64 %0) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %read_uint = call i64 @___read_future_uint(i64 %0) - call void @___dec_future_refcount(i64 %0) + %read_uint = call i64 @___read_future_uint(i64 %0), !dbg !8 + call void @___dec_future_refcount(i64 %0), !dbg !8 ret i64 %read_uint } declare i64 @___read_future_uint(i64) declare void @___dec_future_refcount(i64) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !7} +!7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_5.snap index 9437cd92a..8a5a32420 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_5.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_5.snap @@ -5,15 +5,30 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal { i64, i64 } @_hl.main.1(i64 %0) { +define internal { i64, i64 } @_hl.main.1(i64 %0) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - call void @___inc_future_refcount(i64 %0) + call void @___inc_future_refcount(i64 %0), !dbg !10 %mrv = insertvalue { i64, i64 } poison, i64 %0, 0 %mrv6 = insertvalue { i64, i64 } %mrv, i64 %0, 1 ret { i64, i64 } %mrv6 } declare void @___inc_future_refcount(i64) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !9} +!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i64, i64 }", file: !2, size: 16, align: 8, elements: !8) +!8 = !{!9, !9} +!9 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!10 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_6.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_6.snap index 1dc8154d9..0e2716153 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_6.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_6.snap @@ -5,13 +5,26 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal void @_hl.main.1(i64 %0) { +define internal void @_hl.main.1(i64 %0) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - call void @___dec_future_refcount(i64 %0) + call void @___dec_future_refcount(i64 %0), !dbg !8 ret void } declare void @___dec_future_refcount(i64) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{null, !7} +!7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_1.snap index 36db9fe95..6fbc6c659 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_1.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal i1 @_hl.main.1(i64 %0) { +define internal i1 @_hl.main.1(i64 %0) !dbg !3 { alloca_block: %"0" = alloca i1, align 1 %"2_0" = alloca i64, align 8 @@ -15,10 +15,10 @@ alloca_block: entry_block: ; preds = %alloca_block store i64 %0, ptr %"2_0", align 4 %"2_01" = load i64, ptr %"2_0", align 4 - %read_bool = call i1 @___read_future_bool(i64 %"2_01") - call void @___dec_future_refcount(i64 %"2_01") - %measure = select i1 %read_bool, i1 true, i1 false - store i1 %measure, ptr %"4_0", align 1 + %read_bool = call i1 @___read_future_bool(i64 %"2_01"), !dbg !9 + call void @___dec_future_refcount(i64 %"2_01"), !dbg !9 + %measure = select i1 %read_bool, i1 true, i1 false, !dbg !9 + store i1 %measure, ptr %"4_0", align 1, !dbg !9 %"4_02" = load i1, ptr %"4_0", align 1 store i1 %"4_02", ptr %"0", align 1 %"03" = load i1, ptr %"0", align 1 @@ -28,3 +28,17 @@ entry_block: ; preds = %alloca_block declare i1 @___read_future_bool(i64) declare void @___dec_future_refcount(i64) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !8} +!7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) +!8 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!9 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_2.snap index 4e69ebda0..24362b771 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_2.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal { i64, i64 } @_hl.main.1(i64 %0) { +define internal { i64, i64 } @_hl.main.1(i64 %0) !dbg !3 { alloca_block: %"0" = alloca i64, align 8 %"1" = alloca i64, align 8 @@ -17,9 +17,9 @@ alloca_block: entry_block: ; preds = %alloca_block store i64 %0, ptr %"2_0", align 4 %"2_01" = load i64, ptr %"2_0", align 4 - call void @___inc_future_refcount(i64 %"2_01") - store i64 %"2_01", ptr %"4_0", align 4 - store i64 %"2_01", ptr %"4_1", align 4 + call void @___inc_future_refcount(i64 %"2_01"), !dbg !10 + store i64 %"2_01", ptr %"4_0", align 4, !dbg !10 + store i64 %"2_01", ptr %"4_1", align 4, !dbg !10 %"4_02" = load i64, ptr %"4_0", align 4 %"4_13" = load i64, ptr %"4_1", align 4 store i64 %"4_02", ptr %"0", align 4 @@ -32,3 +32,18 @@ entry_block: ; preds = %alloca_block } declare void @___inc_future_refcount(i64) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !9} +!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i64, i64 }", file: !2, size: 16, align: 8, elements: !8) +!8 = !{!9, !9} +!9 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!10 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_3.snap index ffc5672d6..7a720732f 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_3.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal void @_hl.main.1(i64 %0) { +define internal void @_hl.main.1(i64 %0) !dbg !3 { alloca_block: %"2_0" = alloca i64, align 8 br label %entry_block @@ -13,8 +13,21 @@ alloca_block: entry_block: ; preds = %alloca_block store i64 %0, ptr %"2_0", align 4 %"2_01" = load i64, ptr %"2_0", align 4 - call void @___dec_future_refcount(i64 %"2_01") + call void @___dec_future_refcount(i64 %"2_01"), !dbg !8 ret void } declare void @___dec_future_refcount(i64) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{null, !7} +!7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_4.snap index bf61f0507..eafd7da3d 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_4.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal i64 @_hl.main.1(i64 %0) { +define internal i64 @_hl.main.1(i64 %0) !dbg !3 { alloca_block: %"0" = alloca i64, align 8 %"2_0" = alloca i64, align 8 @@ -15,9 +15,9 @@ alloca_block: entry_block: ; preds = %alloca_block store i64 %0, ptr %"2_0", align 4 %"2_01" = load i64, ptr %"2_0", align 4 - %read_uint = call i64 @___read_future_uint(i64 %"2_01") - call void @___dec_future_refcount(i64 %"2_01") - store i64 %read_uint, ptr %"4_0", align 4 + %read_uint = call i64 @___read_future_uint(i64 %"2_01"), !dbg !8 + call void @___dec_future_refcount(i64 %"2_01"), !dbg !8 + store i64 %read_uint, ptr %"4_0", align 4, !dbg !8 %"4_02" = load i64, ptr %"4_0", align 4 store i64 %"4_02", ptr %"0", align 4 %"03" = load i64, ptr %"0", align 4 @@ -27,3 +27,16 @@ entry_block: ; preds = %alloca_block declare i64 @___read_future_uint(i64) declare void @___dec_future_refcount(i64) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !7} +!7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_5.snap index 4e69ebda0..24362b771 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_5.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_5.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal { i64, i64 } @_hl.main.1(i64 %0) { +define internal { i64, i64 } @_hl.main.1(i64 %0) !dbg !3 { alloca_block: %"0" = alloca i64, align 8 %"1" = alloca i64, align 8 @@ -17,9 +17,9 @@ alloca_block: entry_block: ; preds = %alloca_block store i64 %0, ptr %"2_0", align 4 %"2_01" = load i64, ptr %"2_0", align 4 - call void @___inc_future_refcount(i64 %"2_01") - store i64 %"2_01", ptr %"4_0", align 4 - store i64 %"2_01", ptr %"4_1", align 4 + call void @___inc_future_refcount(i64 %"2_01"), !dbg !10 + store i64 %"2_01", ptr %"4_0", align 4, !dbg !10 + store i64 %"2_01", ptr %"4_1", align 4, !dbg !10 %"4_02" = load i64, ptr %"4_0", align 4 %"4_13" = load i64, ptr %"4_1", align 4 store i64 %"4_02", ptr %"0", align 4 @@ -32,3 +32,18 @@ entry_block: ; preds = %alloca_block } declare void @___inc_future_refcount(i64) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !9} +!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i64, i64 }", file: !2, size: 16, align: 8, elements: !8) +!8 = !{!9, !9} +!9 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!10 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_6.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_6.snap index ffc5672d6..7a720732f 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_6.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_6.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal void @_hl.main.1(i64 %0) { +define internal void @_hl.main.1(i64 %0) !dbg !3 { alloca_block: %"2_0" = alloca i64, align 8 br label %entry_block @@ -13,8 +13,21 @@ alloca_block: entry_block: ; preds = %alloca_block store i64 %0, ptr %"2_0", align 4 %"2_01" = load i64, ptr %"2_0", align 4 - call void @___dec_future_refcount(i64 %"2_01") + call void @___dec_future_refcount(i64 %"2_01"), !dbg !8 ret void } declare void @___dec_future_refcount(i64) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{null, !7} +!7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@llvm21_0.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@llvm21_0.snap index 5e06ce453..316f95a01 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@llvm21_0.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@llvm21_0.snap @@ -7,14 +7,14 @@ source_filename = "test_context" @e_EXIT.2B78BC40.0 = private constant [14 x i8] c"\0DEXIT:INT:EXIT" -define internal { i64, i64 } @_hl.main.1(i64 %0, i64 %1) { +define internal { i64, i64 } @_hl.main.1(i64 %0, i64 %1) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %2 = extractvalue { i32, ptr } { i32 42, ptr @e_EXIT.2B78BC40.0 }, 0 - %3 = extractvalue { i32, ptr } { i32 42, ptr @e_EXIT.2B78BC40.0 }, 1 - call void @panic(i32 %2, ptr %3) + %2 = extractvalue { i32, ptr } { i32 42, ptr @e_EXIT.2B78BC40.0 }, 0, !dbg !10 + %3 = extractvalue { i32, ptr } { i32 42, ptr @e_EXIT.2B78BC40.0 }, 1, !dbg !10 + call void @panic(i32 %2, ptr %3), !dbg !10 %mrv = insertvalue { i64, i64 } poison, i64 0, 0 %mrv8 = insertvalue { i64, i64 } %mrv, i64 0, 1 ret { i64, i64 } %mrv8 @@ -24,3 +24,18 @@ entry_block: ; preds = %alloca_block declare void @panic(i32, ptr) #0 attributes #0 = { noreturn } + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !9, !9} +!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i64, i64 }", file: !2, size: 16, align: 8, elements: !8) +!8 = !{!9, !9} +!9 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!10 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@pre-mem2reg@llvm21_0.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@pre-mem2reg@llvm21_0.snap index 331738b28..a28c7032b 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@pre-mem2reg@llvm21_0.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@pre-mem2reg@llvm21_0.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @e_EXIT.2B78BC40.0 = private constant [14 x i8] c"\0DEXIT:INT:EXIT" -define internal { i64, i64 } @_hl.main.1(i64 %0, i64 %1) { +define internal { i64, i64 } @_hl.main.1(i64 %0, i64 %1) !dbg !3 { alloca_block: %"0" = alloca i64, align 8 %"1" = alloca i64, align 8 @@ -25,11 +25,11 @@ entry_block: ; preds = %alloca_block %"5_01" = load { i32, ptr }, ptr %"5_0", align 8 %"2_02" = load i64, ptr %"2_0", align 4 %"2_13" = load i64, ptr %"2_1", align 4 - %2 = extractvalue { i32, ptr } %"5_01", 0 - %3 = extractvalue { i32, ptr } %"5_01", 1 - call void @panic(i32 %2, ptr %3) - store i64 0, ptr %"6_0", align 4 - store i64 0, ptr %"6_1", align 4 + %2 = extractvalue { i32, ptr } %"5_01", 0, !dbg !10 + %3 = extractvalue { i32, ptr } %"5_01", 1, !dbg !10 + call void @panic(i32 %2, ptr %3), !dbg !10 + store i64 0, ptr %"6_0", align 4, !dbg !10 + store i64 0, ptr %"6_1", align 4, !dbg !10 %"6_04" = load i64, ptr %"6_0", align 4 %"6_15" = load i64, ptr %"6_1", align 4 store i64 %"6_04", ptr %"0", align 4 @@ -45,3 +45,18 @@ entry_block: ; preds = %alloca_block declare void @panic(i32, ptr) #0 attributes #0 = { noreturn } + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !9, !9} +!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i64, i64 }", file: !2, size: 16, align: 8, elements: !8) +!8 = !{!9, !9} +!9 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!10 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@llvm21_0.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@llvm21_0.snap index 4c5fd6ab0..c155d1330 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@llvm21_0.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@llvm21_0.snap @@ -7,15 +7,15 @@ source_filename = "test_context" @e_PANIC.DF25FD88.0 = private constant [15 x i8] c"\0EEXIT:INT:PANIC" -define internal { i64, i64 } @_hl.main.1(i64 %0, i64 %1) { +define internal { i64, i64 } @_hl.main.1(i64 %0, i64 %1) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %2 = extractvalue { i32, ptr } { i32 42, ptr @e_PANIC.DF25FD88.0 }, 0 - %shift_code = add i32 %2, 1000 - %3 = extractvalue { i32, ptr } { i32 42, ptr @e_PANIC.DF25FD88.0 }, 1 - call void @panic(i32 %shift_code, ptr %3) + %2 = extractvalue { i32, ptr } { i32 42, ptr @e_PANIC.DF25FD88.0 }, 0, !dbg !10 + %shift_code = add i32 %2, 1000, !dbg !10 + %3 = extractvalue { i32, ptr } { i32 42, ptr @e_PANIC.DF25FD88.0 }, 1, !dbg !10 + call void @panic(i32 %shift_code, ptr %3), !dbg !10 %mrv = insertvalue { i64, i64 } poison, i64 0, 0 %mrv8 = insertvalue { i64, i64 } %mrv, i64 0, 1 ret { i64, i64 } %mrv8 @@ -25,3 +25,18 @@ entry_block: ; preds = %alloca_block declare void @panic(i32, ptr) #0 attributes #0 = { noreturn } + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !9, !9} +!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i64, i64 }", file: !2, size: 16, align: 8, elements: !8) +!8 = !{!9, !9} +!9 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!10 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@pre-mem2reg@llvm21_0.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@pre-mem2reg@llvm21_0.snap index 698d37033..bc5045219 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@pre-mem2reg@llvm21_0.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@pre-mem2reg@llvm21_0.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @e_PANIC.DF25FD88.0 = private constant [15 x i8] c"\0EEXIT:INT:PANIC" -define internal { i64, i64 } @_hl.main.1(i64 %0, i64 %1) { +define internal { i64, i64 } @_hl.main.1(i64 %0, i64 %1) !dbg !3 { alloca_block: %"0" = alloca i64, align 8 %"1" = alloca i64, align 8 @@ -25,12 +25,12 @@ entry_block: ; preds = %alloca_block %"5_01" = load { i32, ptr }, ptr %"5_0", align 8 %"2_02" = load i64, ptr %"2_0", align 4 %"2_13" = load i64, ptr %"2_1", align 4 - %2 = extractvalue { i32, ptr } %"5_01", 0 - %shift_code = add i32 %2, 1000 - %3 = extractvalue { i32, ptr } %"5_01", 1 - call void @panic(i32 %shift_code, ptr %3) - store i64 0, ptr %"6_0", align 4 - store i64 0, ptr %"6_1", align 4 + %2 = extractvalue { i32, ptr } %"5_01", 0, !dbg !10 + %shift_code = add i32 %2, 1000, !dbg !10 + %3 = extractvalue { i32, ptr } %"5_01", 1, !dbg !10 + call void @panic(i32 %shift_code, ptr %3), !dbg !10 + store i64 0, ptr %"6_0", align 4, !dbg !10 + store i64 0, ptr %"6_1", align 4, !dbg !10 %"6_04" = load i64, ptr %"6_0", align 4 %"6_15" = load i64, ptr %"6_1", align 4 store i64 %"6_04", ptr %"0", align 4 @@ -46,3 +46,18 @@ entry_block: ; preds = %alloca_block declare void @panic(i32, ptr) #0 attributes #0 = { noreturn } + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !9, !9} +!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i64, i64 }", file: !2, size: 16, align: 8, elements: !8) +!8 = !{!9, !9} +!9 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!10 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_1.snap index e9ff3cb50..6113ee876 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_1.snap @@ -5,13 +5,27 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal i64 @_hl.main.1(i64 %0, double %1) { +define internal i64 @_hl.main.1(i64 %0, double %1) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - call void @___rz(i64 %0, double %1) + call void @___rz(i64 %0, double %1), !dbg !9 ret i64 %0 } declare void @___rz(i64, double) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !7, !8} +!7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!8 = !DIBasicType(name: "f64", size: 64, encoding: DW_ATE_float) +!9 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_10.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_10.snap index d134bfc1c..5388c0ca7 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_10.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_10.snap @@ -5,16 +5,29 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal i64 @_hl.main.1(i64 %0) { +define internal i64 @_hl.main.1(i64 %0) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %lazy_measure_leaked = call i64 @___lazy_measure_leaked(i64 %0) - call void @___qfree(i64 %0) + %lazy_measure_leaked = call i64 @___lazy_measure_leaked(i64 %0), !dbg !8 + call void @___qfree(i64 %0), !dbg !8 ret i64 %lazy_measure_leaked } declare i64 @___lazy_measure_leaked(i64) declare void @___qfree(i64) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !7} +!7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_2.snap index a685d8d2e..0cfd93fe4 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_2.snap @@ -5,15 +5,31 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal { i64, i64 } @_hl.main.1(i64 %0, i64 %1, double %2) { +define internal { i64, i64 } @_hl.main.1(i64 %0, i64 %1, double %2) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - call void @___rzz(i64 %0, i64 %1, double %2) + call void @___rzz(i64 %0, i64 %1, double %2), !dbg !11 %mrv = insertvalue { i64, i64 } poison, i64 %0, 0 %mrv8 = insertvalue { i64, i64 } %mrv, i64 %1, 1 ret { i64, i64 } %mrv8 } declare void @___rzz(i64, i64, double) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !9, !9, !10} +!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i64, i64 }", file: !2, size: 16, align: 8, elements: !8) +!8 = !{!9, !9} +!9 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!10 = !DIBasicType(name: "f64", size: 64, encoding: DW_ATE_float) +!11 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_3.snap index a35d56a21..7ddd0e285 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_3.snap @@ -5,13 +5,27 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal i64 @_hl.main.1(i64 %0, double %1, double %2) { +define internal i64 @_hl.main.1(i64 %0, double %1, double %2) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - call void @___rxy(i64 %0, double %1, double %2) + call void @___rxy(i64 %0, double %1, double %2), !dbg !9 ret i64 %0 } declare void @___rxy(i64, double, double) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !7, !8, !8} +!7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!8 = !DIBasicType(name: "f64", size: 64, encoding: DW_ATE_float) +!9 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_4.snap index 56e998b93..29166b04d 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_4.snap @@ -5,13 +5,13 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal { i1, i64, i1 } @_hl.main.1(i64 %0) { +define internal { i1, i64, i1 } @_hl.main.1(i64 %0) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %lazy_measure = call i64 @___lazy_measure(i64 %0) - call void @___qfree(i64 %0) + %lazy_measure = call i64 @___lazy_measure(i64 %0), !dbg !11 + call void @___qfree(i64 %0), !dbg !11 %1 = insertvalue { i1, i64, i1 } { i1 true, i64 poison, i1 poison }, i64 %lazy_measure, 1 ret { i1, i64, i1 } %1 } @@ -19,3 +19,19 @@ entry_block: ; preds = %alloca_block declare i64 @___lazy_measure(i64) declare void @___qfree(i64) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/ZsHeDgUnyeIVwAutKJHaZEPSZwPXP/ycUvnujGxZKPRCTcNfs/EGLoPGCKHhMq/zeCBZoPGeHBxpWCFCAIgmDOG") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !10} +!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i1, i64, i1 }", file: !2, size: 8, align: 8, elements: !8) +!8 = !{!9, !10, !9} +!9 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) +!10 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!11 = !DILocation(line: 27583, column: 497, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_5.snap index 6790e71b0..52bcadf63 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_5.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_5.snap @@ -5,16 +5,29 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal i64 @_hl.main.1(i64 %0) { +define internal i64 @_hl.main.1(i64 %0) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %lazy_measure = call i64 @___lazy_measure(i64 %0) - call void @___qfree(i64 %0) + %lazy_measure = call i64 @___lazy_measure(i64 %0), !dbg !8 + call void @___qfree(i64 %0), !dbg !8 ret i64 %lazy_measure } declare i64 @___lazy_measure(i64) declare void @___qfree(i64) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !7} +!7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_6.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_6.snap index d3e065184..413865bee 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_6.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_6.snap @@ -5,25 +5,41 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal { i1, i64 } @_hl.main.1() { +define internal { i1, i64 } @_hl.main.1() !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %qalloc = call i64 @___qalloc() - %not_max = icmp ne i64 %qalloc, -1 - br i1 %not_max, label %reset_bb, label %id_bb + %qalloc = call i64 @___qalloc(), !dbg !11 + %not_max = icmp ne i64 %qalloc, -1, !dbg !11 + br i1 %not_max, label %reset_bb, label %id_bb, !dbg !11 reset_bb: ; preds = %entry_block - call void @___reset(i64 %qalloc) - br label %id_bb + call void @___reset(i64 %qalloc), !dbg !11 + br label %id_bb, !dbg !11 id_bb: ; preds = %entry_block, %reset_bb - %0 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc, 1 - %1 = select i1 %not_max, { i1, i64 } %0, { i1, i64 } { i1 false, i64 poison } + %0 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc, 1, !dbg !11 + %1 = select i1 %not_max, { i1, i64 } %0, { i1, i64 } { i1 false, i64 poison }, !dbg !11 ret { i1, i64 } %1 } declare i64 @___qalloc() declare void @___reset(i64) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7} +!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i1, i64 }", file: !2, size: 8, align: 8, elements: !8) +!8 = !{!9, !10} +!9 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) +!10 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!11 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_7.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_7.snap index 46476c4c3..f80ea63f0 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_7.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_7.snap @@ -5,13 +5,26 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal void @_hl.main.1(i64 %0) { +define internal void @_hl.main.1(i64 %0) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - call void @___qfree(i64 %0) + call void @___qfree(i64 %0), !dbg !8 ret void } declare void @___qfree(i64) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{null, !7} +!7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_8.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_8.snap index 3b781f3b2..4d4d6bc2f 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_8.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_8.snap @@ -5,13 +5,26 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal i64 @_hl.main.1(i64 %0) { +define internal i64 @_hl.main.1(i64 %0) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - call void @___reset(i64 %0) + call void @___reset(i64 %0), !dbg !8 ret i64 %0 } declare void @___reset(i64) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !7} +!7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_9.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_9.snap index 342767d90..9df9b97f3 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_9.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_9.snap @@ -5,13 +5,13 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal { i64, { i1, i64, i1 } } @_hl.main.1(i64 %0) { +define internal { i64, { i1, i64, i1 } } @_hl.main.1(i64 %0) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %lazy_measure = call i64 @___lazy_measure(i64 %0) - call void @___reset(i64 %0) + %lazy_measure = call i64 @___lazy_measure(i64 %0), !dbg !13 + call void @___reset(i64 %0), !dbg !13 %1 = insertvalue { i1, i64, i1 } { i1 true, i64 poison, i1 poison }, i64 %lazy_measure, 1 %mrv = insertvalue { i64, { i1, i64, i1 } } poison, i64 %0, 0 %mrv10 = insertvalue { i64, { i1, i64, i1 } } %mrv, { i1, i64, i1 } %1, 1 @@ -21,3 +21,21 @@ entry_block: ; preds = %alloca_block declare i64 @___lazy_measure(i64) declare void @___reset(i64) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/ZsHeDgUnyeIVwAutKJHaZEPSZwPXP/ycUvnujGxZKPRCTcNfs/EGLoPGCKHhMq/zeCBZoPGeHBxpWCFCAIgmDOG") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !9} +!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i64, { i1, i64, i1 } }", file: !2, size: 16, align: 8, elements: !8) +!8 = !{!9, !10} +!9 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!10 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i1, i64, i1 }", file: !2, size: 8, align: 8, elements: !11) +!11 = !{!12, !9, !12} +!12 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) +!13 = !DILocation(line: 27583, column: 497, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_1.snap index 463842459..6f25eb9d8 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_1.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal i64 @_hl.main.1(i64 %0, double %1) { +define internal i64 @_hl.main.1(i64 %0, double %1) !dbg !3 { alloca_block: %"0" = alloca i64, align 8 %"2_0" = alloca i64, align 8 @@ -18,8 +18,8 @@ entry_block: ; preds = %alloca_block store double %1, ptr %"2_1", align 8 %"2_01" = load i64, ptr %"2_0", align 4 %"2_12" = load double, ptr %"2_1", align 8 - call void @___rz(i64 %"2_01", double %"2_12") - store i64 %"2_01", ptr %"4_0", align 4 + call void @___rz(i64 %"2_01", double %"2_12"), !dbg !9 + store i64 %"2_01", ptr %"4_0", align 4, !dbg !9 %"4_03" = load i64, ptr %"4_0", align 4 store i64 %"4_03", ptr %"0", align 4 %"04" = load i64, ptr %"0", align 4 @@ -27,3 +27,17 @@ entry_block: ; preds = %alloca_block } declare void @___rz(i64, double) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !7, !8} +!7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!8 = !DIBasicType(name: "f64", size: 64, encoding: DW_ATE_float) +!9 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_10.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_10.snap index 1cdeb521d..ec57ece0f 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_10.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_10.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal i64 @_hl.main.1(i64 %0) { +define internal i64 @_hl.main.1(i64 %0) !dbg !3 { alloca_block: %"0" = alloca i64, align 8 %"2_0" = alloca i64, align 8 @@ -15,9 +15,9 @@ alloca_block: entry_block: ; preds = %alloca_block store i64 %0, ptr %"2_0", align 4 %"2_01" = load i64, ptr %"2_0", align 4 - %lazy_measure_leaked = call i64 @___lazy_measure_leaked(i64 %"2_01") - call void @___qfree(i64 %"2_01") - store i64 %lazy_measure_leaked, ptr %"4_0", align 4 + %lazy_measure_leaked = call i64 @___lazy_measure_leaked(i64 %"2_01"), !dbg !8 + call void @___qfree(i64 %"2_01"), !dbg !8 + store i64 %lazy_measure_leaked, ptr %"4_0", align 4, !dbg !8 %"4_02" = load i64, ptr %"4_0", align 4 store i64 %"4_02", ptr %"0", align 4 %"03" = load i64, ptr %"0", align 4 @@ -27,3 +27,16 @@ entry_block: ; preds = %alloca_block declare i64 @___lazy_measure_leaked(i64) declare void @___qfree(i64) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !7} +!7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_2.snap index ad630f9b4..0b1bfa44d 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_2.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal { i64, i64 } @_hl.main.1(i64 %0, i64 %1, double %2) { +define internal { i64, i64 } @_hl.main.1(i64 %0, i64 %1, double %2) !dbg !3 { alloca_block: %"0" = alloca i64, align 8 %"1" = alloca i64, align 8 @@ -23,9 +23,9 @@ entry_block: ; preds = %alloca_block %"2_01" = load i64, ptr %"2_0", align 4 %"2_12" = load i64, ptr %"2_1", align 4 %"2_23" = load double, ptr %"2_2", align 8 - call void @___rzz(i64 %"2_01", i64 %"2_12", double %"2_23") - store i64 %"2_01", ptr %"4_0", align 4 - store i64 %"2_12", ptr %"4_1", align 4 + call void @___rzz(i64 %"2_01", i64 %"2_12", double %"2_23"), !dbg !11 + store i64 %"2_01", ptr %"4_0", align 4, !dbg !11 + store i64 %"2_12", ptr %"4_1", align 4, !dbg !11 %"4_04" = load i64, ptr %"4_0", align 4 %"4_15" = load i64, ptr %"4_1", align 4 store i64 %"4_04", ptr %"0", align 4 @@ -38,3 +38,19 @@ entry_block: ; preds = %alloca_block } declare void @___rzz(i64, i64, double) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !9, !9, !10} +!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i64, i64 }", file: !2, size: 16, align: 8, elements: !8) +!8 = !{!9, !9} +!9 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!10 = !DIBasicType(name: "f64", size: 64, encoding: DW_ATE_float) +!11 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_3.snap index b62712490..f5cb3ad99 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_3.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal i64 @_hl.main.1(i64 %0, double %1, double %2) { +define internal i64 @_hl.main.1(i64 %0, double %1, double %2) !dbg !3 { alloca_block: %"0" = alloca i64, align 8 %"2_0" = alloca i64, align 8 @@ -21,8 +21,8 @@ entry_block: ; preds = %alloca_block %"2_01" = load i64, ptr %"2_0", align 4 %"2_12" = load double, ptr %"2_1", align 8 %"2_23" = load double, ptr %"2_2", align 8 - call void @___rxy(i64 %"2_01", double %"2_12", double %"2_23") - store i64 %"2_01", ptr %"4_0", align 4 + call void @___rxy(i64 %"2_01", double %"2_12", double %"2_23"), !dbg !9 + store i64 %"2_01", ptr %"4_0", align 4, !dbg !9 %"4_04" = load i64, ptr %"4_0", align 4 store i64 %"4_04", ptr %"0", align 4 %"05" = load i64, ptr %"0", align 4 @@ -30,3 +30,17 @@ entry_block: ; preds = %alloca_block } declare void @___rxy(i64, double, double) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !7, !8, !8} +!7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!8 = !DIBasicType(name: "f64", size: 64, encoding: DW_ATE_float) +!9 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_4.snap index 7b72c61b4..8e581fab4 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_4.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal { i1, i64, i1 } @_hl.main.1(i64 %0) { +define internal { i1, i64, i1 } @_hl.main.1(i64 %0) !dbg !3 { alloca_block: %"0" = alloca { i1, i64, i1 }, align 8 %"2_0" = alloca i64, align 8 @@ -20,9 +20,9 @@ entry_block: ; preds = %alloca_block %"2_01" = load i64, ptr %"2_0", align 4 store i64 %"2_01", ptr %"6_0", align 4 %"6_02" = load i64, ptr %"6_0", align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %"6_02") - call void @___qfree(i64 %"6_02") - store i64 %lazy_measure, ptr %"8_0", align 4 + %lazy_measure = call i64 @___lazy_measure(i64 %"6_02"), !dbg !11 + call void @___qfree(i64 %"6_02"), !dbg !11 + store i64 %lazy_measure, ptr %"8_0", align 4, !dbg !11 %"8_03" = load i64, ptr %"8_0", align 4 %1 = insertvalue { i1, i64, i1 } { i1 true, i64 poison, i1 poison }, i64 %"8_03", 1 store { i1, i64, i1 } %1, ptr %"9_0", align 4 @@ -37,3 +37,19 @@ entry_block: ; preds = %alloca_block declare i64 @___lazy_measure(i64) declare void @___qfree(i64) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/ZsHeDgUnyeIVwAutKJHaZEPSZwPXP/ycUvnujGxZKPRCTcNfs/EGLoPGCKHhMq/zeCBZoPGeHBxpWCFCAIgmDOG") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !10} +!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i1, i64, i1 }", file: !2, size: 8, align: 8, elements: !8) +!8 = !{!9, !10, !9} +!9 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) +!10 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!11 = !DILocation(line: 27583, column: 497, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_5.snap index 0b5aa81be..362921e93 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_5.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_5.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal i64 @_hl.main.1(i64 %0) { +define internal i64 @_hl.main.1(i64 %0) !dbg !3 { alloca_block: %"0" = alloca i64, align 8 %"2_0" = alloca i64, align 8 @@ -15,9 +15,9 @@ alloca_block: entry_block: ; preds = %alloca_block store i64 %0, ptr %"2_0", align 4 %"2_01" = load i64, ptr %"2_0", align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %"2_01") - call void @___qfree(i64 %"2_01") - store i64 %lazy_measure, ptr %"4_0", align 4 + %lazy_measure = call i64 @___lazy_measure(i64 %"2_01"), !dbg !8 + call void @___qfree(i64 %"2_01"), !dbg !8 + store i64 %lazy_measure, ptr %"4_0", align 4, !dbg !8 %"4_02" = load i64, ptr %"4_0", align 4 store i64 %"4_02", ptr %"0", align 4 %"03" = load i64, ptr %"0", align 4 @@ -27,3 +27,16 @@ entry_block: ; preds = %alloca_block declare i64 @___lazy_measure(i64) declare void @___qfree(i64) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !7} +!7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_6.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_6.snap index a6894518e..34de8d3db 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_6.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_6.snap @@ -5,25 +5,25 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal { i1, i64 } @_hl.main.1() { +define internal { i1, i64 } @_hl.main.1() !dbg !3 { alloca_block: %"0" = alloca { i1, i64 }, align 8 %"4_0" = alloca { i1, i64 }, align 8 br label %entry_block entry_block: ; preds = %alloca_block - %qalloc = call i64 @___qalloc() - %not_max = icmp ne i64 %qalloc, -1 - br i1 %not_max, label %reset_bb, label %id_bb + %qalloc = call i64 @___qalloc(), !dbg !11 + %not_max = icmp ne i64 %qalloc, -1, !dbg !11 + br i1 %not_max, label %reset_bb, label %id_bb, !dbg !11 reset_bb: ; preds = %entry_block - call void @___reset(i64 %qalloc) - br label %id_bb + call void @___reset(i64 %qalloc), !dbg !11 + br label %id_bb, !dbg !11 id_bb: ; preds = %entry_block, %reset_bb - %0 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc, 1 - %1 = select i1 %not_max, { i1, i64 } %0, { i1, i64 } { i1 false, i64 poison } - store { i1, i64 } %1, ptr %"4_0", align 4 + %0 = insertvalue { i1, i64 } { i1 true, i64 poison }, i64 %qalloc, 1, !dbg !11 + %1 = select i1 %not_max, { i1, i64 } %0, { i1, i64 } { i1 false, i64 poison }, !dbg !11 + store { i1, i64 } %1, ptr %"4_0", align 4, !dbg !11 %"4_01" = load { i1, i64 }, ptr %"4_0", align 4 store { i1, i64 } %"4_01", ptr %"0", align 4 %"02" = load { i1, i64 }, ptr %"0", align 4 @@ -33,3 +33,19 @@ id_bb: ; preds = %entry_block, %reset declare i64 @___qalloc() declare void @___reset(i64) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7} +!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i1, i64 }", file: !2, size: 8, align: 8, elements: !8) +!8 = !{!9, !10} +!9 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) +!10 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!11 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_7.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_7.snap index 3d88cb892..2d597cc94 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_7.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_7.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal void @_hl.main.1(i64 %0) { +define internal void @_hl.main.1(i64 %0) !dbg !3 { alloca_block: %"2_0" = alloca i64, align 8 br label %entry_block @@ -13,8 +13,21 @@ alloca_block: entry_block: ; preds = %alloca_block store i64 %0, ptr %"2_0", align 4 %"2_01" = load i64, ptr %"2_0", align 4 - call void @___qfree(i64 %"2_01") + call void @___qfree(i64 %"2_01"), !dbg !8 ret void } declare void @___qfree(i64) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{null, !7} +!7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_8.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_8.snap index 0f3c13390..04bba2255 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_8.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_8.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal i64 @_hl.main.1(i64 %0) { +define internal i64 @_hl.main.1(i64 %0) !dbg !3 { alloca_block: %"0" = alloca i64, align 8 %"2_0" = alloca i64, align 8 @@ -15,8 +15,8 @@ alloca_block: entry_block: ; preds = %alloca_block store i64 %0, ptr %"2_0", align 4 %"2_01" = load i64, ptr %"2_0", align 4 - call void @___reset(i64 %"2_01") - store i64 %"2_01", ptr %"4_0", align 4 + call void @___reset(i64 %"2_01"), !dbg !8 + store i64 %"2_01", ptr %"4_0", align 4, !dbg !8 %"4_02" = load i64, ptr %"4_0", align 4 store i64 %"4_02", ptr %"0", align 4 %"03" = load i64, ptr %"0", align 4 @@ -24,3 +24,16 @@ entry_block: ; preds = %alloca_block } declare void @___reset(i64) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !7} +!7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_9.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_9.snap index f711ce8ac..1039352ff 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_9.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_9.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal { i64, { i1, i64, i1 } } @_hl.main.1(i64 %0) { +define internal { i64, { i1, i64, i1 } } @_hl.main.1(i64 %0) !dbg !3 { alloca_block: %"0" = alloca i64, align 8 %"1" = alloca { i1, i64, i1 }, align 8 @@ -23,10 +23,10 @@ entry_block: ; preds = %alloca_block %"2_01" = load i64, ptr %"2_0", align 4 store i64 %"2_01", ptr %"6_0", align 4 %"6_02" = load i64, ptr %"6_0", align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %"6_02") - call void @___reset(i64 %"6_02") - store i64 %"6_02", ptr %"8_0", align 4 - store i64 %lazy_measure, ptr %"8_1", align 4 + %lazy_measure = call i64 @___lazy_measure(i64 %"6_02"), !dbg !13 + call void @___reset(i64 %"6_02"), !dbg !13 + store i64 %"6_02", ptr %"8_0", align 4, !dbg !13 + store i64 %lazy_measure, ptr %"8_1", align 4, !dbg !13 %"8_13" = load i64, ptr %"8_1", align 4 %1 = insertvalue { i1, i64, i1 } { i1 true, i64 poison, i1 poison }, i64 %"8_13", 1 store { i1, i64, i1 } %1, ptr %"9_0", align 4 @@ -48,3 +48,21 @@ entry_block: ; preds = %alloca_block declare i64 @___lazy_measure(i64) declare void @___reset(i64) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/ZsHeDgUnyeIVwAutKJHaZEPSZwPXP/ycUvnujGxZKPRCTcNfs/EGLoPGCKHhMq/zeCBZoPGeHBxpWCFCAIgmDOG") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !9} +!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i64, { i1, i64, i1 } }", file: !2, size: 16, align: 8, elements: !8) +!8 = !{!9, !10} +!9 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!10 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i1, i64, i1 }", file: !2, size: 8, align: 8, elements: !11) +!11 = !{!12, !9, !12} +!12 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) +!13 = !DILocation(line: 27583, column: 497, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21.snap index 799a38083..8ec684868 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21.snap @@ -5,13 +5,28 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal {} @_hl.main.1({} %0, i64 %1) { +define internal {} @_hl.main.1({} %0, i64 %1) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - call void @random_advance(i64 %1) + call void @random_advance(i64 %1), !dbg !10 ret {} %0 } declare void @random_advance(i64) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !7, !9} +!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{}", file: !2, align: 8, elements: !8) +!8 = !{} +!9 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!10 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_1.snap index c69b7f8cd..9a103cbe6 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_1.snap @@ -5,15 +5,32 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal { i32, {} } @_hl.main.1({} %0) { +define internal { i32, {} } @_hl.main.1({} %0) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %rint = call i32 @random_int() + %rint = call i32 @random_int(), !dbg !12 %mrv = insertvalue { i32, {} } poison, i32 %rint, 0 %mrv6 = insertvalue { i32, {} } %mrv, {} zeroinitializer, 1 ret { i32, {} } %mrv6 } declare i32 @random_int() + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !10} +!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i32, {} }", file: !2, size: 4, align: 8, elements: !8) +!8 = !{!9, !10} +!9 = !DIBasicType(name: "i32", size: 32, encoding: DW_ATE_unsigned) +!10 = !DICompositeType(tag: DW_TAG_structure_type, name: "{}", file: !2, align: 8, elements: !11) +!11 = !{} +!12 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_2.snap index 22381198e..dcc04ad7f 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_2.snap @@ -5,15 +5,32 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal { double, {} } @_hl.main.1({} %0) { +define internal { double, {} } @_hl.main.1({} %0) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %rfloat = call double @random_float() + %rfloat = call double @random_float(), !dbg !12 %mrv = insertvalue { double, {} } poison, double %rfloat, 0 %mrv6 = insertvalue { double, {} } %mrv, {} zeroinitializer, 1 ret { double, {} } %mrv6 } declare double @random_float() + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !10} +!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ double, {} }", file: !2, size: 8, align: 8, elements: !8) +!8 = !{!9, !10} +!9 = !DIBasicType(name: "f64", size: 64, encoding: DW_ATE_float) +!10 = !DICompositeType(tag: DW_TAG_structure_type, name: "{}", file: !2, align: 8, elements: !11) +!11 = !{} +!12 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_3.snap index d0bf6b489..69cf5419d 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_3.snap @@ -5,15 +5,32 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal { i32, {} } @_hl.main.1({} %0, i32 %1) { +define internal { i32, {} } @_hl.main.1({} %0, i32 %1) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %rintb = call i32 @random_rng(i32 %1) + %rintb = call i32 @random_rng(i32 %1), !dbg !12 %mrv = insertvalue { i32, {} } poison, i32 %rintb, 0 %mrv7 = insertvalue { i32, {} } %mrv, {} zeroinitializer, 1 ret { i32, {} } %mrv7 } declare i32 @random_rng(i32) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !10, !9} +!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i32, {} }", file: !2, size: 4, align: 8, elements: !8) +!8 = !{!9, !10} +!9 = !DIBasicType(name: "i32", size: 32, encoding: DW_ATE_unsigned) +!10 = !DICompositeType(tag: DW_TAG_structure_type, name: "{}", file: !2, align: 8, elements: !11) +!11 = !{} +!12 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_4.snap index 2f1d5c317..e6efd23f7 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_4.snap @@ -5,13 +5,27 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal i1 @_hl.main.1(i64 %0) { +define internal i1 @_hl.main.1(i64 %0) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - call void @random_seed(i64 %0) + call void @random_seed(i64 %0), !dbg !9 ret i1 true } declare void @random_seed(i64) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !8} +!7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) +!8 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!9 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_5.snap index eb392ab80..e2b63d60e 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_5.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_5.snap @@ -5,10 +5,23 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal void @_hl.main.1({} %0) { +define internal void @_hl.main.1({} %0) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block ret void } + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{null, !7} +!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{}", file: !2, align: 8, elements: !8) +!8 = !{} diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21.snap index d48da2bc1..625d8a62a 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal {} @_hl.main.1({} %0, i64 %1) { +define internal {} @_hl.main.1({} %0, i64 %1) !dbg !3 { alloca_block: %"0" = alloca {}, align 8 %"2_0" = alloca {}, align 8 @@ -18,8 +18,8 @@ entry_block: ; preds = %alloca_block store i64 %1, ptr %"2_1", align 4 %"2_01" = load {}, ptr %"2_0", align 1 %"2_12" = load i64, ptr %"2_1", align 4 - call void @random_advance(i64 %"2_12") - store {} %"2_01", ptr %"4_0", align 1 + call void @random_advance(i64 %"2_12"), !dbg !10 + store {} %"2_01", ptr %"4_0", align 1, !dbg !10 %"4_03" = load {}, ptr %"4_0", align 1 store {} %"4_03", ptr %"0", align 1 %"04" = load {}, ptr %"0", align 1 @@ -27,3 +27,18 @@ entry_block: ; preds = %alloca_block } declare void @random_advance(i64) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !7, !9} +!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{}", file: !2, align: 8, elements: !8) +!8 = !{} +!9 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!10 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_1.snap index e901642f4..193aba996 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_1.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal { i32, {} } @_hl.main.1({} %0) { +define internal { i32, {} } @_hl.main.1({} %0) !dbg !3 { alloca_block: %"0" = alloca i32, align 4 %"1" = alloca {}, align 8 @@ -17,9 +17,9 @@ alloca_block: entry_block: ; preds = %alloca_block store {} %0, ptr %"2_0", align 1 %"2_01" = load {}, ptr %"2_0", align 1 - %rint = call i32 @random_int() - store i32 %rint, ptr %"4_0", align 4 - store {} zeroinitializer, ptr %"4_1", align 1 + %rint = call i32 @random_int(), !dbg !12 + store i32 %rint, ptr %"4_0", align 4, !dbg !12 + store {} zeroinitializer, ptr %"4_1", align 1, !dbg !12 %"4_02" = load i32, ptr %"4_0", align 4 %"4_13" = load {}, ptr %"4_1", align 1 store i32 %"4_02", ptr %"0", align 4 @@ -32,3 +32,20 @@ entry_block: ; preds = %alloca_block } declare i32 @random_int() + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !10} +!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i32, {} }", file: !2, size: 4, align: 8, elements: !8) +!8 = !{!9, !10} +!9 = !DIBasicType(name: "i32", size: 32, encoding: DW_ATE_unsigned) +!10 = !DICompositeType(tag: DW_TAG_structure_type, name: "{}", file: !2, align: 8, elements: !11) +!11 = !{} +!12 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_2.snap index ea5809cf5..5363f0428 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_2.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal { double, {} } @_hl.main.1({} %0) { +define internal { double, {} } @_hl.main.1({} %0) !dbg !3 { alloca_block: %"0" = alloca double, align 8 %"1" = alloca {}, align 8 @@ -17,9 +17,9 @@ alloca_block: entry_block: ; preds = %alloca_block store {} %0, ptr %"2_0", align 1 %"2_01" = load {}, ptr %"2_0", align 1 - %rfloat = call double @random_float() - store double %rfloat, ptr %"4_0", align 8 - store {} zeroinitializer, ptr %"4_1", align 1 + %rfloat = call double @random_float(), !dbg !12 + store double %rfloat, ptr %"4_0", align 8, !dbg !12 + store {} zeroinitializer, ptr %"4_1", align 1, !dbg !12 %"4_02" = load double, ptr %"4_0", align 8 %"4_13" = load {}, ptr %"4_1", align 1 store double %"4_02", ptr %"0", align 8 @@ -32,3 +32,20 @@ entry_block: ; preds = %alloca_block } declare double @random_float() + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !10} +!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ double, {} }", file: !2, size: 8, align: 8, elements: !8) +!8 = !{!9, !10} +!9 = !DIBasicType(name: "f64", size: 64, encoding: DW_ATE_float) +!10 = !DICompositeType(tag: DW_TAG_structure_type, name: "{}", file: !2, align: 8, elements: !11) +!11 = !{} +!12 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_3.snap index 23085e6bd..6f046f8b7 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_3.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal { i32, {} } @_hl.main.1({} %0, i32 %1) { +define internal { i32, {} } @_hl.main.1({} %0, i32 %1) !dbg !3 { alloca_block: %"0" = alloca i32, align 4 %"1" = alloca {}, align 8 @@ -20,9 +20,9 @@ entry_block: ; preds = %alloca_block store i32 %1, ptr %"2_1", align 4 %"2_01" = load {}, ptr %"2_0", align 1 %"2_12" = load i32, ptr %"2_1", align 4 - %rintb = call i32 @random_rng(i32 %"2_12") - store i32 %rintb, ptr %"4_0", align 4 - store {} zeroinitializer, ptr %"4_1", align 1 + %rintb = call i32 @random_rng(i32 %"2_12"), !dbg !12 + store i32 %rintb, ptr %"4_0", align 4, !dbg !12 + store {} zeroinitializer, ptr %"4_1", align 1, !dbg !12 %"4_03" = load i32, ptr %"4_0", align 4 %"4_14" = load {}, ptr %"4_1", align 1 store i32 %"4_03", ptr %"0", align 4 @@ -35,3 +35,20 @@ entry_block: ; preds = %alloca_block } declare i32 @random_rng(i32) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !10, !9} +!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i32, {} }", file: !2, size: 4, align: 8, elements: !8) +!8 = !{!9, !10} +!9 = !DIBasicType(name: "i32", size: 32, encoding: DW_ATE_unsigned) +!10 = !DICompositeType(tag: DW_TAG_structure_type, name: "{}", file: !2, align: 8, elements: !11) +!11 = !{} +!12 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_4.snap index 6a3e511b8..d2458f384 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_4.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal i1 @_hl.main.1(i64 %0) { +define internal i1 @_hl.main.1(i64 %0) !dbg !3 { alloca_block: %"0" = alloca i1, align 1 %"2_0" = alloca i64, align 8 @@ -15,8 +15,8 @@ alloca_block: entry_block: ; preds = %alloca_block store i64 %0, ptr %"2_0", align 4 %"2_01" = load i64, ptr %"2_0", align 4 - call void @random_seed(i64 %"2_01") - store i1 true, ptr %"4_0", align 1 + call void @random_seed(i64 %"2_01"), !dbg !9 + store i1 true, ptr %"4_0", align 1, !dbg !9 %"4_02" = load i1, ptr %"4_0", align 1 store i1 %"4_02", ptr %"0", align 1 %"03" = load i1, ptr %"0", align 1 @@ -24,3 +24,17 @@ entry_block: ; preds = %alloca_block } declare void @random_seed(i64) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !8} +!7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) +!8 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!9 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_5.snap index 6c5937da7..954dba030 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_5.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_5.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal void @_hl.main.1({} %0) { +define internal void @_hl.main.1({} %0) !dbg !3 { alloca_block: %"2_0" = alloca {}, align 8 br label %entry_block @@ -15,3 +15,16 @@ entry_block: ; preds = %alloca_block %"2_01" = load {}, ptr %"2_0", align 1 ret void } + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{null, !7} +!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{}", file: !2, align: 8, elements: !8) +!8 = !{} diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_1.snap index 423005c5e..f9713917a 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_1.snap @@ -7,15 +7,28 @@ source_filename = "test_context" @res_test_bool.427F8271.0 = private constant [20 x i8] c"\13USER:BOOL:test_bool" -define internal void @_hl.main.1(i1 %0) { +define internal void @_hl.main.1(i1 %0) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %tag_len = load i8, ptr @res_test_bool.427F8271.0, align 1 - %tag_len2 = zext i8 %tag_len to i64 - call void @print_bool(ptr @res_test_bool.427F8271.0, i64 %tag_len2, i1 %0) + %tag_len = load i8, ptr @res_test_bool.427F8271.0, align 1, !dbg !8 + %tag_len2 = zext i8 %tag_len to i64, !dbg !8 + call void @print_bool(ptr @res_test_bool.427F8271.0, i64 %tag_len2, i1 %0), !dbg !8 ret void } declare void @print_bool(ptr, i64, i1) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{null, !7} +!7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_11.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_11.snap index 82c88b50c..f6c289cfe 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_11.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_11.snap @@ -7,30 +7,46 @@ source_filename = "test_context" @res_test_arr_f.038B27BE.0 = private constant [27 x i8] c"\1AUSER:FLOATARR:test_arr_f64" -define internal void @_hl.main.1({ ptr, i64 } %0) { +define internal void @_hl.main.1({ ptr, i64 } %0) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %tag_len = load i8, ptr @res_test_arr_f.038B27BE.0, align 1 - %tag_len2 = zext i8 %tag_len to i64 - %array_ptr = extractvalue { ptr, i64 } %0, 0 - %array_offset = extractvalue { ptr, i64 } %0, 1 - %1 = getelementptr inbounds [10 x double], ptr %array_ptr, i64 %array_offset - %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 - %x_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 0 - %y_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 1 - %arr_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 2 - %mask_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 3 - %2 = alloca i1, i32 10, align 1 - store [10 x i1] zeroinitializer, ptr %2, align 1 - store i32 10, ptr %x_ptr, align 4 - store i32 1, ptr %y_ptr, align 4 - store ptr %1, ptr %arr_ptr, align 8 - store ptr %2, ptr %mask_ptr, align 8 - %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1 - call void @print_float_arr(ptr @res_test_arr_f.038B27BE.0, i64 %tag_len2, ptr %out_arr_alloca) + %tag_len = load i8, ptr @res_test_arr_f.038B27BE.0, align 1, !dbg !11 + %tag_len2 = zext i8 %tag_len to i64, !dbg !11 + %array_ptr = extractvalue { ptr, i64 } %0, 0, !dbg !11 + %array_offset = extractvalue { ptr, i64 } %0, 1, !dbg !11 + %1 = getelementptr inbounds [10 x double], ptr %array_ptr, i64 %array_offset, !dbg !11 + %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8, !dbg !11 + %x_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 0, !dbg !11 + %y_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 1, !dbg !11 + %arr_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 2, !dbg !11 + %mask_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 3, !dbg !11 + %2 = alloca i1, i32 10, align 1, !dbg !11 + store [10 x i1] zeroinitializer, ptr %2, align 1, !dbg !11 + store i32 10, ptr %x_ptr, align 4, !dbg !11 + store i32 1, ptr %y_ptr, align 4, !dbg !11 + store ptr %1, ptr %arr_ptr, align 8, !dbg !11 + store ptr %2, ptr %mask_ptr, align 8, !dbg !11 + %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1, !dbg !11 + call void @print_float_arr(ptr @res_test_arr_f.038B27BE.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 ret void } declare void @print_float_arr(ptr, i64, ptr) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{null, !7} +!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ ptr, i64 }", file: !2, size: 16, align: 8, elements: !8) +!8 = !{!9, !10} +!9 = !DIBasicType(name: "ptr", size: 64, encoding: DW_ATE_address) +!10 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!11 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_12.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_12.snap index 0aba173da..b63e8f1df 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_12.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_12.snap @@ -7,15 +7,28 @@ source_filename = "test_context" @"res_\E6\B5\8B\E8\AF\95\E5\AD\97\E7\AC\A6\E4\B8\B2.935D2D1A.0" = private constant [25 x i8] c"\18USER:INT:\E6\B5\8B\E8\AF\95\E5\AD\97\E7\AC\A6\E4\B8\B2" -define internal void @_hl.main.1(i64 %0) { +define internal void @_hl.main.1(i64 %0) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %tag_len = load i8, ptr @"res_\E6\B5\8B\E8\AF\95\E5\AD\97\E7\AC\A6\E4\B8\B2.935D2D1A.0", align 1 - %tag_len2 = zext i8 %tag_len to i64 - call void @print_int(ptr @"res_\E6\B5\8B\E8\AF\95\E5\AD\97\E7\AC\A6\E4\B8\B2.935D2D1A.0", i64 %tag_len2, i64 %0) + %tag_len = load i8, ptr @"res_\E6\B5\8B\E8\AF\95\E5\AD\97\E7\AC\A6\E4\B8\B2.935D2D1A.0", align 1, !dbg !8 + %tag_len2 = zext i8 %tag_len to i64, !dbg !8 + call void @print_int(ptr @"res_\E6\B5\8B\E8\AF\95\E5\AD\97\E7\AC\A6\E4\B8\B2.935D2D1A.0", i64 %tag_len2, i64 %0), !dbg !8 ret void } declare void @print_int(ptr, i64, i64) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{null, !7} +!7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_13.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_13.snap index 887f8aae5..0cbd18431 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_13.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_13.snap @@ -7,15 +7,28 @@ source_filename = "test_context" @"res_test!@#$%^.2547CEEA.0" = private constant [24 x i8] c"\17USER:INT:test!@#$%^&*()" -define internal void @_hl.main.1(i64 %0) { +define internal void @_hl.main.1(i64 %0) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %tag_len = load i8, ptr @"res_test!@#$%^.2547CEEA.0", align 1 - %tag_len2 = zext i8 %tag_len to i64 - call void @print_uint(ptr @"res_test!@#$%^.2547CEEA.0", i64 %tag_len2, i64 %0) + %tag_len = load i8, ptr @"res_test!@#$%^.2547CEEA.0", align 1, !dbg !8 + %tag_len2 = zext i8 %tag_len to i64, !dbg !8 + call void @print_uint(ptr @"res_test!@#$%^.2547CEEA.0", i64 %tag_len2, i64 %0), !dbg !8 ret void } declare void @print_uint(ptr, i64, i64) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{null, !7} +!7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_15.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_15.snap index c5499233a..af44ab21c 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_15.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_15.snap @@ -7,15 +7,28 @@ source_filename = "test_context" @"res_ spaces .F46B5D1D.0" = private constant [41 x i8] c"(USER:BOOL: spaces tabs\09\09\09newlines\0A\0A\0A" -define internal void @_hl.main.1(i1 %0) { +define internal void @_hl.main.1(i1 %0) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %tag_len = load i8, ptr @"res_ spaces .F46B5D1D.0", align 1 - %tag_len2 = zext i8 %tag_len to i64 - call void @print_bool(ptr @"res_ spaces .F46B5D1D.0", i64 %tag_len2, i1 %0) + %tag_len = load i8, ptr @"res_ spaces .F46B5D1D.0", align 1, !dbg !8 + %tag_len2 = zext i8 %tag_len to i64, !dbg !8 + call void @print_bool(ptr @"res_ spaces .F46B5D1D.0", i64 %tag_len2, i1 %0), !dbg !8 ret void } declare void @print_bool(ptr, i64, i1) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{null, !7} +!7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_16.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_16.snap index 62cff092b..5b37294cf 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_16.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_16.snap @@ -7,15 +7,28 @@ source_filename = "test_context" @"res_\F0\9F\9A\80\F0\9F\91\A8\E2\80\8D\F0\9F\91\A9\E2\80\8D\F0\9F\91\A7\E2\80\8D\F0\9F\91\A6\F0\9F\8C\8D.F7EE3FAA.0" = private constant [44 x i8] c"+USER:BOOL:\F0\9F\9A\80\F0\9F\91\A8\E2\80\8D\F0\9F\91\A9\E2\80\8D\F0\9F\91\A7\E2\80\8D\F0\9F\91\A6\F0\9F\8C\8D" -define internal void @_hl.main.1(i1 %0) { +define internal void @_hl.main.1(i1 %0) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %tag_len = load i8, ptr @"res_\F0\9F\9A\80\F0\9F\91\A8\E2\80\8D\F0\9F\91\A9\E2\80\8D\F0\9F\91\A7\E2\80\8D\F0\9F\91\A6\F0\9F\8C\8D.F7EE3FAA.0", align 1 - %tag_len2 = zext i8 %tag_len to i64 - call void @print_bool(ptr @"res_\F0\9F\9A\80\F0\9F\91\A8\E2\80\8D\F0\9F\91\A9\E2\80\8D\F0\9F\91\A7\E2\80\8D\F0\9F\91\A6\F0\9F\8C\8D.F7EE3FAA.0", i64 %tag_len2, i1 %0) + %tag_len = load i8, ptr @"res_\F0\9F\9A\80\F0\9F\91\A8\E2\80\8D\F0\9F\91\A9\E2\80\8D\F0\9F\91\A7\E2\80\8D\F0\9F\91\A6\F0\9F\8C\8D.F7EE3FAA.0", align 1, !dbg !8 + %tag_len2 = zext i8 %tag_len to i64, !dbg !8 + call void @print_bool(ptr @"res_\F0\9F\9A\80\F0\9F\91\A8\E2\80\8D\F0\9F\91\A9\E2\80\8D\F0\9F\91\A7\E2\80\8D\F0\9F\91\A6\F0\9F\8C\8D.F7EE3FAA.0", i64 %tag_len2, i1 %0), !dbg !8 ret void } declare void @print_bool(ptr, i64, i1) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{null, !7} +!7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_2.snap index d851efee9..e8f8c086d 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_2.snap @@ -7,15 +7,28 @@ source_filename = "test_context" @res_test_int.258C85C2.0 = private constant [18 x i8] c"\11USER:INT:test_int" -define internal void @_hl.main.1(i64 %0) { +define internal void @_hl.main.1(i64 %0) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %tag_len = load i8, ptr @res_test_int.258C85C2.0, align 1 - %tag_len2 = zext i8 %tag_len to i64 - call void @print_int(ptr @res_test_int.258C85C2.0, i64 %tag_len2, i64 %0) + %tag_len = load i8, ptr @res_test_int.258C85C2.0, align 1, !dbg !8 + %tag_len2 = zext i8 %tag_len to i64, !dbg !8 + call void @print_int(ptr @res_test_int.258C85C2.0, i64 %tag_len2, i64 %0), !dbg !8 ret void } declare void @print_int(ptr, i64, i64) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{null, !7} +!7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_3.snap index aeb0eff62..efc0debda 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_3.snap @@ -7,15 +7,28 @@ source_filename = "test_context" @res_test_uint.DE04EADD.0 = private constant [19 x i8] c"\12USER:INT:test_uint" -define internal void @_hl.main.1(i64 %0) { +define internal void @_hl.main.1(i64 %0) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %tag_len = load i8, ptr @res_test_uint.DE04EADD.0, align 1 - %tag_len2 = zext i8 %tag_len to i64 - call void @print_uint(ptr @res_test_uint.DE04EADD.0, i64 %tag_len2, i64 %0) + %tag_len = load i8, ptr @res_test_uint.DE04EADD.0, align 1, !dbg !8 + %tag_len2 = zext i8 %tag_len to i64, !dbg !8 + call void @print_uint(ptr @res_test_uint.DE04EADD.0, i64 %tag_len2, i64 %0), !dbg !8 ret void } declare void @print_uint(ptr, i64, i64) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{null, !7} +!7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_4.snap index 079dfa470..91bbbdf2b 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_4.snap @@ -7,15 +7,28 @@ source_filename = "test_context" @res_test_f64.A24BDAE1.0 = private constant [20 x i8] c"\13USER:FLOAT:test_f64" -define internal void @_hl.main.1(double %0) { +define internal void @_hl.main.1(double %0) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %tag_len = load i8, ptr @res_test_f64.A24BDAE1.0, align 1 - %tag_len2 = zext i8 %tag_len to i64 - call void @print_float(ptr @res_test_f64.A24BDAE1.0, i64 %tag_len2, double %0) + %tag_len = load i8, ptr @res_test_f64.A24BDAE1.0, align 1, !dbg !8 + %tag_len2 = zext i8 %tag_len to i64, !dbg !8 + call void @print_float(ptr @res_test_f64.A24BDAE1.0, i64 %tag_len2, double %0), !dbg !8 ret void } declare void @print_float(ptr, i64, double) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{null, !7} +!7 = !DIBasicType(name: "f64", size: 64, encoding: DW_ATE_float) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_5.snap index d74b84386..5cc958110 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_5.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_5.snap @@ -7,30 +7,46 @@ source_filename = "test_context" @res_test_arr_b.866EEC87.0 = private constant [27 x i8] c"\1AUSER:BOOLARR:test_arr_bool" -define internal void @_hl.main.1({ ptr, i64 } %0) { +define internal void @_hl.main.1({ ptr, i64 } %0) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %tag_len = load i8, ptr @res_test_arr_b.866EEC87.0, align 1 - %tag_len2 = zext i8 %tag_len to i64 - %array_ptr = extractvalue { ptr, i64 } %0, 0 - %array_offset = extractvalue { ptr, i64 } %0, 1 - %1 = getelementptr inbounds [10 x i1], ptr %array_ptr, i64 %array_offset - %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 - %x_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 0 - %y_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 1 - %arr_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 2 - %mask_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 3 - %2 = alloca i1, i32 10, align 1 - store [10 x i1] zeroinitializer, ptr %2, align 1 - store i32 10, ptr %x_ptr, align 4 - store i32 1, ptr %y_ptr, align 4 - store ptr %1, ptr %arr_ptr, align 8 - store ptr %2, ptr %mask_ptr, align 8 - %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1 - call void @print_bool_arr(ptr @res_test_arr_b.866EEC87.0, i64 %tag_len2, ptr %out_arr_alloca) + %tag_len = load i8, ptr @res_test_arr_b.866EEC87.0, align 1, !dbg !11 + %tag_len2 = zext i8 %tag_len to i64, !dbg !11 + %array_ptr = extractvalue { ptr, i64 } %0, 0, !dbg !11 + %array_offset = extractvalue { ptr, i64 } %0, 1, !dbg !11 + %1 = getelementptr inbounds [10 x i1], ptr %array_ptr, i64 %array_offset, !dbg !11 + %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8, !dbg !11 + %x_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 0, !dbg !11 + %y_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 1, !dbg !11 + %arr_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 2, !dbg !11 + %mask_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 3, !dbg !11 + %2 = alloca i1, i32 10, align 1, !dbg !11 + store [10 x i1] zeroinitializer, ptr %2, align 1, !dbg !11 + store i32 10, ptr %x_ptr, align 4, !dbg !11 + store i32 1, ptr %y_ptr, align 4, !dbg !11 + store ptr %1, ptr %arr_ptr, align 8, !dbg !11 + store ptr %2, ptr %mask_ptr, align 8, !dbg !11 + %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1, !dbg !11 + call void @print_bool_arr(ptr @res_test_arr_b.866EEC87.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 ret void } declare void @print_bool_arr(ptr, i64, ptr) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{null, !7} +!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ ptr, i64 }", file: !2, size: 16, align: 8, elements: !8) +!8 = !{!9, !10} +!9 = !DIBasicType(name: "ptr", size: 64, encoding: DW_ATE_address) +!10 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!11 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_7.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_7.snap index 0719cb4bc..419c755d8 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_7.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_7.snap @@ -7,30 +7,46 @@ source_filename = "test_context" @res_test_arr_i.DFD30452.0 = private constant [25 x i8] c"\18USER:INTARR:test_arr_int" -define internal void @_hl.main.1({ ptr, i64 } %0) { +define internal void @_hl.main.1({ ptr, i64 } %0) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %tag_len = load i8, ptr @res_test_arr_i.DFD30452.0, align 1 - %tag_len2 = zext i8 %tag_len to i64 - %array_ptr = extractvalue { ptr, i64 } %0, 0 - %array_offset = extractvalue { ptr, i64 } %0, 1 - %1 = getelementptr inbounds [10 x i64], ptr %array_ptr, i64 %array_offset - %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 - %x_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 0 - %y_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 1 - %arr_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 2 - %mask_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 3 - %2 = alloca i1, i32 10, align 1 - store [10 x i1] zeroinitializer, ptr %2, align 1 - store i32 10, ptr %x_ptr, align 4 - store i32 1, ptr %y_ptr, align 4 - store ptr %1, ptr %arr_ptr, align 8 - store ptr %2, ptr %mask_ptr, align 8 - %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1 - call void @print_int_arr(ptr @res_test_arr_i.DFD30452.0, i64 %tag_len2, ptr %out_arr_alloca) + %tag_len = load i8, ptr @res_test_arr_i.DFD30452.0, align 1, !dbg !11 + %tag_len2 = zext i8 %tag_len to i64, !dbg !11 + %array_ptr = extractvalue { ptr, i64 } %0, 0, !dbg !11 + %array_offset = extractvalue { ptr, i64 } %0, 1, !dbg !11 + %1 = getelementptr inbounds [10 x i64], ptr %array_ptr, i64 %array_offset, !dbg !11 + %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8, !dbg !11 + %x_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 0, !dbg !11 + %y_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 1, !dbg !11 + %arr_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 2, !dbg !11 + %mask_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 3, !dbg !11 + %2 = alloca i1, i32 10, align 1, !dbg !11 + store [10 x i1] zeroinitializer, ptr %2, align 1, !dbg !11 + store i32 10, ptr %x_ptr, align 4, !dbg !11 + store i32 1, ptr %y_ptr, align 4, !dbg !11 + store ptr %1, ptr %arr_ptr, align 8, !dbg !11 + store ptr %2, ptr %mask_ptr, align 8, !dbg !11 + %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1, !dbg !11 + call void @print_int_arr(ptr @res_test_arr_i.DFD30452.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 ret void } declare void @print_int_arr(ptr, i64, ptr) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{null, !7} +!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ ptr, i64 }", file: !2, size: 16, align: 8, elements: !8) +!8 = !{!9, !10} +!9 = !DIBasicType(name: "ptr", size: 64, encoding: DW_ATE_address) +!10 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!11 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_9.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_9.snap index 28b01c227..9d8bb59c1 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_9.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_9.snap @@ -7,30 +7,46 @@ source_filename = "test_context" @res_test_arr_u.3D1C515C.0 = private constant [26 x i8] c"\19USER:INTARR:test_arr_uint" -define internal void @_hl.main.1({ ptr, i64 } %0) { +define internal void @_hl.main.1({ ptr, i64 } %0) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %tag_len = load i8, ptr @res_test_arr_u.3D1C515C.0, align 1 - %tag_len2 = zext i8 %tag_len to i64 - %array_ptr = extractvalue { ptr, i64 } %0, 0 - %array_offset = extractvalue { ptr, i64 } %0, 1 - %1 = getelementptr inbounds [10 x i64], ptr %array_ptr, i64 %array_offset - %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 - %x_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 0 - %y_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 1 - %arr_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 2 - %mask_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 3 - %2 = alloca i1, i32 10, align 1 - store [10 x i1] zeroinitializer, ptr %2, align 1 - store i32 10, ptr %x_ptr, align 4 - store i32 1, ptr %y_ptr, align 4 - store ptr %1, ptr %arr_ptr, align 8 - store ptr %2, ptr %mask_ptr, align 8 - %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1 - call void @print_uint_arr(ptr @res_test_arr_u.3D1C515C.0, i64 %tag_len2, ptr %out_arr_alloca) + %tag_len = load i8, ptr @res_test_arr_u.3D1C515C.0, align 1, !dbg !11 + %tag_len2 = zext i8 %tag_len to i64, !dbg !11 + %array_ptr = extractvalue { ptr, i64 } %0, 0, !dbg !11 + %array_offset = extractvalue { ptr, i64 } %0, 1, !dbg !11 + %1 = getelementptr inbounds [10 x i64], ptr %array_ptr, i64 %array_offset, !dbg !11 + %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8, !dbg !11 + %x_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 0, !dbg !11 + %y_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 1, !dbg !11 + %arr_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 2, !dbg !11 + %mask_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 3, !dbg !11 + %2 = alloca i1, i32 10, align 1, !dbg !11 + store [10 x i1] zeroinitializer, ptr %2, align 1, !dbg !11 + store i32 10, ptr %x_ptr, align 4, !dbg !11 + store i32 1, ptr %y_ptr, align 4, !dbg !11 + store ptr %1, ptr %arr_ptr, align 8, !dbg !11 + store ptr %2, ptr %mask_ptr, align 8, !dbg !11 + %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1, !dbg !11 + call void @print_uint_arr(ptr @res_test_arr_u.3D1C515C.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 ret void } declare void @print_uint_arr(ptr, i64, ptr) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{null, !7} +!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ ptr, i64 }", file: !2, size: 16, align: 8, elements: !8) +!8 = !{!9, !10} +!9 = !DIBasicType(name: "ptr", size: 64, encoding: DW_ATE_address) +!10 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!11 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_1.snap index 492d3658d..e3a56be3b 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_1.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @res_test_bool.427F8271.0 = private constant [20 x i8] c"\13USER:BOOL:test_bool" -define internal void @_hl.main.1(i1 %0) { +define internal void @_hl.main.1(i1 %0) !dbg !3 { alloca_block: %"2_0" = alloca i1, align 1 br label %entry_block @@ -15,10 +15,23 @@ alloca_block: entry_block: ; preds = %alloca_block store i1 %0, ptr %"2_0", align 1 %"2_01" = load i1, ptr %"2_0", align 1 - %tag_len = load i8, ptr @res_test_bool.427F8271.0, align 1 - %tag_len2 = zext i8 %tag_len to i64 - call void @print_bool(ptr @res_test_bool.427F8271.0, i64 %tag_len2, i1 %"2_01") + %tag_len = load i8, ptr @res_test_bool.427F8271.0, align 1, !dbg !8 + %tag_len2 = zext i8 %tag_len to i64, !dbg !8 + call void @print_bool(ptr @res_test_bool.427F8271.0, i64 %tag_len2, i1 %"2_01"), !dbg !8 ret void } declare void @print_bool(ptr, i64, i1) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{null, !7} +!7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_11.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_11.snap index ba95a66ed..b66161e33 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_11.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_11.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @res_test_arr_f.038B27BE.0 = private constant [27 x i8] c"\1AUSER:FLOATARR:test_arr_f64" -define internal void @_hl.main.1({ ptr, i64 } %0) { +define internal void @_hl.main.1({ ptr, i64 } %0) !dbg !3 { alloca_block: %"2_0" = alloca { ptr, i64 }, align 8 br label %entry_block @@ -15,25 +15,41 @@ alloca_block: entry_block: ; preds = %alloca_block store { ptr, i64 } %0, ptr %"2_0", align 8 %"2_01" = load { ptr, i64 }, ptr %"2_0", align 8 - %tag_len = load i8, ptr @res_test_arr_f.038B27BE.0, align 1 - %tag_len2 = zext i8 %tag_len to i64 - %array_ptr = extractvalue { ptr, i64 } %"2_01", 0 - %array_offset = extractvalue { ptr, i64 } %"2_01", 1 - %1 = getelementptr inbounds [10 x double], ptr %array_ptr, i64 %array_offset - %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 - %x_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 0 - %y_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 1 - %arr_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 2 - %mask_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 3 - %2 = alloca i1, i32 10, align 1 - store [10 x i1] zeroinitializer, ptr %2, align 1 - store i32 10, ptr %x_ptr, align 4 - store i32 1, ptr %y_ptr, align 4 - store ptr %1, ptr %arr_ptr, align 8 - store ptr %2, ptr %mask_ptr, align 8 - %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1 - call void @print_float_arr(ptr @res_test_arr_f.038B27BE.0, i64 %tag_len2, ptr %out_arr_alloca) + %tag_len = load i8, ptr @res_test_arr_f.038B27BE.0, align 1, !dbg !11 + %tag_len2 = zext i8 %tag_len to i64, !dbg !11 + %array_ptr = extractvalue { ptr, i64 } %"2_01", 0, !dbg !11 + %array_offset = extractvalue { ptr, i64 } %"2_01", 1, !dbg !11 + %1 = getelementptr inbounds [10 x double], ptr %array_ptr, i64 %array_offset, !dbg !11 + %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8, !dbg !11 + %x_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 0, !dbg !11 + %y_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 1, !dbg !11 + %arr_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 2, !dbg !11 + %mask_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 3, !dbg !11 + %2 = alloca i1, i32 10, align 1, !dbg !11 + store [10 x i1] zeroinitializer, ptr %2, align 1, !dbg !11 + store i32 10, ptr %x_ptr, align 4, !dbg !11 + store i32 1, ptr %y_ptr, align 4, !dbg !11 + store ptr %1, ptr %arr_ptr, align 8, !dbg !11 + store ptr %2, ptr %mask_ptr, align 8, !dbg !11 + %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1, !dbg !11 + call void @print_float_arr(ptr @res_test_arr_f.038B27BE.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 ret void } declare void @print_float_arr(ptr, i64, ptr) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{null, !7} +!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ ptr, i64 }", file: !2, size: 16, align: 8, elements: !8) +!8 = !{!9, !10} +!9 = !DIBasicType(name: "ptr", size: 64, encoding: DW_ATE_address) +!10 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!11 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_12.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_12.snap index a35ff2db4..db07e331b 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_12.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_12.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @"res_\E6\B5\8B\E8\AF\95\E5\AD\97\E7\AC\A6\E4\B8\B2.935D2D1A.0" = private constant [25 x i8] c"\18USER:INT:\E6\B5\8B\E8\AF\95\E5\AD\97\E7\AC\A6\E4\B8\B2" -define internal void @_hl.main.1(i64 %0) { +define internal void @_hl.main.1(i64 %0) !dbg !3 { alloca_block: %"2_0" = alloca i64, align 8 br label %entry_block @@ -15,10 +15,23 @@ alloca_block: entry_block: ; preds = %alloca_block store i64 %0, ptr %"2_0", align 4 %"2_01" = load i64, ptr %"2_0", align 4 - %tag_len = load i8, ptr @"res_\E6\B5\8B\E8\AF\95\E5\AD\97\E7\AC\A6\E4\B8\B2.935D2D1A.0", align 1 - %tag_len2 = zext i8 %tag_len to i64 - call void @print_int(ptr @"res_\E6\B5\8B\E8\AF\95\E5\AD\97\E7\AC\A6\E4\B8\B2.935D2D1A.0", i64 %tag_len2, i64 %"2_01") + %tag_len = load i8, ptr @"res_\E6\B5\8B\E8\AF\95\E5\AD\97\E7\AC\A6\E4\B8\B2.935D2D1A.0", align 1, !dbg !8 + %tag_len2 = zext i8 %tag_len to i64, !dbg !8 + call void @print_int(ptr @"res_\E6\B5\8B\E8\AF\95\E5\AD\97\E7\AC\A6\E4\B8\B2.935D2D1A.0", i64 %tag_len2, i64 %"2_01"), !dbg !8 ret void } declare void @print_int(ptr, i64, i64) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{null, !7} +!7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_13.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_13.snap index 5680b3487..11fa93891 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_13.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_13.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @"res_test!@#$%^.2547CEEA.0" = private constant [24 x i8] c"\17USER:INT:test!@#$%^&*()" -define internal void @_hl.main.1(i64 %0) { +define internal void @_hl.main.1(i64 %0) !dbg !3 { alloca_block: %"2_0" = alloca i64, align 8 br label %entry_block @@ -15,10 +15,23 @@ alloca_block: entry_block: ; preds = %alloca_block store i64 %0, ptr %"2_0", align 4 %"2_01" = load i64, ptr %"2_0", align 4 - %tag_len = load i8, ptr @"res_test!@#$%^.2547CEEA.0", align 1 - %tag_len2 = zext i8 %tag_len to i64 - call void @print_uint(ptr @"res_test!@#$%^.2547CEEA.0", i64 %tag_len2, i64 %"2_01") + %tag_len = load i8, ptr @"res_test!@#$%^.2547CEEA.0", align 1, !dbg !8 + %tag_len2 = zext i8 %tag_len to i64, !dbg !8 + call void @print_uint(ptr @"res_test!@#$%^.2547CEEA.0", i64 %tag_len2, i64 %"2_01"), !dbg !8 ret void } declare void @print_uint(ptr, i64, i64) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{null, !7} +!7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_15.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_15.snap index 43feb3284..2783e9ced 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_15.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_15.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @"res_ spaces .F46B5D1D.0" = private constant [41 x i8] c"(USER:BOOL: spaces tabs\09\09\09newlines\0A\0A\0A" -define internal void @_hl.main.1(i1 %0) { +define internal void @_hl.main.1(i1 %0) !dbg !3 { alloca_block: %"2_0" = alloca i1, align 1 br label %entry_block @@ -15,10 +15,23 @@ alloca_block: entry_block: ; preds = %alloca_block store i1 %0, ptr %"2_0", align 1 %"2_01" = load i1, ptr %"2_0", align 1 - %tag_len = load i8, ptr @"res_ spaces .F46B5D1D.0", align 1 - %tag_len2 = zext i8 %tag_len to i64 - call void @print_bool(ptr @"res_ spaces .F46B5D1D.0", i64 %tag_len2, i1 %"2_01") + %tag_len = load i8, ptr @"res_ spaces .F46B5D1D.0", align 1, !dbg !8 + %tag_len2 = zext i8 %tag_len to i64, !dbg !8 + call void @print_bool(ptr @"res_ spaces .F46B5D1D.0", i64 %tag_len2, i1 %"2_01"), !dbg !8 ret void } declare void @print_bool(ptr, i64, i1) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{null, !7} +!7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_16.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_16.snap index 9913d7df3..51935ed0c 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_16.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_16.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @"res_\F0\9F\9A\80\F0\9F\91\A8\E2\80\8D\F0\9F\91\A9\E2\80\8D\F0\9F\91\A7\E2\80\8D\F0\9F\91\A6\F0\9F\8C\8D.F7EE3FAA.0" = private constant [44 x i8] c"+USER:BOOL:\F0\9F\9A\80\F0\9F\91\A8\E2\80\8D\F0\9F\91\A9\E2\80\8D\F0\9F\91\A7\E2\80\8D\F0\9F\91\A6\F0\9F\8C\8D" -define internal void @_hl.main.1(i1 %0) { +define internal void @_hl.main.1(i1 %0) !dbg !3 { alloca_block: %"2_0" = alloca i1, align 1 br label %entry_block @@ -15,10 +15,23 @@ alloca_block: entry_block: ; preds = %alloca_block store i1 %0, ptr %"2_0", align 1 %"2_01" = load i1, ptr %"2_0", align 1 - %tag_len = load i8, ptr @"res_\F0\9F\9A\80\F0\9F\91\A8\E2\80\8D\F0\9F\91\A9\E2\80\8D\F0\9F\91\A7\E2\80\8D\F0\9F\91\A6\F0\9F\8C\8D.F7EE3FAA.0", align 1 - %tag_len2 = zext i8 %tag_len to i64 - call void @print_bool(ptr @"res_\F0\9F\9A\80\F0\9F\91\A8\E2\80\8D\F0\9F\91\A9\E2\80\8D\F0\9F\91\A7\E2\80\8D\F0\9F\91\A6\F0\9F\8C\8D.F7EE3FAA.0", i64 %tag_len2, i1 %"2_01") + %tag_len = load i8, ptr @"res_\F0\9F\9A\80\F0\9F\91\A8\E2\80\8D\F0\9F\91\A9\E2\80\8D\F0\9F\91\A7\E2\80\8D\F0\9F\91\A6\F0\9F\8C\8D.F7EE3FAA.0", align 1, !dbg !8 + %tag_len2 = zext i8 %tag_len to i64, !dbg !8 + call void @print_bool(ptr @"res_\F0\9F\9A\80\F0\9F\91\A8\E2\80\8D\F0\9F\91\A9\E2\80\8D\F0\9F\91\A7\E2\80\8D\F0\9F\91\A6\F0\9F\8C\8D.F7EE3FAA.0", i64 %tag_len2, i1 %"2_01"), !dbg !8 ret void } declare void @print_bool(ptr, i64, i1) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{null, !7} +!7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_2.snap index 637e6c305..328b110ce 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_2.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @res_test_int.258C85C2.0 = private constant [18 x i8] c"\11USER:INT:test_int" -define internal void @_hl.main.1(i64 %0) { +define internal void @_hl.main.1(i64 %0) !dbg !3 { alloca_block: %"2_0" = alloca i64, align 8 br label %entry_block @@ -15,10 +15,23 @@ alloca_block: entry_block: ; preds = %alloca_block store i64 %0, ptr %"2_0", align 4 %"2_01" = load i64, ptr %"2_0", align 4 - %tag_len = load i8, ptr @res_test_int.258C85C2.0, align 1 - %tag_len2 = zext i8 %tag_len to i64 - call void @print_int(ptr @res_test_int.258C85C2.0, i64 %tag_len2, i64 %"2_01") + %tag_len = load i8, ptr @res_test_int.258C85C2.0, align 1, !dbg !8 + %tag_len2 = zext i8 %tag_len to i64, !dbg !8 + call void @print_int(ptr @res_test_int.258C85C2.0, i64 %tag_len2, i64 %"2_01"), !dbg !8 ret void } declare void @print_int(ptr, i64, i64) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{null, !7} +!7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_3.snap index b6edcf627..e4f47f0b8 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_3.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @res_test_uint.DE04EADD.0 = private constant [19 x i8] c"\12USER:INT:test_uint" -define internal void @_hl.main.1(i64 %0) { +define internal void @_hl.main.1(i64 %0) !dbg !3 { alloca_block: %"2_0" = alloca i64, align 8 br label %entry_block @@ -15,10 +15,23 @@ alloca_block: entry_block: ; preds = %alloca_block store i64 %0, ptr %"2_0", align 4 %"2_01" = load i64, ptr %"2_0", align 4 - %tag_len = load i8, ptr @res_test_uint.DE04EADD.0, align 1 - %tag_len2 = zext i8 %tag_len to i64 - call void @print_uint(ptr @res_test_uint.DE04EADD.0, i64 %tag_len2, i64 %"2_01") + %tag_len = load i8, ptr @res_test_uint.DE04EADD.0, align 1, !dbg !8 + %tag_len2 = zext i8 %tag_len to i64, !dbg !8 + call void @print_uint(ptr @res_test_uint.DE04EADD.0, i64 %tag_len2, i64 %"2_01"), !dbg !8 ret void } declare void @print_uint(ptr, i64, i64) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{null, !7} +!7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_4.snap index 0a631f536..11a166d34 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_4.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @res_test_f64.A24BDAE1.0 = private constant [20 x i8] c"\13USER:FLOAT:test_f64" -define internal void @_hl.main.1(double %0) { +define internal void @_hl.main.1(double %0) !dbg !3 { alloca_block: %"2_0" = alloca double, align 8 br label %entry_block @@ -15,10 +15,23 @@ alloca_block: entry_block: ; preds = %alloca_block store double %0, ptr %"2_0", align 8 %"2_01" = load double, ptr %"2_0", align 8 - %tag_len = load i8, ptr @res_test_f64.A24BDAE1.0, align 1 - %tag_len2 = zext i8 %tag_len to i64 - call void @print_float(ptr @res_test_f64.A24BDAE1.0, i64 %tag_len2, double %"2_01") + %tag_len = load i8, ptr @res_test_f64.A24BDAE1.0, align 1, !dbg !8 + %tag_len2 = zext i8 %tag_len to i64, !dbg !8 + call void @print_float(ptr @res_test_f64.A24BDAE1.0, i64 %tag_len2, double %"2_01"), !dbg !8 ret void } declare void @print_float(ptr, i64, double) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{null, !7} +!7 = !DIBasicType(name: "f64", size: 64, encoding: DW_ATE_float) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_5.snap index 2095e59c2..31b64218e 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_5.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_5.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @res_test_arr_b.866EEC87.0 = private constant [27 x i8] c"\1AUSER:BOOLARR:test_arr_bool" -define internal void @_hl.main.1({ ptr, i64 } %0) { +define internal void @_hl.main.1({ ptr, i64 } %0) !dbg !3 { alloca_block: %"2_0" = alloca { ptr, i64 }, align 8 br label %entry_block @@ -15,25 +15,41 @@ alloca_block: entry_block: ; preds = %alloca_block store { ptr, i64 } %0, ptr %"2_0", align 8 %"2_01" = load { ptr, i64 }, ptr %"2_0", align 8 - %tag_len = load i8, ptr @res_test_arr_b.866EEC87.0, align 1 - %tag_len2 = zext i8 %tag_len to i64 - %array_ptr = extractvalue { ptr, i64 } %"2_01", 0 - %array_offset = extractvalue { ptr, i64 } %"2_01", 1 - %1 = getelementptr inbounds [10 x i1], ptr %array_ptr, i64 %array_offset - %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 - %x_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 0 - %y_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 1 - %arr_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 2 - %mask_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 3 - %2 = alloca i1, i32 10, align 1 - store [10 x i1] zeroinitializer, ptr %2, align 1 - store i32 10, ptr %x_ptr, align 4 - store i32 1, ptr %y_ptr, align 4 - store ptr %1, ptr %arr_ptr, align 8 - store ptr %2, ptr %mask_ptr, align 8 - %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1 - call void @print_bool_arr(ptr @res_test_arr_b.866EEC87.0, i64 %tag_len2, ptr %out_arr_alloca) + %tag_len = load i8, ptr @res_test_arr_b.866EEC87.0, align 1, !dbg !11 + %tag_len2 = zext i8 %tag_len to i64, !dbg !11 + %array_ptr = extractvalue { ptr, i64 } %"2_01", 0, !dbg !11 + %array_offset = extractvalue { ptr, i64 } %"2_01", 1, !dbg !11 + %1 = getelementptr inbounds [10 x i1], ptr %array_ptr, i64 %array_offset, !dbg !11 + %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8, !dbg !11 + %x_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 0, !dbg !11 + %y_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 1, !dbg !11 + %arr_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 2, !dbg !11 + %mask_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 3, !dbg !11 + %2 = alloca i1, i32 10, align 1, !dbg !11 + store [10 x i1] zeroinitializer, ptr %2, align 1, !dbg !11 + store i32 10, ptr %x_ptr, align 4, !dbg !11 + store i32 1, ptr %y_ptr, align 4, !dbg !11 + store ptr %1, ptr %arr_ptr, align 8, !dbg !11 + store ptr %2, ptr %mask_ptr, align 8, !dbg !11 + %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1, !dbg !11 + call void @print_bool_arr(ptr @res_test_arr_b.866EEC87.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 ret void } declare void @print_bool_arr(ptr, i64, ptr) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{null, !7} +!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ ptr, i64 }", file: !2, size: 16, align: 8, elements: !8) +!8 = !{!9, !10} +!9 = !DIBasicType(name: "ptr", size: 64, encoding: DW_ATE_address) +!10 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!11 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_7.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_7.snap index 809855c5c..d7ede5e55 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_7.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_7.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @res_test_arr_i.DFD30452.0 = private constant [25 x i8] c"\18USER:INTARR:test_arr_int" -define internal void @_hl.main.1({ ptr, i64 } %0) { +define internal void @_hl.main.1({ ptr, i64 } %0) !dbg !3 { alloca_block: %"2_0" = alloca { ptr, i64 }, align 8 br label %entry_block @@ -15,25 +15,41 @@ alloca_block: entry_block: ; preds = %alloca_block store { ptr, i64 } %0, ptr %"2_0", align 8 %"2_01" = load { ptr, i64 }, ptr %"2_0", align 8 - %tag_len = load i8, ptr @res_test_arr_i.DFD30452.0, align 1 - %tag_len2 = zext i8 %tag_len to i64 - %array_ptr = extractvalue { ptr, i64 } %"2_01", 0 - %array_offset = extractvalue { ptr, i64 } %"2_01", 1 - %1 = getelementptr inbounds [10 x i64], ptr %array_ptr, i64 %array_offset - %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 - %x_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 0 - %y_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 1 - %arr_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 2 - %mask_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 3 - %2 = alloca i1, i32 10, align 1 - store [10 x i1] zeroinitializer, ptr %2, align 1 - store i32 10, ptr %x_ptr, align 4 - store i32 1, ptr %y_ptr, align 4 - store ptr %1, ptr %arr_ptr, align 8 - store ptr %2, ptr %mask_ptr, align 8 - %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1 - call void @print_int_arr(ptr @res_test_arr_i.DFD30452.0, i64 %tag_len2, ptr %out_arr_alloca) + %tag_len = load i8, ptr @res_test_arr_i.DFD30452.0, align 1, !dbg !11 + %tag_len2 = zext i8 %tag_len to i64, !dbg !11 + %array_ptr = extractvalue { ptr, i64 } %"2_01", 0, !dbg !11 + %array_offset = extractvalue { ptr, i64 } %"2_01", 1, !dbg !11 + %1 = getelementptr inbounds [10 x i64], ptr %array_ptr, i64 %array_offset, !dbg !11 + %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8, !dbg !11 + %x_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 0, !dbg !11 + %y_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 1, !dbg !11 + %arr_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 2, !dbg !11 + %mask_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 3, !dbg !11 + %2 = alloca i1, i32 10, align 1, !dbg !11 + store [10 x i1] zeroinitializer, ptr %2, align 1, !dbg !11 + store i32 10, ptr %x_ptr, align 4, !dbg !11 + store i32 1, ptr %y_ptr, align 4, !dbg !11 + store ptr %1, ptr %arr_ptr, align 8, !dbg !11 + store ptr %2, ptr %mask_ptr, align 8, !dbg !11 + %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1, !dbg !11 + call void @print_int_arr(ptr @res_test_arr_i.DFD30452.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 ret void } declare void @print_int_arr(ptr, i64, ptr) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{null, !7} +!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ ptr, i64 }", file: !2, size: 16, align: 8, elements: !8) +!8 = !{!9, !10} +!9 = !DIBasicType(name: "ptr", size: 64, encoding: DW_ATE_address) +!10 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!11 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_9.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_9.snap index 8777c792b..c8130f27b 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_9.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_9.snap @@ -7,7 +7,7 @@ source_filename = "test_context" @res_test_arr_u.3D1C515C.0 = private constant [26 x i8] c"\19USER:INTARR:test_arr_uint" -define internal void @_hl.main.1({ ptr, i64 } %0) { +define internal void @_hl.main.1({ ptr, i64 } %0) !dbg !3 { alloca_block: %"2_0" = alloca { ptr, i64 }, align 8 br label %entry_block @@ -15,25 +15,41 @@ alloca_block: entry_block: ; preds = %alloca_block store { ptr, i64 } %0, ptr %"2_0", align 8 %"2_01" = load { ptr, i64 }, ptr %"2_0", align 8 - %tag_len = load i8, ptr @res_test_arr_u.3D1C515C.0, align 1 - %tag_len2 = zext i8 %tag_len to i64 - %array_ptr = extractvalue { ptr, i64 } %"2_01", 0 - %array_offset = extractvalue { ptr, i64 } %"2_01", 1 - %1 = getelementptr inbounds [10 x i64], ptr %array_ptr, i64 %array_offset - %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8 - %x_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 0 - %y_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 1 - %arr_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 2 - %mask_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 3 - %2 = alloca i1, i32 10, align 1 - store [10 x i1] zeroinitializer, ptr %2, align 1 - store i32 10, ptr %x_ptr, align 4 - store i32 1, ptr %y_ptr, align 4 - store ptr %1, ptr %arr_ptr, align 8 - store ptr %2, ptr %mask_ptr, align 8 - %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1 - call void @print_uint_arr(ptr @res_test_arr_u.3D1C515C.0, i64 %tag_len2, ptr %out_arr_alloca) + %tag_len = load i8, ptr @res_test_arr_u.3D1C515C.0, align 1, !dbg !11 + %tag_len2 = zext i8 %tag_len to i64, !dbg !11 + %array_ptr = extractvalue { ptr, i64 } %"2_01", 0, !dbg !11 + %array_offset = extractvalue { ptr, i64 } %"2_01", 1, !dbg !11 + %1 = getelementptr inbounds [10 x i64], ptr %array_ptr, i64 %array_offset, !dbg !11 + %out_arr_alloca = alloca <{ i32, i32, ptr, ptr }>, align 8, !dbg !11 + %x_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 0, !dbg !11 + %y_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 1, !dbg !11 + %arr_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 2, !dbg !11 + %mask_ptr = getelementptr inbounds nuw <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, i32 0, i32 3, !dbg !11 + %2 = alloca i1, i32 10, align 1, !dbg !11 + store [10 x i1] zeroinitializer, ptr %2, align 1, !dbg !11 + store i32 10, ptr %x_ptr, align 4, !dbg !11 + store i32 1, ptr %y_ptr, align 4, !dbg !11 + store ptr %1, ptr %arr_ptr, align 8, !dbg !11 + store ptr %2, ptr %mask_ptr, align 8, !dbg !11 + %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1, !dbg !11 + call void @print_uint_arr(ptr @res_test_arr_u.3D1C515C.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 ret void } declare void @print_uint_arr(ptr, i64, ptr) + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{null, !7} +!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ ptr, i64 }", file: !2, size: 16, align: 8, elements: !8) +!8 = !{!9, !10} +!9 = !DIBasicType(name: "ptr", size: 64, encoding: DW_ATE_address) +!10 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!11 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@llvm21_1.snap index 1f7077f82..311452bd1 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@llvm21_1.snap @@ -5,13 +5,26 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal i64 @_hl.main.1() { +define internal i64 @_hl.main.1() !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %shot = call i64 @get_current_shot() + %shot = call i64 @get_current_shot(), !dbg !8 ret i64 %shot } declare i64 @get_current_shot() + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7} +!7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@pre-mem2reg@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@pre-mem2reg@llvm21_1.snap index 565aa96c4..0904e34f3 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@pre-mem2reg@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@pre-mem2reg@llvm21_1.snap @@ -5,15 +5,15 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal i64 @_hl.main.1() { +define internal i64 @_hl.main.1() !dbg !3 { alloca_block: %"0" = alloca i64, align 8 %"4_0" = alloca i64, align 8 br label %entry_block entry_block: ; preds = %alloca_block - %shot = call i64 @get_current_shot() - store i64 %shot, ptr %"4_0", align 4 + %shot = call i64 @get_current_shot(), !dbg !8 + store i64 %shot, ptr %"4_0", align 4, !dbg !8 %"4_01" = load i64, ptr %"4_0", align 4 store i64 %"4_01", ptr %"0", align 4 %"02" = load i64, ptr %"0", align 4 @@ -21,3 +21,16 @@ entry_block: ; preds = %alloca_block } declare i64 @get_current_shot() + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7} +!7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket-qsystem/src/llvm/utils.rs b/tket-qsystem/src/llvm/utils.rs index b91a6aaab..79029147b 100644 --- a/tket-qsystem/src/llvm/utils.rs +++ b/tket-qsystem/src/llvm/utils.rs @@ -74,7 +74,7 @@ mod test { .add_default_int_extensions() }); let ext_op = op.to_extension_op().unwrap().into(); - let hugr = single_op_hugr(ext_op); + let mut hugr = single_op_hugr(ext_op); check_emission!(hugr, llvm_ctx); } } diff --git a/tket/src/llvm/bool.rs b/tket/src/llvm/bool.rs index 9563b5e6d..4c68c5fc8 100644 --- a/tket/src/llvm/bool.rs +++ b/tket/src/llvm/bool.rs @@ -141,7 +141,7 @@ mod test { .add_default_int_extensions() }); let ext_op = op.to_extension_op().unwrap().into(); - let hugr = single_op_hugr(ext_op); + let mut hugr = single_op_hugr(ext_op); check_emission!(hugr, llvm_ctx); } } diff --git a/tket/src/llvm/rotation.rs b/tket/src/llvm/rotation.rs index b373e428b..361b95c42 100644 --- a/tket/src/llvm/rotation.rs +++ b/tket/src/llvm/rotation.rs @@ -244,7 +244,7 @@ mod test { #[with(_id)] mut llvm_ctx: TestContext, #[case] prelude: impl PreludeCodegen + 'static, ) { - let hugr = SimpleHugrConfig::new() + let mut hugr = SimpleHugrConfig::new() .with_ins(vec![float64_type()]) .finish_with_exts(|mut builder, _reg| { let [a1] = builder.input_wires_arr(); @@ -274,7 +274,7 @@ mod test { #[rstest] #[case(ConstRotation::new(1.0).unwrap(), ConstRotation::new(0.5).unwrap(), 1.5)] #[case(ConstRotation::PI, ConstRotation::new(1.5).unwrap(), 2.5)] - fn exec_aadd( + fn exec_add( mut exec_ctx: TestContext, #[case] angle1: ConstRotation, #[case] angle2: ConstRotation, diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_1.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_1.snap index d3fd9c9e7..f9fbe3dc9 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_1.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_1.snap @@ -5,11 +5,24 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal i1 @_hl.main.1(i1 %0) { +define internal i1 @_hl.main.1(i1 %0) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %1 = select i1 %0, i1 true, i1 false + %1 = select i1 %0, i1 true, i1 false, !dbg !8 ret i1 %1 } + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !7} +!7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_2.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_2.snap index 2e5dcc2ec..2a99eb081 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_2.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_2.snap @@ -5,10 +5,22 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal i1 @_hl.main.1(i1 %0) { +define internal i1 @_hl.main.1(i1 %0) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block ret i1 %0 } + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !7} +!7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_3.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_3.snap index 270a70277..d5b2d7777 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_3.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_3.snap @@ -5,11 +5,24 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal i1 @_hl.main.1(i1 %0) { +define internal i1 @_hl.main.1(i1 %0) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %1 = xor i1 %0, true + %1 = xor i1 %0, true, !dbg !8 ret i1 %1 } + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !7} +!7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_4.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_4.snap index 241f4932b..844a8d27c 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_4.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_4.snap @@ -5,11 +5,24 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal i1 @_hl.main.1(i1 %0, i1 %1) { +define internal i1 @_hl.main.1(i1 %0, i1 %1) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %2 = and i1 %0, %1 + %2 = and i1 %0, %1, !dbg !8 ret i1 %2 } + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !7, !7} +!7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_5.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_5.snap index a2e47e3e1..03505a411 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_5.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_5.snap @@ -5,11 +5,24 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal i1 @_hl.main.1(i1 %0, i1 %1) { +define internal i1 @_hl.main.1(i1 %0, i1 %1) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %2 = or i1 %0, %1 + %2 = or i1 %0, %1, !dbg !8 ret i1 %2 } + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !7, !7} +!7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_6.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_6.snap index d5801c415..f598bfcdc 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_6.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_6.snap @@ -5,11 +5,24 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal i1 @_hl.main.1(i1 %0, i1 %1) { +define internal i1 @_hl.main.1(i1 %0, i1 %1) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %2 = xor i1 %0, %1 + %2 = xor i1 %0, %1, !dbg !8 ret i1 %2 } + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !7, !7} +!7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_7.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_7.snap index a2ff1fc65..bf1f84520 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_7.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_7.snap @@ -5,11 +5,24 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal i1 @_hl.main.1(i1 %0, i1 %1) { +define internal i1 @_hl.main.1(i1 %0, i1 %1) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %2 = icmp eq i1 %0, %1 + %2 = icmp eq i1 %0, %1, !dbg !8 ret i1 %2 } + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !7, !7} +!7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_1.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_1.snap index 98441114b..3f6aebf55 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_1.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_1.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal i1 @_hl.main.1(i1 %0) { +define internal i1 @_hl.main.1(i1 %0) !dbg !3 { alloca_block: %"0" = alloca i1, align 1 %"2_0" = alloca i1, align 1 @@ -15,10 +15,23 @@ alloca_block: entry_block: ; preds = %alloca_block store i1 %0, ptr %"2_0", align 1 %"2_01" = load i1, ptr %"2_0", align 1 - %1 = select i1 %"2_01", i1 true, i1 false - store i1 %1, ptr %"4_0", align 1 + %1 = select i1 %"2_01", i1 true, i1 false, !dbg !8 + store i1 %1, ptr %"4_0", align 1, !dbg !8 %"4_02" = load i1, ptr %"4_0", align 1 store i1 %"4_02", ptr %"0", align 1 %"03" = load i1, ptr %"0", align 1 ret i1 %"03" } + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !7} +!7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_2.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_2.snap index 3537ec577..eea49cb30 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_2.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_2.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal i1 @_hl.main.1(i1 %0) { +define internal i1 @_hl.main.1(i1 %0) !dbg !3 { alloca_block: %"0" = alloca i1, align 1 %"2_0" = alloca i1, align 1 @@ -15,9 +15,22 @@ alloca_block: entry_block: ; preds = %alloca_block store i1 %0, ptr %"2_0", align 1 %"2_01" = load i1, ptr %"2_0", align 1 - store i1 %"2_01", ptr %"4_0", align 1 + store i1 %"2_01", ptr %"4_0", align 1, !dbg !8 %"4_02" = load i1, ptr %"4_0", align 1 store i1 %"4_02", ptr %"0", align 1 %"03" = load i1, ptr %"0", align 1 ret i1 %"03" } + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !7} +!7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_3.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_3.snap index df4c08751..710e6386c 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_3.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_3.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal i1 @_hl.main.1(i1 %0) { +define internal i1 @_hl.main.1(i1 %0) !dbg !3 { alloca_block: %"0" = alloca i1, align 1 %"2_0" = alloca i1, align 1 @@ -15,10 +15,23 @@ alloca_block: entry_block: ; preds = %alloca_block store i1 %0, ptr %"2_0", align 1 %"2_01" = load i1, ptr %"2_0", align 1 - %1 = xor i1 %"2_01", true - store i1 %1, ptr %"4_0", align 1 + %1 = xor i1 %"2_01", true, !dbg !8 + store i1 %1, ptr %"4_0", align 1, !dbg !8 %"4_02" = load i1, ptr %"4_0", align 1 store i1 %"4_02", ptr %"0", align 1 %"03" = load i1, ptr %"0", align 1 ret i1 %"03" } + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !7} +!7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_4.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_4.snap index 11c16eb29..9a1decc6e 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_4.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_4.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal i1 @_hl.main.1(i1 %0, i1 %1) { +define internal i1 @_hl.main.1(i1 %0, i1 %1) !dbg !3 { alloca_block: %"0" = alloca i1, align 1 %"2_0" = alloca i1, align 1 @@ -18,10 +18,23 @@ entry_block: ; preds = %alloca_block store i1 %1, ptr %"2_1", align 1 %"2_01" = load i1, ptr %"2_0", align 1 %"2_12" = load i1, ptr %"2_1", align 1 - %2 = and i1 %"2_01", %"2_12" - store i1 %2, ptr %"4_0", align 1 + %2 = and i1 %"2_01", %"2_12", !dbg !8 + store i1 %2, ptr %"4_0", align 1, !dbg !8 %"4_03" = load i1, ptr %"4_0", align 1 store i1 %"4_03", ptr %"0", align 1 %"04" = load i1, ptr %"0", align 1 ret i1 %"04" } + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !7, !7} +!7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_5.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_5.snap index 848c4bca9..8a37da0e3 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_5.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_5.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal i1 @_hl.main.1(i1 %0, i1 %1) { +define internal i1 @_hl.main.1(i1 %0, i1 %1) !dbg !3 { alloca_block: %"0" = alloca i1, align 1 %"2_0" = alloca i1, align 1 @@ -18,10 +18,23 @@ entry_block: ; preds = %alloca_block store i1 %1, ptr %"2_1", align 1 %"2_01" = load i1, ptr %"2_0", align 1 %"2_12" = load i1, ptr %"2_1", align 1 - %2 = or i1 %"2_01", %"2_12" - store i1 %2, ptr %"4_0", align 1 + %2 = or i1 %"2_01", %"2_12", !dbg !8 + store i1 %2, ptr %"4_0", align 1, !dbg !8 %"4_03" = load i1, ptr %"4_0", align 1 store i1 %"4_03", ptr %"0", align 1 %"04" = load i1, ptr %"0", align 1 ret i1 %"04" } + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !7, !7} +!7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_6.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_6.snap index 6bcb19853..e5216b184 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_6.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_6.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal i1 @_hl.main.1(i1 %0, i1 %1) { +define internal i1 @_hl.main.1(i1 %0, i1 %1) !dbg !3 { alloca_block: %"0" = alloca i1, align 1 %"2_0" = alloca i1, align 1 @@ -18,10 +18,23 @@ entry_block: ; preds = %alloca_block store i1 %1, ptr %"2_1", align 1 %"2_01" = load i1, ptr %"2_0", align 1 %"2_12" = load i1, ptr %"2_1", align 1 - %2 = xor i1 %"2_01", %"2_12" - store i1 %2, ptr %"4_0", align 1 + %2 = xor i1 %"2_01", %"2_12", !dbg !8 + store i1 %2, ptr %"4_0", align 1, !dbg !8 %"4_03" = load i1, ptr %"4_0", align 1 store i1 %"4_03", ptr %"0", align 1 %"04" = load i1, ptr %"0", align 1 ret i1 %"04" } + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !7, !7} +!7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_7.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_7.snap index ae9b27724..9420cc329 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_7.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_7.snap @@ -5,7 +5,7 @@ expression: mod_str ; ModuleID = 'test_context' source_filename = "test_context" -define internal i1 @_hl.main.1(i1 %0, i1 %1) { +define internal i1 @_hl.main.1(i1 %0, i1 %1) !dbg !3 { alloca_block: %"0" = alloca i1, align 1 %"2_0" = alloca i1, align 1 @@ -18,10 +18,23 @@ entry_block: ; preds = %alloca_block store i1 %1, ptr %"2_1", align 1 %"2_01" = load i1, ptr %"2_0", align 1 %"2_12" = load i1, ptr %"2_1", align 1 - %2 = icmp eq i1 %"2_01", %"2_12" - store i1 %2, ptr %"4_0", align 1 + %2 = icmp eq i1 %"2_01", %"2_12", !dbg !8 + store i1 %2, ptr %"4_0", align 1, !dbg !8 %"4_03" = load i1, ptr %"4_0", align 1 store i1 %"4_03", ptr %"0", align 1 %"04" = load i1, ptr %"0", align 1 ret i1 %"04" } + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{!7, !7, !7} +!7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) +!8 = !DILocation(line: 5299, column: 65, scope: !3) diff --git a/tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@llvm21_0.snap b/tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@llvm21_0.snap index 48c399808..1bb01084a 100644 --- a/tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@llvm21_0.snap +++ b/tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@llvm21_0.snap @@ -10,23 +10,23 @@ source_filename = "test_context" @1 = private unnamed_addr constant [37 x i8] c"Expected variant 1 but got variant 0\00", align 1 @prelude.panic_template.1 = private unnamed_addr constant [34 x i8] c"Program panicked (signal %i): %s\0A\00", align 1 -define internal void @_hl.main.1(double %0) { +define internal void @_hl.main.1(double %0) !dbg !3 { alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %1 = call i1 @llvm.is.fpclass.f64(double %0, i32 504) - br i1 %1, label %4, label %2 + %1 = call i1 @llvm.is.fpclass.f64(double %0, i32 504), !dbg !8 + br i1 %1, label %4, label %2, !dbg !8 2: ; preds = %entry_block - %3 = call i32 (ptr, ...) @printf(ptr @prelude.panic_template, i32 1, ptr @0) - call void @abort() - unreachable + %3 = call i32 (ptr, ...) @printf(ptr @prelude.panic_template, i32 1, ptr @0), !dbg !8 + call void @abort(), !dbg !8 + unreachable, !dbg !8 4: ; preds = %entry_block - %5 = call i1 @llvm.is.fpclass.f64(double %0, i32 504) - %6 = insertvalue { i1, double } { i1 true, double poison }, double %0, 1 - %7 = select i1 %5, { i1, double } %6, { i1, double } { i1 false, double poison } + %5 = call i1 @llvm.is.fpclass.f64(double %0, i32 504), !dbg !9 + %6 = insertvalue { i1, double } { i1 true, double poison }, double %0, 1, !dbg !9 + %7 = select i1 %5, { i1, double } %6, { i1, double } { i1 false, double poison }, !dbg !9 %8 = extractvalue { i1, double } %7, 0 switch i1 %8, label %9 [ i1 true, label %10 @@ -40,10 +40,10 @@ entry_block: ; preds = %alloca_block br label %cond_7_case_1 cond_7_case_0: ; preds = %9 - %12 = extractvalue { i32, ptr } { i32 1, ptr @1 }, 0 - %13 = extractvalue { i32, ptr } { i32 1, ptr @1 }, 1 - %14 = call i32 (ptr, ...) @printf(ptr @prelude.panic_template.1, i32 %12, ptr %13) - call void @abort() + %12 = extractvalue { i32, ptr } { i32 1, ptr @1 }, 0, !dbg !10 + %13 = extractvalue { i32, ptr } { i32 1, ptr @1 }, 1, !dbg !10 + %14 = call i32 (ptr, ...) @printf(ptr @prelude.panic_template.1, i32 %12, ptr %13), !dbg !10 + call void @abort(), !dbg !10 br label %cond_exit_7 cond_7_case_1: ; preds = %10 @@ -51,15 +51,31 @@ cond_7_case_1: ; preds = %10 cond_exit_7: ; preds = %cond_7_case_1, %cond_7_case_0 %"0.0" = phi double [ 0.000000e+00, %cond_7_case_0 ], [ %11, %cond_7_case_1 ] - %15 = fadd double %0, %"0.0" + %15 = fadd double %0, %"0.0", !dbg !11 ret void } -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) declare i1 @llvm.is.fpclass.f64(double, i32 immarg) #0 declare i32 @printf(ptr, ...) declare void @abort() -attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #0 = { nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) } + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/FfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC/AphFGIyrhvZsHeDgUnyeIVw.gpy.py", directory: "/RCTcNfsTEG") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 11747, type: !5, scopeLine: 11748, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/FfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC/AphFGIyrhvZsHeDgUnyeIVw.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{null, !7} +!7 = !DIBasicType(name: "f64", size: 64, encoding: DW_ATE_float) +!8 = !DILocation(line: 14941, column: 155, scope: !3) +!9 = !DILocation(line: 18189, column: 496, scope: !3) +!10 = !DILocation(line: 4144, column: 352, scope: !3) +!11 = !DILocation(line: 16024, column: 485, scope: !3) diff --git a/tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@pre-mem2reg@llvm21_0.snap b/tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@pre-mem2reg@llvm21_0.snap index dcf69b7ec..56c6f78fb 100644 --- a/tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@pre-mem2reg@llvm21_0.snap +++ b/tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@pre-mem2reg@llvm21_0.snap @@ -10,7 +10,7 @@ source_filename = "test_context" @1 = private unnamed_addr constant [37 x i8] c"Expected variant 1 but got variant 0\00", align 1 @prelude.panic_template.1 = private unnamed_addr constant [34 x i8] c"Program panicked (signal %i): %s\0A\00", align 1 -define internal void @_hl.main.1(double %0) { +define internal void @_hl.main.1(double %0) !dbg !3 { alloca_block: %"2_0" = alloca double, align 8 %"4_0" = alloca double, align 8 @@ -28,23 +28,23 @@ alloca_block: entry_block: ; preds = %alloca_block store double %0, ptr %"2_0", align 8 %"2_01" = load double, ptr %"2_0", align 8 - %1 = call i1 @llvm.is.fpclass.f64(double %"2_01", i32 504) - br i1 %1, label %4, label %2 + %1 = call i1 @llvm.is.fpclass.f64(double %"2_01", i32 504), !dbg !8 + br i1 %1, label %4, label %2, !dbg !8 2: ; preds = %entry_block - %3 = call i32 (ptr, ...) @printf(ptr @prelude.panic_template, i32 1, ptr @0) - call void @abort() - unreachable + %3 = call i32 (ptr, ...) @printf(ptr @prelude.panic_template, i32 1, ptr @0), !dbg !8 + call void @abort(), !dbg !8 + unreachable, !dbg !8 4: ; preds = %entry_block - store double %"2_01", ptr %"4_0", align 8 + store double %"2_01", ptr %"4_0", align 8, !dbg !8 %"4_02" = load double, ptr %"4_0", align 8 - store double %"4_02", ptr %"5_0", align 8 + store double %"4_02", ptr %"5_0", align 8, !dbg !9 %"5_03" = load double, ptr %"5_0", align 8 - %5 = call i1 @llvm.is.fpclass.f64(double %"5_03", i32 504) - %6 = insertvalue { i1, double } { i1 true, double poison }, double %"5_03", 1 - %7 = select i1 %5, { i1, double } %6, { i1, double } { i1 false, double poison } - store { i1, double } %7, ptr %"6_0", align 8 + %5 = call i1 @llvm.is.fpclass.f64(double %"5_03", i32 504), !dbg !10 + %6 = insertvalue { i1, double } { i1 true, double poison }, double %"5_03", 1, !dbg !10 + %7 = select i1 %5, { i1, double } %6, { i1, double } { i1 false, double poison }, !dbg !10 + store { i1, double } %7, ptr %"6_0", align 8, !dbg !10 %"6_04" = load { i1, double }, ptr %"6_0", align 8 %8 = extractvalue { i1, double } %"6_04", 0 switch i1 %8, label %9 [ @@ -62,11 +62,11 @@ entry_block: ; preds = %alloca_block cond_7_case_0: ; preds = %9 store { i32, ptr } { i32 1, ptr @1 }, ptr %"12_0", align 8 %"12_06" = load { i32, ptr }, ptr %"12_0", align 8 - %12 = extractvalue { i32, ptr } %"12_06", 0 - %13 = extractvalue { i32, ptr } %"12_06", 1 - %14 = call i32 (ptr, ...) @printf(ptr @prelude.panic_template.1, i32 %12, ptr %13) - call void @abort() - store double 0.000000e+00, ptr %"13_0", align 8 + %12 = extractvalue { i32, ptr } %"12_06", 0, !dbg !11 + %13 = extractvalue { i32, ptr } %"12_06", 1, !dbg !11 + %14 = call i32 (ptr, ...) @printf(ptr @prelude.panic_template.1, i32 %12, ptr %13), !dbg !11 + call void @abort(), !dbg !11 + store double 0.000000e+00, ptr %"13_0", align 8, !dbg !11 %"13_07" = load double, ptr %"13_0", align 8 store double %"13_07", ptr %"0", align 8 br label %cond_exit_7 @@ -83,16 +83,33 @@ cond_exit_7: ; preds = %cond_7_case_1, %con store double %"05", ptr %"7_0", align 8 %"4_011" = load double, ptr %"4_0", align 8 %"7_012" = load double, ptr %"7_0", align 8 - %15 = fadd double %"4_011", %"7_012" - store double %15, ptr %"17_0", align 8 + %15 = fadd double %"4_011", %"7_012", !dbg !12 + store double %15, ptr %"17_0", align 8, !dbg !12 ret void } -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) declare i1 @llvm.is.fpclass.f64(double, i32 immarg) #0 declare i32 @printf(ptr, ...) declare void @abort() -attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #0 = { nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) } + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/FfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC/AphFGIyrhvZsHeDgUnyeIVw.gpy.py", directory: "/RCTcNfsTEG") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 11747, type: !5, scopeLine: 11748, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/FfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC/AphFGIyrhvZsHeDgUnyeIVw.gpy.py", directory: "") +!5 = !DISubroutineType(types: !6) +!6 = !{null, !7} +!7 = !DIBasicType(name: "f64", size: 64, encoding: DW_ATE_float) +!8 = !DILocation(line: 14941, column: 155, scope: !3) +!9 = !DILocation(line: 19514, column: 154, scope: !3) +!10 = !DILocation(line: 18189, column: 496, scope: !3) +!11 = !DILocation(line: 4144, column: 352, scope: !3) +!12 = !DILocation(line: 16024, column: 485, scope: !3) From 4474a65eb6ec40798d9ef4b2eaa6461f9d2e722e Mon Sep 17 00:00:00 2001 From: George Hodgkins Date: Thu, 16 Apr 2026 17:19:24 -0600 Subject: [PATCH 02/11] Update snapshot --- ...vm__rotation__test__emit_all_ops@pre-mem2reg@llvm21_0.snap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@pre-mem2reg@llvm21_0.snap b/tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@pre-mem2reg@llvm21_0.snap index 56c6f78fb..3e6cbc1ee 100644 --- a/tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@pre-mem2reg@llvm21_0.snap +++ b/tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@pre-mem2reg@llvm21_0.snap @@ -88,14 +88,14 @@ cond_exit_7: ; preds = %cond_7_case_1, %con ret void } -; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i1 @llvm.is.fpclass.f64(double, i32 immarg) #0 declare i32 @printf(ptr, ...) declare void @abort() -attributes #0 = { nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) } +attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } !llvm.module.flags = !{!0} !llvm.dbg.cu = !{!1} From 9f043150d24d0ab554348a3c5bca9575c1d3cb41 Mon Sep 17 00:00:00 2001 From: George Hodgkins Date: Mon, 20 Apr 2026 09:18:07 -0600 Subject: [PATCH 03/11] Update another snap, restore justfile --- justfile | 2 +- .../tket__llvm__rotation__test__emit_all_ops@llvm21_0.snap | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/justfile b/justfile index 4b47b3e61..151ef196c 100644 --- a/justfile +++ b/justfile @@ -33,7 +33,7 @@ build: test: test-rust test-python # Run all rust tests. test-rust *TEST_ARGS: _check_nextest_installed - uv run cargo nextest r --all-features {{TEST_ARGS}} --no-fail-fast + uv run cargo nextest r --all-features {{TEST_ARGS}} # Run all python tests. test-python *TEST_ARGS: uv run maturin develop --uv diff --git a/tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@llvm21_0.snap b/tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@llvm21_0.snap index 1bb01084a..e96eb171f 100644 --- a/tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@llvm21_0.snap +++ b/tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@llvm21_0.snap @@ -55,14 +55,14 @@ cond_exit_7: ; preds = %cond_7_case_1, %con ret void } -; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i1 @llvm.is.fpclass.f64(double, i32 immarg) #0 declare i32 @printf(ptr, ...) declare void @abort() -attributes #0 = { nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) } +attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } !llvm.module.flags = !{!0} !llvm.dbg.cu = !{!1} From 78f9f23d5f9f52d62438c1b34cabbb65ccb24d64 Mon Sep 17 00:00:00 2001 From: George Hodgkins Date: Mon, 20 Apr 2026 09:28:09 -0600 Subject: [PATCH 04/11] Update qis-compiler snaps --- .../discard_qb_array_aarch64-apple-darwin | 106 ++--- .../measure_qb_array_aarch64-apple-darwin | 210 ++++----- .../discard_qb_array_x86_64-apple-darwin | 90 ++-- .../measure_qb_array_x86_64-apple-darwin | 442 +++++++++--------- .../discard_qb_array_x86_64-unknown-linux-gnu | 90 ++-- .../measure_qb_array_x86_64-unknown-linux-gnu | 442 +++++++++--------- .../discard_qb_array_x86_64-windows-msvc | 90 ++-- .../measure_qb_array_x86_64-windows-msvc | 442 +++++++++--------- 8 files changed, 956 insertions(+), 956 deletions(-) diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-discard_qb_array/discard_qb_array_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-discard_qb_array/discard_qb_array_aarch64-apple-darwin index e8e680467..ee1bcede5 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-discard_qb_array/discard_qb_array_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-discard_qb_array/discard_qb_array_aarch64-apple-darwin @@ -31,7 +31,7 @@ entry: %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 br i1 %not_max.not.not.i.i, label %cond_213_case_0.i.i, label %__hugr__.__tk2_qalloc.218.exit.i -cond_213_case_0.i.i: ; preds = %__barray_mask_return.exit.8.i, %__barray_mask_return.exit.7.i, %__barray_mask_return.exit.6.i, %__barray_mask_return.exit.5.i, %__barray_mask_return.exit.4.i, %__barray_mask_return.exit.3.i, %__barray_mask_return.exit.2.i, %__barray_mask_return.exit.1.i, %__barray_mask_return.exit.i, %entry +cond_213_case_0.i.i: ; preds = %cond_exit_20.8.i, %cond_exit_20.7.i, %cond_exit_20.6.i, %cond_exit_20.5.i, %cond_exit_20.4.i, %cond_exit_20.3.i, %cond_exit_20.2.i, %cond_exit_20.1.i, %cond_exit_20.i, %entry tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable @@ -39,13 +39,13 @@ __hugr__.__tk2_qalloc.218.exit.i: ; preds = %entry tail call void @___reset(i64 %qalloc.i.i) %3 = load i64, ptr %2, align 4 %4 = trunc i64 %3 to i1 - br i1 %4, label %__barray_mask_return.exit.i, label %panic.i.i + br i1 %4, label %cond_exit_20.i, label %panic.i.i panic.i.i: ; preds = %__barray_check_bounds.exit.9.i, %__hugr__.__tk2_qalloc.218.exit.8.i, %__hugr__.__tk2_qalloc.218.exit.7.i, %__hugr__.__tk2_qalloc.218.exit.6.i, %__hugr__.__tk2_qalloc.218.exit.5.i, %__hugr__.__tk2_qalloc.218.exit.4.i, %__hugr__.__tk2_qalloc.218.exit.3.i, %__hugr__.__tk2_qalloc.218.exit.2.i, %__hugr__.__tk2_qalloc.218.exit.1.i, %__hugr__.__tk2_qalloc.218.exit.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.i +cond_exit_20.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.i %5 = and i64 %3, -2 store i64 %5, ptr %2, align 4 store i64 %qalloc.i.i, ptr %1, align 4 @@ -53,14 +53,14 @@ __barray_mask_return.exit.i: ; preds = %__hugr__.__tk2_qall %not_max.not.not.i.1.i = icmp eq i64 %qalloc.i.1.i, -1 br i1 %not_max.not.not.i.1.i, label %cond_213_case_0.i.i, label %__hugr__.__tk2_qalloc.218.exit.1.i -__hugr__.__tk2_qalloc.218.exit.1.i: ; preds = %__barray_mask_return.exit.i +__hugr__.__tk2_qalloc.218.exit.1.i: ; preds = %cond_exit_20.i tail call void @___reset(i64 %qalloc.i.1.i) %6 = load i64, ptr %2, align 4 %7 = and i64 %6, 2 %.not.i = icmp eq i64 %7, 0 - br i1 %.not.i, label %panic.i.i, label %__barray_mask_return.exit.1.i + br i1 %.not.i, label %panic.i.i, label %cond_exit_20.1.i -__barray_mask_return.exit.1.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.1.i +cond_exit_20.1.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.1.i %8 = and i64 %6, -3 store i64 %8, ptr %2, align 4 %9 = getelementptr inbounds nuw i8, ptr %1, i64 8 @@ -69,14 +69,14 @@ __barray_mask_return.exit.1.i: ; preds = %__hugr__.__tk2_qall %not_max.not.not.i.2.i = icmp eq i64 %qalloc.i.2.i, -1 br i1 %not_max.not.not.i.2.i, label %cond_213_case_0.i.i, label %__hugr__.__tk2_qalloc.218.exit.2.i -__hugr__.__tk2_qalloc.218.exit.2.i: ; preds = %__barray_mask_return.exit.1.i +__hugr__.__tk2_qalloc.218.exit.2.i: ; preds = %cond_exit_20.1.i tail call void @___reset(i64 %qalloc.i.2.i) %10 = load i64, ptr %2, align 4 %11 = and i64 %10, 4 - %.not104.i = icmp eq i64 %11, 0 - br i1 %.not104.i, label %panic.i.i, label %__barray_mask_return.exit.2.i + %.not106.i = icmp eq i64 %11, 0 + br i1 %.not106.i, label %panic.i.i, label %cond_exit_20.2.i -__barray_mask_return.exit.2.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.2.i +cond_exit_20.2.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.2.i %12 = and i64 %10, -5 store i64 %12, ptr %2, align 4 %13 = getelementptr inbounds nuw i8, ptr %1, i64 16 @@ -85,14 +85,14 @@ __barray_mask_return.exit.2.i: ; preds = %__hugr__.__tk2_qall %not_max.not.not.i.3.i = icmp eq i64 %qalloc.i.3.i, -1 br i1 %not_max.not.not.i.3.i, label %cond_213_case_0.i.i, label %__hugr__.__tk2_qalloc.218.exit.3.i -__hugr__.__tk2_qalloc.218.exit.3.i: ; preds = %__barray_mask_return.exit.2.i +__hugr__.__tk2_qalloc.218.exit.3.i: ; preds = %cond_exit_20.2.i tail call void @___reset(i64 %qalloc.i.3.i) %14 = load i64, ptr %2, align 4 %15 = and i64 %14, 8 - %.not105.i = icmp eq i64 %15, 0 - br i1 %.not105.i, label %panic.i.i, label %__barray_mask_return.exit.3.i + %.not107.i = icmp eq i64 %15, 0 + br i1 %.not107.i, label %panic.i.i, label %cond_exit_20.3.i -__barray_mask_return.exit.3.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.3.i +cond_exit_20.3.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.3.i %16 = and i64 %14, -9 store i64 %16, ptr %2, align 4 %17 = getelementptr inbounds nuw i8, ptr %1, i64 24 @@ -101,14 +101,14 @@ __barray_mask_return.exit.3.i: ; preds = %__hugr__.__tk2_qall %not_max.not.not.i.4.i = icmp eq i64 %qalloc.i.4.i, -1 br i1 %not_max.not.not.i.4.i, label %cond_213_case_0.i.i, label %__hugr__.__tk2_qalloc.218.exit.4.i -__hugr__.__tk2_qalloc.218.exit.4.i: ; preds = %__barray_mask_return.exit.3.i +__hugr__.__tk2_qalloc.218.exit.4.i: ; preds = %cond_exit_20.3.i tail call void @___reset(i64 %qalloc.i.4.i) %18 = load i64, ptr %2, align 4 %19 = and i64 %18, 16 - %.not106.i = icmp eq i64 %19, 0 - br i1 %.not106.i, label %panic.i.i, label %__barray_mask_return.exit.4.i + %.not108.i = icmp eq i64 %19, 0 + br i1 %.not108.i, label %panic.i.i, label %cond_exit_20.4.i -__barray_mask_return.exit.4.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.4.i +cond_exit_20.4.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.4.i %20 = and i64 %18, -17 store i64 %20, ptr %2, align 4 %21 = getelementptr inbounds nuw i8, ptr %1, i64 32 @@ -117,14 +117,14 @@ __barray_mask_return.exit.4.i: ; preds = %__hugr__.__tk2_qall %not_max.not.not.i.5.i = icmp eq i64 %qalloc.i.5.i, -1 br i1 %not_max.not.not.i.5.i, label %cond_213_case_0.i.i, label %__hugr__.__tk2_qalloc.218.exit.5.i -__hugr__.__tk2_qalloc.218.exit.5.i: ; preds = %__barray_mask_return.exit.4.i +__hugr__.__tk2_qalloc.218.exit.5.i: ; preds = %cond_exit_20.4.i tail call void @___reset(i64 %qalloc.i.5.i) %22 = load i64, ptr %2, align 4 %23 = and i64 %22, 32 - %.not107.i = icmp eq i64 %23, 0 - br i1 %.not107.i, label %panic.i.i, label %__barray_mask_return.exit.5.i + %.not109.i = icmp eq i64 %23, 0 + br i1 %.not109.i, label %panic.i.i, label %cond_exit_20.5.i -__barray_mask_return.exit.5.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.5.i +cond_exit_20.5.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.5.i %24 = and i64 %22, -33 store i64 %24, ptr %2, align 4 %25 = getelementptr inbounds nuw i8, ptr %1, i64 40 @@ -133,14 +133,14 @@ __barray_mask_return.exit.5.i: ; preds = %__hugr__.__tk2_qall %not_max.not.not.i.6.i = icmp eq i64 %qalloc.i.6.i, -1 br i1 %not_max.not.not.i.6.i, label %cond_213_case_0.i.i, label %__hugr__.__tk2_qalloc.218.exit.6.i -__hugr__.__tk2_qalloc.218.exit.6.i: ; preds = %__barray_mask_return.exit.5.i +__hugr__.__tk2_qalloc.218.exit.6.i: ; preds = %cond_exit_20.5.i tail call void @___reset(i64 %qalloc.i.6.i) %26 = load i64, ptr %2, align 4 %27 = and i64 %26, 64 - %.not108.i = icmp eq i64 %27, 0 - br i1 %.not108.i, label %panic.i.i, label %__barray_mask_return.exit.6.i + %.not110.i = icmp eq i64 %27, 0 + br i1 %.not110.i, label %panic.i.i, label %cond_exit_20.6.i -__barray_mask_return.exit.6.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.6.i +cond_exit_20.6.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.6.i %28 = and i64 %26, -65 store i64 %28, ptr %2, align 4 %29 = getelementptr inbounds nuw i8, ptr %1, i64 48 @@ -149,14 +149,14 @@ __barray_mask_return.exit.6.i: ; preds = %__hugr__.__tk2_qall %not_max.not.not.i.7.i = icmp eq i64 %qalloc.i.7.i, -1 br i1 %not_max.not.not.i.7.i, label %cond_213_case_0.i.i, label %__hugr__.__tk2_qalloc.218.exit.7.i -__hugr__.__tk2_qalloc.218.exit.7.i: ; preds = %__barray_mask_return.exit.6.i +__hugr__.__tk2_qalloc.218.exit.7.i: ; preds = %cond_exit_20.6.i tail call void @___reset(i64 %qalloc.i.7.i) %30 = load i64, ptr %2, align 4 %31 = and i64 %30, 128 - %.not109.i = icmp eq i64 %31, 0 - br i1 %.not109.i, label %panic.i.i, label %__barray_mask_return.exit.7.i + %.not111.i = icmp eq i64 %31, 0 + br i1 %.not111.i, label %panic.i.i, label %cond_exit_20.7.i -__barray_mask_return.exit.7.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.7.i +cond_exit_20.7.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.7.i %32 = and i64 %30, -129 store i64 %32, ptr %2, align 4 %33 = getelementptr inbounds nuw i8, ptr %1, i64 56 @@ -165,14 +165,14 @@ __barray_mask_return.exit.7.i: ; preds = %__hugr__.__tk2_qall %not_max.not.not.i.8.i = icmp eq i64 %qalloc.i.8.i, -1 br i1 %not_max.not.not.i.8.i, label %cond_213_case_0.i.i, label %__hugr__.__tk2_qalloc.218.exit.8.i -__hugr__.__tk2_qalloc.218.exit.8.i: ; preds = %__barray_mask_return.exit.7.i +__hugr__.__tk2_qalloc.218.exit.8.i: ; preds = %cond_exit_20.7.i tail call void @___reset(i64 %qalloc.i.8.i) %34 = load i64, ptr %2, align 4 %35 = and i64 %34, 256 - %.not110.i = icmp eq i64 %35, 0 - br i1 %.not110.i, label %panic.i.i, label %__barray_mask_return.exit.8.i + %.not112.i = icmp eq i64 %35, 0 + br i1 %.not112.i, label %panic.i.i, label %cond_exit_20.8.i -__barray_mask_return.exit.8.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.8.i +cond_exit_20.8.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.8.i %36 = and i64 %34, -257 store i64 %36, ptr %2, align 4 %37 = getelementptr inbounds nuw i8, ptr %1, i64 64 @@ -181,14 +181,14 @@ __barray_mask_return.exit.8.i: ; preds = %__hugr__.__tk2_qall %not_max.not.not.i.9.i = icmp eq i64 %qalloc.i.9.i, -1 br i1 %not_max.not.not.i.9.i, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.9.i -__barray_check_bounds.exit.9.i: ; preds = %__barray_mask_return.exit.8.i +__barray_check_bounds.exit.9.i: ; preds = %cond_exit_20.8.i tail call void @___reset(i64 %qalloc.i.9.i) %38 = load i64, ptr %2, align 4 %39 = and i64 %38, 512 - %.not111.i = icmp eq i64 %39, 0 - br i1 %.not111.i, label %panic.i.i, label %__barray_mask_return.exit.9.i + %.not113.i = icmp eq i64 %39, 0 + br i1 %.not113.i, label %panic.i.i, label %cond_exit_20.9.i -__barray_mask_return.exit.9.i: ; preds = %__barray_check_bounds.exit.9.i +cond_exit_20.9.i: ; preds = %__barray_check_bounds.exit.9.i %40 = and i64 %38, -513 store i64 %40, ptr %2, align 4 %41 = getelementptr inbounds nuw i8, ptr %1, i64 72 @@ -240,15 +240,15 @@ mask_block_err.i.i.i.i: ; preds = %mask_block_ok.i.i.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit.i.i.i: ; preds = %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i", %__barray_mask_return.exit.9.i - %.fca.2.extract82.i172.i.i = phi i64 [ 0, %__barray_mask_return.exit.9.i ], [ %.fca.1.0.0.2.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %.fca.1.extract81.i171.i.i = phi ptr [ %2, %__barray_mask_return.exit.9.i ], [ %.fca.1.0.0.1.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %.fca.0.extract80.i170.i.i = phi ptr [ %1, %__barray_mask_return.exit.9.i ], [ %.fca.1.0.0.0.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %"294_0.0169.i.i" = phi i64 [ 0, %__barray_mask_return.exit.9.i ], [ %72, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %.pn168.i.i = phi { { ptr, ptr, i64 }, i64 } [ %42, %__barray_mask_return.exit.9.i ], [ %80, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %65 = add i64 %"294_0.0169.i.i", %.fca.2.extract82.i172.i.i +__barray_check_bounds.exit.i.i.i: ; preds = %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i", %cond_exit_20.9.i + %.fca.2.extract82.i185.i.i = phi i64 [ 0, %cond_exit_20.9.i ], [ %.fca.1.0.0.2.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] + %.fca.1.extract81.i184.i.i = phi ptr [ %2, %cond_exit_20.9.i ], [ %.fca.1.0.0.1.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] + %.fca.0.extract80.i183.i.i = phi ptr [ %1, %cond_exit_20.9.i ], [ %.fca.1.0.0.0.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] + %"294_0.0182.i.i" = phi i64 [ 0, %cond_exit_20.9.i ], [ %72, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] + %.pn181.i.i = phi { { ptr, ptr, i64 }, i64 } [ %42, %cond_exit_20.9.i ], [ %80, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] + %65 = add i64 %"294_0.0182.i.i", %.fca.2.extract82.i185.i.i %66 = lshr i64 %65, 6 - %67 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i171.i.i, i64 %66 + %67 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i184.i.i, i64 %66 %68 = load i64, ptr %67, align 4 %69 = and i64 %65, 63 %70 = lshr i64 %68, %69 @@ -260,21 +260,21 @@ panic.i.i.i.i: ; preds = %__barray_check_boun unreachable "__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i": ; preds = %__barray_check_bounds.exit.i.i.i - %72 = add nuw nsw i64 %"294_0.0169.i.i", 1 + %72 = add nuw nsw i64 %"294_0.0182.i.i", 1 %73 = shl nuw i64 1, %69 %74 = xor i64 %73, %68 store i64 %74, ptr %67, align 4 - %75 = getelementptr inbounds i64, ptr %.fca.0.extract80.i170.i.i, i64 %65 + %75 = getelementptr inbounds i64, ptr %.fca.0.extract80.i183.i.i, i64 %65 %76 = load i64, ptr %75, align 4 - %.fca.1.0.0.0.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn168.i.i, 0, 0 - %.fca.1.0.0.1.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn168.i.i, 0, 1 - %.fca.1.0.0.2.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn168.i.i, 0, 2 - %77 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn168.i.i, i64 %72, 1 + %.fca.1.0.0.0.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 0 + %.fca.1.0.0.1.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 1 + %.fca.1.0.0.2.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 2 + %77 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, i64 %72, 1 %78 = insertvalue { { ptr, ptr, i64 }, i64 } %77, ptr %.fca.1.0.0.0.extract.i.i.i, 0, 0 %79 = insertvalue { { ptr, ptr, i64 }, i64 } %78, ptr %.fca.1.0.0.1.extract.i.i.i, 0, 1 %80 = insertvalue { { ptr, ptr, i64 }, i64 } %79, i64 %.fca.1.0.0.2.extract.i.i.i, 0, 2 tail call void @___qfree(i64 %76) - %.not.i.i = icmp eq i64 %"294_0.0169.i.i", 9 + %.not.i.i = icmp eq i64 %"294_0.0182.i.i", 9 br i1 %.not.i.i, label %43, label %__barray_check_bounds.exit.i.i.i __hugr__.main.1.exit: ; preds = %61, %43 diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-measure_qb_array/measure_qb_array_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-measure_qb_array/measure_qb_array_aarch64-apple-darwin index b911a5f86..2d34acc98 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-measure_qb_array/measure_qb_array_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-measure_qb_array/measure_qb_array_aarch64-apple-darwin @@ -37,7 +37,7 @@ entry: %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 br i1 %not_max.not.not.i.i, label %cond_207_case_0.i.i, label %__hugr__.__tk2_qalloc.210.exit.i -cond_207_case_0.i.i: ; preds = %__barray_mask_return.exit.8.i, %__barray_mask_return.exit.7.i, %__barray_mask_return.exit.6.i, %__barray_mask_return.exit.5.i, %__barray_mask_return.exit.4.i, %__barray_mask_return.exit.3.i, %__barray_mask_return.exit.2.i, %__barray_mask_return.exit.1.i, %__barray_mask_return.exit.i, %entry +cond_207_case_0.i.i: ; preds = %cond_exit_20.8.i, %cond_exit_20.7.i, %cond_exit_20.6.i, %cond_exit_20.5.i, %cond_exit_20.4.i, %cond_exit_20.3.i, %cond_exit_20.2.i, %cond_exit_20.1.i, %cond_exit_20.i, %entry tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable @@ -45,13 +45,13 @@ __hugr__.__tk2_qalloc.210.exit.i: ; preds = %entry tail call void @___reset(i64 %qalloc.i.i) %3 = load i64, ptr %2, align 4 %4 = trunc i64 %3 to i1 - br i1 %4, label %__barray_mask_return.exit.i, label %panic.i.i + br i1 %4, label %cond_exit_20.i, label %panic.i.i panic.i.i: ; preds = %__barray_check_bounds.exit.9.i, %__hugr__.__tk2_qalloc.210.exit.8.i, %__hugr__.__tk2_qalloc.210.exit.7.i, %__hugr__.__tk2_qalloc.210.exit.6.i, %__hugr__.__tk2_qalloc.210.exit.5.i, %__hugr__.__tk2_qalloc.210.exit.4.i, %__hugr__.__tk2_qalloc.210.exit.3.i, %__hugr__.__tk2_qalloc.210.exit.2.i, %__hugr__.__tk2_qalloc.210.exit.1.i, %__hugr__.__tk2_qalloc.210.exit.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.i +cond_exit_20.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.i %5 = and i64 %3, -2 store i64 %5, ptr %2, align 4 store i64 %qalloc.i.i, ptr %1, align 4 @@ -59,14 +59,14 @@ __barray_mask_return.exit.i: ; preds = %__hugr__.__tk2_qall %not_max.not.not.i.1.i = icmp eq i64 %qalloc.i.1.i, -1 br i1 %not_max.not.not.i.1.i, label %cond_207_case_0.i.i, label %__hugr__.__tk2_qalloc.210.exit.1.i -__hugr__.__tk2_qalloc.210.exit.1.i: ; preds = %__barray_mask_return.exit.i +__hugr__.__tk2_qalloc.210.exit.1.i: ; preds = %cond_exit_20.i tail call void @___reset(i64 %qalloc.i.1.i) %6 = load i64, ptr %2, align 4 %7 = and i64 %6, 2 - %.not277.i = icmp eq i64 %7, 0 - br i1 %.not277.i, label %panic.i.i, label %__barray_mask_return.exit.1.i + %.not280.i = icmp eq i64 %7, 0 + br i1 %.not280.i, label %panic.i.i, label %cond_exit_20.1.i -__barray_mask_return.exit.1.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.1.i +cond_exit_20.1.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.1.i %8 = and i64 %6, -3 store i64 %8, ptr %2, align 4 %9 = getelementptr inbounds nuw i8, ptr %1, i64 8 @@ -75,14 +75,14 @@ __barray_mask_return.exit.1.i: ; preds = %__hugr__.__tk2_qall %not_max.not.not.i.2.i = icmp eq i64 %qalloc.i.2.i, -1 br i1 %not_max.not.not.i.2.i, label %cond_207_case_0.i.i, label %__hugr__.__tk2_qalloc.210.exit.2.i -__hugr__.__tk2_qalloc.210.exit.2.i: ; preds = %__barray_mask_return.exit.1.i +__hugr__.__tk2_qalloc.210.exit.2.i: ; preds = %cond_exit_20.1.i tail call void @___reset(i64 %qalloc.i.2.i) %10 = load i64, ptr %2, align 4 %11 = and i64 %10, 4 - %.not278.i = icmp eq i64 %11, 0 - br i1 %.not278.i, label %panic.i.i, label %__barray_mask_return.exit.2.i + %.not281.i = icmp eq i64 %11, 0 + br i1 %.not281.i, label %panic.i.i, label %cond_exit_20.2.i -__barray_mask_return.exit.2.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.2.i +cond_exit_20.2.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.2.i %12 = and i64 %10, -5 store i64 %12, ptr %2, align 4 %13 = getelementptr inbounds nuw i8, ptr %1, i64 16 @@ -91,14 +91,14 @@ __barray_mask_return.exit.2.i: ; preds = %__hugr__.__tk2_qall %not_max.not.not.i.3.i = icmp eq i64 %qalloc.i.3.i, -1 br i1 %not_max.not.not.i.3.i, label %cond_207_case_0.i.i, label %__hugr__.__tk2_qalloc.210.exit.3.i -__hugr__.__tk2_qalloc.210.exit.3.i: ; preds = %__barray_mask_return.exit.2.i +__hugr__.__tk2_qalloc.210.exit.3.i: ; preds = %cond_exit_20.2.i tail call void @___reset(i64 %qalloc.i.3.i) %14 = load i64, ptr %2, align 4 %15 = and i64 %14, 8 - %.not279.i = icmp eq i64 %15, 0 - br i1 %.not279.i, label %panic.i.i, label %__barray_mask_return.exit.3.i + %.not282.i = icmp eq i64 %15, 0 + br i1 %.not282.i, label %panic.i.i, label %cond_exit_20.3.i -__barray_mask_return.exit.3.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.3.i +cond_exit_20.3.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.3.i %16 = and i64 %14, -9 store i64 %16, ptr %2, align 4 %17 = getelementptr inbounds nuw i8, ptr %1, i64 24 @@ -107,14 +107,14 @@ __barray_mask_return.exit.3.i: ; preds = %__hugr__.__tk2_qall %not_max.not.not.i.4.i = icmp eq i64 %qalloc.i.4.i, -1 br i1 %not_max.not.not.i.4.i, label %cond_207_case_0.i.i, label %__hugr__.__tk2_qalloc.210.exit.4.i -__hugr__.__tk2_qalloc.210.exit.4.i: ; preds = %__barray_mask_return.exit.3.i +__hugr__.__tk2_qalloc.210.exit.4.i: ; preds = %cond_exit_20.3.i tail call void @___reset(i64 %qalloc.i.4.i) %18 = load i64, ptr %2, align 4 %19 = and i64 %18, 16 - %.not280.i = icmp eq i64 %19, 0 - br i1 %.not280.i, label %panic.i.i, label %__barray_mask_return.exit.4.i + %.not283.i = icmp eq i64 %19, 0 + br i1 %.not283.i, label %panic.i.i, label %cond_exit_20.4.i -__barray_mask_return.exit.4.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.4.i +cond_exit_20.4.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.4.i %20 = and i64 %18, -17 store i64 %20, ptr %2, align 4 %21 = getelementptr inbounds nuw i8, ptr %1, i64 32 @@ -123,14 +123,14 @@ __barray_mask_return.exit.4.i: ; preds = %__hugr__.__tk2_qall %not_max.not.not.i.5.i = icmp eq i64 %qalloc.i.5.i, -1 br i1 %not_max.not.not.i.5.i, label %cond_207_case_0.i.i, label %__hugr__.__tk2_qalloc.210.exit.5.i -__hugr__.__tk2_qalloc.210.exit.5.i: ; preds = %__barray_mask_return.exit.4.i +__hugr__.__tk2_qalloc.210.exit.5.i: ; preds = %cond_exit_20.4.i tail call void @___reset(i64 %qalloc.i.5.i) %22 = load i64, ptr %2, align 4 %23 = and i64 %22, 32 - %.not281.i = icmp eq i64 %23, 0 - br i1 %.not281.i, label %panic.i.i, label %__barray_mask_return.exit.5.i + %.not284.i = icmp eq i64 %23, 0 + br i1 %.not284.i, label %panic.i.i, label %cond_exit_20.5.i -__barray_mask_return.exit.5.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.5.i +cond_exit_20.5.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.5.i %24 = and i64 %22, -33 store i64 %24, ptr %2, align 4 %25 = getelementptr inbounds nuw i8, ptr %1, i64 40 @@ -139,14 +139,14 @@ __barray_mask_return.exit.5.i: ; preds = %__hugr__.__tk2_qall %not_max.not.not.i.6.i = icmp eq i64 %qalloc.i.6.i, -1 br i1 %not_max.not.not.i.6.i, label %cond_207_case_0.i.i, label %__hugr__.__tk2_qalloc.210.exit.6.i -__hugr__.__tk2_qalloc.210.exit.6.i: ; preds = %__barray_mask_return.exit.5.i +__hugr__.__tk2_qalloc.210.exit.6.i: ; preds = %cond_exit_20.5.i tail call void @___reset(i64 %qalloc.i.6.i) %26 = load i64, ptr %2, align 4 %27 = and i64 %26, 64 - %.not282.i = icmp eq i64 %27, 0 - br i1 %.not282.i, label %panic.i.i, label %__barray_mask_return.exit.6.i + %.not285.i = icmp eq i64 %27, 0 + br i1 %.not285.i, label %panic.i.i, label %cond_exit_20.6.i -__barray_mask_return.exit.6.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.6.i +cond_exit_20.6.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.6.i %28 = and i64 %26, -65 store i64 %28, ptr %2, align 4 %29 = getelementptr inbounds nuw i8, ptr %1, i64 48 @@ -155,14 +155,14 @@ __barray_mask_return.exit.6.i: ; preds = %__hugr__.__tk2_qall %not_max.not.not.i.7.i = icmp eq i64 %qalloc.i.7.i, -1 br i1 %not_max.not.not.i.7.i, label %cond_207_case_0.i.i, label %__hugr__.__tk2_qalloc.210.exit.7.i -__hugr__.__tk2_qalloc.210.exit.7.i: ; preds = %__barray_mask_return.exit.6.i +__hugr__.__tk2_qalloc.210.exit.7.i: ; preds = %cond_exit_20.6.i tail call void @___reset(i64 %qalloc.i.7.i) %30 = load i64, ptr %2, align 4 %31 = and i64 %30, 128 - %.not283.i = icmp eq i64 %31, 0 - br i1 %.not283.i, label %panic.i.i, label %__barray_mask_return.exit.7.i + %.not286.i = icmp eq i64 %31, 0 + br i1 %.not286.i, label %panic.i.i, label %cond_exit_20.7.i -__barray_mask_return.exit.7.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.7.i +cond_exit_20.7.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.7.i %32 = and i64 %30, -129 store i64 %32, ptr %2, align 4 %33 = getelementptr inbounds nuw i8, ptr %1, i64 56 @@ -171,14 +171,14 @@ __barray_mask_return.exit.7.i: ; preds = %__hugr__.__tk2_qall %not_max.not.not.i.8.i = icmp eq i64 %qalloc.i.8.i, -1 br i1 %not_max.not.not.i.8.i, label %cond_207_case_0.i.i, label %__hugr__.__tk2_qalloc.210.exit.8.i -__hugr__.__tk2_qalloc.210.exit.8.i: ; preds = %__barray_mask_return.exit.7.i +__hugr__.__tk2_qalloc.210.exit.8.i: ; preds = %cond_exit_20.7.i tail call void @___reset(i64 %qalloc.i.8.i) %34 = load i64, ptr %2, align 4 %35 = and i64 %34, 256 - %.not284.i = icmp eq i64 %35, 0 - br i1 %.not284.i, label %panic.i.i, label %__barray_mask_return.exit.8.i + %.not287.i = icmp eq i64 %35, 0 + br i1 %.not287.i, label %panic.i.i, label %cond_exit_20.8.i -__barray_mask_return.exit.8.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.8.i +cond_exit_20.8.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.8.i %36 = and i64 %34, -257 store i64 %36, ptr %2, align 4 %37 = getelementptr inbounds nuw i8, ptr %1, i64 64 @@ -187,14 +187,14 @@ __barray_mask_return.exit.8.i: ; preds = %__hugr__.__tk2_qall %not_max.not.not.i.9.i = icmp eq i64 %qalloc.i.9.i, -1 br i1 %not_max.not.not.i.9.i, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.9.i -__barray_check_bounds.exit.9.i: ; preds = %__barray_mask_return.exit.8.i +__barray_check_bounds.exit.9.i: ; preds = %cond_exit_20.8.i tail call void @___reset(i64 %qalloc.i.9.i) %38 = load i64, ptr %2, align 4 %39 = and i64 %38, 512 - %.not285.i = icmp eq i64 %39, 0 - br i1 %.not285.i, label %panic.i.i, label %__barray_mask_return.exit.9.i + %.not288.i = icmp eq i64 %39, 0 + br i1 %.not288.i, label %panic.i.i, label %cond_exit_20.9.i -__barray_mask_return.exit.9.i: ; preds = %__barray_check_bounds.exit.9.i +cond_exit_20.9.i: ; preds = %__barray_check_bounds.exit.9.i %40 = and i64 %38, -513 store i64 %40, ptr %2, align 4 %41 = getelementptr inbounds nuw i8, ptr %1, i64 72 @@ -206,11 +206,11 @@ __barray_mask_return.exit.9.i: ; preds = %__barray_check_boun %43 = trunc i64 %42 to i1 br i1 %43, label %panic.i238.i, label %__barray_mask_borrow.exit.i -panic.i238.i: ; preds = %__barray_mask_return.exit.9.i +panic.i238.i: ; preds = %cond_exit_20.9.i tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_mask_borrow.exit.i: ; preds = %__barray_mask_return.exit.9.i +__barray_mask_borrow.exit.i: ; preds = %cond_exit_20.9.i %44 = or disjoint i64 %42, 1 store i64 %44, ptr %2, align 4 %45 = load i64, ptr %1, align 4 @@ -243,8 +243,8 @@ __barray_mask_borrow.exit242.i: ; preds = %__barray_mask_retur tail call void @___rxy(i64 %52, double 0x400921FB54442D18, double 0.000000e+00) %53 = load i64, ptr %2, align 4 %54 = and i64 %53, 4 - %.not265.i = icmp eq i64 %54, 0 - br i1 %.not265.i, label %panic.i243.i, label %__barray_mask_return.exit244.i + %.not268.i = icmp eq i64 %54, 0 + br i1 %.not268.i, label %panic.i243.i, label %__barray_mask_return.exit244.i panic.i243.i: ; preds = %__barray_mask_borrow.exit242.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") @@ -256,8 +256,8 @@ __barray_mask_return.exit244.i: ; preds = %__barray_mask_borro store i64 %52, ptr %13, align 4 %56 = load i64, ptr %2, align 4 %57 = and i64 %56, 8 - %.not266.i = icmp eq i64 %57, 0 - br i1 %.not266.i, label %__barray_mask_borrow.exit246.i, label %panic.i245.i + %.not269.i = icmp eq i64 %57, 0 + br i1 %.not269.i, label %__barray_mask_borrow.exit246.i, label %panic.i245.i panic.i245.i: ; preds = %__barray_mask_return.exit244.i tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") @@ -270,8 +270,8 @@ __barray_mask_borrow.exit246.i: ; preds = %__barray_mask_retur tail call void @___rxy(i64 %59, double 0x400921FB54442D18, double 0.000000e+00) %60 = load i64, ptr %2, align 4 %61 = and i64 %60, 8 - %.not267.i = icmp eq i64 %61, 0 - br i1 %.not267.i, label %panic.i247.i, label %__barray_mask_return.exit248.i + %.not270.i = icmp eq i64 %61, 0 + br i1 %.not270.i, label %panic.i247.i, label %__barray_mask_return.exit248.i panic.i247.i: ; preds = %__barray_mask_borrow.exit246.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") @@ -283,8 +283,8 @@ __barray_mask_return.exit248.i: ; preds = %__barray_mask_borro store i64 %59, ptr %17, align 4 %63 = load i64, ptr %2, align 4 %64 = and i64 %63, 512 - %.not268.i = icmp eq i64 %64, 0 - br i1 %.not268.i, label %__barray_mask_borrow.exit250.i, label %panic.i249.i + %.not271.i = icmp eq i64 %64, 0 + br i1 %.not271.i, label %__barray_mask_borrow.exit250.i, label %panic.i249.i panic.i249.i: ; preds = %__barray_mask_return.exit248.i tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") @@ -297,8 +297,8 @@ __barray_mask_borrow.exit250.i: ; preds = %__barray_mask_retur tail call void @___rxy(i64 %66, double 0x400921FB54442D18, double 0.000000e+00) %67 = load i64, ptr %2, align 4 %68 = and i64 %67, 512 - %.not269.i = icmp eq i64 %68, 0 - br i1 %.not269.i, label %panic.i251.i, label %__barray_mask_return.exit252.i + %.not272.i = icmp eq i64 %68, 0 + br i1 %.not272.i, label %panic.i251.i, label %__barray_mask_return.exit252.i panic.i251.i: ; preds = %__barray_mask_borrow.exit250.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") @@ -314,7 +314,7 @@ __barray_mask_return.exit252.i: ; preds = %__barray_mask_borro store i64 -1, ptr %72, align 1 br label %__barray_check_bounds.exit.i.i.i -73: ; preds = %__barray_mask_return.exit.i.i +73: ; preds = %loop_body.i.i %74 = lshr i64 %.fca.2.extract82.i.i.i, 6 %75 = getelementptr i64, ptr %.fca.1.extract81.i.i.i, i64 %74 %76 = load i64, ptr %75, align 4 @@ -355,17 +355,16 @@ mask_block_err.i.i.i.i: ; preds = %mask_block_ok.i.i.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit.i.i.i: ; preds = %__barray_mask_return.exit.i.i, %__barray_mask_return.exit252.i - %.fca.2.extract82.i175.i.i = phi i64 [ 0, %__barray_mask_return.exit252.i ], [ %.fca.2.extract82.i.i.i, %__barray_mask_return.exit.i.i ] - %.fca.1.extract81.i174.i.i = phi ptr [ %2, %__barray_mask_return.exit252.i ], [ %.fca.1.extract81.i.i.i, %__barray_mask_return.exit.i.i ] - %.fca.0.extract80.i173.i.i = phi ptr [ %1, %__barray_mask_return.exit252.i ], [ %.fca.0.extract80.i.i.i, %__barray_mask_return.exit.i.i ] - %"306_0.sroa.15.0172.i.i" = phi i64 [ 0, %__barray_mask_return.exit252.i ], [ %95, %__barray_mask_return.exit.i.i ] - %.pn.i.i = phi { { ptr, ptr, i64 }, i64 } [ %70, %__barray_mask_return.exit252.i ], [ %.pn171.i.i, %__barray_mask_return.exit.i.i ] - %.pn171.i.i = insertvalue { { ptr, ptr, i64 }, i64 } %.pn.i.i, i64 %"306_0.sroa.15.0172.i.i", 1 - %95 = add nuw nsw i64 %"306_0.sroa.15.0172.i.i", 1 - %96 = add i64 %"306_0.sroa.15.0172.i.i", %.fca.2.extract82.i175.i.i +__barray_check_bounds.exit.i.i.i: ; preds = %loop_body.i.i, %__barray_mask_return.exit252.i + %.fca.2.extract82.i187.i.i = phi i64 [ 0, %__barray_mask_return.exit252.i ], [ %.fca.2.extract82.i.i.i, %loop_body.i.i ] + %.fca.1.extract81.i186.i.i = phi ptr [ %2, %__barray_mask_return.exit252.i ], [ %.fca.1.extract81.i.i.i, %loop_body.i.i ] + %.fca.0.extract80.i185.i.i = phi ptr [ %1, %__barray_mask_return.exit252.i ], [ %.fca.0.extract80.i.i.i, %loop_body.i.i ] + %"306_0.sroa.15.0184.i.i" = phi i64 [ 0, %__barray_mask_return.exit252.i ], [ %95, %loop_body.i.i ] + %.pn165183.i.i = phi { { ptr, ptr, i64 }, i64 } [ %70, %__barray_mask_return.exit252.i ], [ %110, %loop_body.i.i ] + %95 = add nuw nsw i64 %"306_0.sroa.15.0184.i.i", 1 + %96 = add i64 %"306_0.sroa.15.0184.i.i", %.fca.2.extract82.i187.i.i %97 = lshr i64 %96, 6 - %98 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i174.i.i, i64 %97 + %98 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i186.i.i, i64 %97 %99 = load i64, ptr %98, align 4 %100 = and i64 %96, 63 %101 = lshr i64 %99, %100 @@ -380,81 +379,82 @@ __barray_check_bounds.exit.i.i: ; preds = %__barray_check_boun %103 = shl nuw i64 1, %100 %104 = xor i64 %103, %99 store i64 %104, ptr %98, align 4 - %105 = getelementptr inbounds i64, ptr %.fca.0.extract80.i173.i.i, i64 %96 + %105 = getelementptr inbounds i64, ptr %.fca.0.extract80.i185.i.i, i64 %96 %106 = load i64, ptr %105, align 4 %lazy_measure.i.i = tail call i64 @___lazy_measure(i64 %106) tail call void @___qfree(i64 %106) %107 = load i64, ptr %72, align 4 - %108 = lshr i64 %107, %"306_0.sroa.15.0172.i.i" + %108 = lshr i64 %107, %"306_0.sroa.15.0184.i.i" %109 = trunc i64 %108 to i1 - br i1 %109, label %__barray_mask_return.exit.i.i, label %panic.i.i.i + br i1 %109, label %loop_body.i.i, label %panic.i.i.i panic.i.i.i: ; preds = %__barray_check_bounds.exit.i.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit.i.i: ; preds = %__barray_check_bounds.exit.i.i +loop_body.i.i: ; preds = %__barray_check_bounds.exit.i.i %"371_054.fca.1.insert.i.i" = insertvalue { i1, i64, i1 } { i1 true, i64 poison, i1 undef }, i64 %lazy_measure.i.i, 1 %"371_054.fca.2.insert.i.i" = insertvalue { i1, i64, i1 } %"371_054.fca.1.insert.i.i", i1 undef, 2 - %110 = shl nuw nsw i64 1, %"306_0.sroa.15.0172.i.i" - %111 = xor i64 %107, %110 - store i64 %111, ptr %72, align 4 - %112 = getelementptr inbounds nuw { i1, i64, i1 }, ptr %71, i64 %"306_0.sroa.15.0172.i.i" - store { i1, i64, i1 } %"371_054.fca.2.insert.i.i", ptr %112, align 4 - %113 = extractvalue { { ptr, ptr, i64 }, i64 } %.pn.i.i, 0 - %.fca.0.extract80.i.i.i = extractvalue { ptr, ptr, i64 } %113, 0 - %.fca.1.extract81.i.i.i = extractvalue { ptr, ptr, i64 } %113, 1 - %.fca.2.extract82.i.i.i = extractvalue { ptr, ptr, i64 } %113, 2 - %.not.i.i = icmp eq i64 %"306_0.sroa.15.0172.i.i", 9 - br i1 %.not.i.i, label %73, label %__barray_check_bounds.exit.i.i.i + %110 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn165183.i.i, i64 %95, 1 + %111 = shl nuw nsw i64 1, %"306_0.sroa.15.0184.i.i" + %112 = xor i64 %107, %111 + store i64 %112, ptr %72, align 4 + %113 = getelementptr inbounds nuw { i1, i64, i1 }, ptr %71, i64 %"306_0.sroa.15.0184.i.i" + store { i1, i64, i1 } %"371_054.fca.2.insert.i.i", ptr %113, align 4 + %114 = extractvalue { { ptr, ptr, i64 }, i64 } %.pn165183.i.i, 0 + %.fca.0.extract80.i.i.i = extractvalue { ptr, ptr, i64 } %114, 0 + %.fca.1.extract81.i.i.i = extractvalue { ptr, ptr, i64 } %114, 1 + %.fca.2.extract82.i.i.i = extractvalue { ptr, ptr, i64 } %114, 2 + %exitcond.not.i.i = icmp eq i64 %95, 10 + br i1 %exitcond.not.i.i, label %73, label %__barray_check_bounds.exit.i.i.i "__hugr__.$measure_array$$n(10).280.exit.i": ; preds = %91, %73 tail call void @heap_free(ptr %.fca.0.extract80.i.i.i) tail call void @heap_free(ptr nonnull %.fca.1.extract81.i.i.i) - br label %__barray_check_bounds.exit254.i + br label %__barray_check_bounds.exit255.i cond_89_case_0.i: ; preds = %cond_exit_89.thread.i - %114 = load i64, ptr %72, align 4 - %115 = or i64 %114, -1024 - store i64 %115, ptr %72, align 4 - %116 = icmp eq i64 %115, -1 - br i1 %116, label %__hugr__.main.1.exit, label %mask_block_err.i.i + %115 = load i64, ptr %72, align 4 + %116 = or i64 %115, -1024 + store i64 %116, ptr %72, align 4 + %117 = icmp eq i64 %116, -1 + br i1 %117, label %__hugr__.main.1.exit, label %mask_block_err.i.i mask_block_err.i.i: ; preds = %cond_89_case_0.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit254.i: ; preds = %cond_exit_89.thread.i, %"__hugr__.$measure_array$$n(10).280.exit.i" - %"92_0.0276.i" = phi i64 [ 0, %"__hugr__.$measure_array$$n(10).280.exit.i" ], [ %117, %cond_exit_89.thread.i ] - %117 = add nuw nsw i64 %"92_0.0276.i", 1 - %118 = load i64, ptr %72, align 4 - %119 = lshr i64 %118, %"92_0.0276.i" - %120 = trunc i64 %119 to i1 - br i1 %120, label %cond_exit_89.thread.i, label %__barray_mask_borrow.exit258.i - -__barray_mask_borrow.exit258.i: ; preds = %__barray_check_bounds.exit254.i - %121 = shl nuw nsw i64 1, %"92_0.0276.i" - %122 = xor i64 %118, %121 - store i64 %122, ptr %72, align 4 - %123 = getelementptr inbounds nuw { i1, i64, i1 }, ptr %71, i64 %"92_0.0276.i" - %124 = load { i1, i64, i1 }, ptr %123, align 4 - %.fca.0.extract167.i = extractvalue { i1, i64, i1 } %124, 0 +__barray_check_bounds.exit255.i: ; preds = %cond_exit_89.thread.i, %"__hugr__.$measure_array$$n(10).280.exit.i" + %"92_0.0279.i" = phi i64 [ 0, %"__hugr__.$measure_array$$n(10).280.exit.i" ], [ %118, %cond_exit_89.thread.i ] + %118 = add nuw nsw i64 %"92_0.0279.i", 1 + %119 = load i64, ptr %72, align 4 + %120 = lshr i64 %119, %"92_0.0279.i" + %121 = trunc i64 %120 to i1 + br i1 %121, label %cond_exit_89.thread.i, label %__barray_mask_borrow.exit259.i + +__barray_mask_borrow.exit259.i: ; preds = %__barray_check_bounds.exit255.i + %122 = shl nuw nsw i64 1, %"92_0.0279.i" + %123 = xor i64 %119, %122 + store i64 %123, ptr %72, align 4 + %124 = getelementptr inbounds nuw { i1, i64, i1 }, ptr %71, i64 %"92_0.0279.i" + %125 = load { i1, i64, i1 }, ptr %124, align 4 + %.fca.0.extract167.i = extractvalue { i1, i64, i1 } %125, 0 br i1 %.fca.0.extract167.i, label %cond_392_case_1.i, label %cond_exit_89.thread.i -cond_exit_89.thread.i: ; preds = %cond_392_case_1.i, %__barray_mask_borrow.exit258.i, %__barray_check_bounds.exit254.i - %exitcond.i = icmp eq i64 %117, 10 - br i1 %exitcond.i, label %cond_89_case_0.i, label %__barray_check_bounds.exit254.i +cond_exit_89.thread.i: ; preds = %cond_392_case_1.i, %__barray_mask_borrow.exit259.i, %__barray_check_bounds.exit255.i + %exitcond.i = icmp eq i64 %118, 10 + br i1 %exitcond.i, label %cond_89_case_0.i, label %__barray_check_bounds.exit255.i -cond_392_case_1.i: ; preds = %__barray_mask_borrow.exit258.i - %.fca.1.extract.i = extractvalue { i1, i64, i1 } %124, 1 +cond_392_case_1.i: ; preds = %__barray_mask_borrow.exit259.i + %.fca.1.extract.i = extractvalue { i1, i64, i1 } %125, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.i) br label %cond_exit_89.thread.i __hugr__.main.1.exit: ; preds = %cond_89_case_0.i tail call void @heap_free(ptr %71) tail call void @heap_free(ptr nonnull %72) - %125 = tail call i64 @teardown() - ret i64 %125 + %126 = tail call i64 @teardown() + ret i64 %126 } declare void @setup(i64) local_unnamed_addr diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-discard_qb_array/discard_qb_array_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-discard_qb_array/discard_qb_array_x86_64-apple-darwin index ba6b2c7e5..87a59b320 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-discard_qb_array/discard_qb_array_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-discard_qb_array/discard_qb_array_x86_64-apple-darwin @@ -31,7 +31,7 @@ entry: %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 br i1 %not_max.not.not.i.i, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i -cond_213_case_0.i.i: ; preds = %__barray_mask_return.exit.i.8, %__barray_mask_return.exit.i.7, %__barray_mask_return.exit.i.6, %__barray_mask_return.exit.i.5, %__barray_mask_return.exit.i.4, %__barray_mask_return.exit.i.3, %__barray_mask_return.exit.i.2, %__barray_mask_return.exit.i.1, %__barray_mask_return.exit.i, %entry +cond_213_case_0.i.i: ; preds = %cond_exit_20.i.8, %cond_exit_20.i.7, %cond_exit_20.i.6, %cond_exit_20.i.5, %cond_exit_20.i.4, %cond_exit_20.i.3, %cond_exit_20.i.2, %cond_exit_20.i.1, %cond_exit_20.i, %entry tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable @@ -39,13 +39,13 @@ __barray_check_bounds.exit.i: ; preds = %entry tail call void @___reset(i64 %qalloc.i.i) %3 = load i64, ptr %2, align 4 %4 = trunc i64 %3 to i1 - br i1 %4, label %__barray_mask_return.exit.i, label %panic.i.i + br i1 %4, label %cond_exit_20.i, label %panic.i.i panic.i.i: ; preds = %__barray_check_bounds.exit.i.9, %__barray_check_bounds.exit.i.8, %__barray_check_bounds.exit.i.7, %__barray_check_bounds.exit.i.6, %__barray_check_bounds.exit.i.5, %__barray_check_bounds.exit.i.4, %__barray_check_bounds.exit.i.3, %__barray_check_bounds.exit.i.2, %__barray_check_bounds.exit.i.1, %__barray_check_bounds.exit.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit.i: ; preds = %__barray_check_bounds.exit.i +cond_exit_20.i: ; preds = %__barray_check_bounds.exit.i %5 = and i64 %3, -2 store i64 %5, ptr %2, align 4 store i64 %qalloc.i.i, ptr %1, align 4 @@ -53,14 +53,14 @@ __barray_mask_return.exit.i: ; preds = %__barray_check_boun %not_max.not.not.i.i.1 = icmp eq i64 %qalloc.i.i.1, -1 br i1 %not_max.not.not.i.i.1, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.1 -__barray_check_bounds.exit.i.1: ; preds = %__barray_mask_return.exit.i +__barray_check_bounds.exit.i.1: ; preds = %cond_exit_20.i tail call void @___reset(i64 %qalloc.i.i.1) %6 = load i64, ptr %2, align 4 %7 = and i64 %6, 2 %.not = icmp eq i64 %7, 0 - br i1 %.not, label %panic.i.i, label %__barray_mask_return.exit.i.1 + br i1 %.not, label %panic.i.i, label %cond_exit_20.i.1 -__barray_mask_return.exit.i.1: ; preds = %__barray_check_bounds.exit.i.1 +cond_exit_20.i.1: ; preds = %__barray_check_bounds.exit.i.1 %8 = and i64 %6, -3 store i64 %8, ptr %2, align 4 %9 = getelementptr inbounds nuw i8, ptr %1, i64 8 @@ -69,14 +69,14 @@ __barray_mask_return.exit.i.1: ; preds = %__barray_check_boun %not_max.not.not.i.i.2 = icmp eq i64 %qalloc.i.i.2, -1 br i1 %not_max.not.not.i.i.2, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.2 -__barray_check_bounds.exit.i.2: ; preds = %__barray_mask_return.exit.i.1 +__barray_check_bounds.exit.i.2: ; preds = %cond_exit_20.i.1 tail call void @___reset(i64 %qalloc.i.i.2) %10 = load i64, ptr %2, align 4 %11 = and i64 %10, 4 %.not1 = icmp eq i64 %11, 0 - br i1 %.not1, label %panic.i.i, label %__barray_mask_return.exit.i.2 + br i1 %.not1, label %panic.i.i, label %cond_exit_20.i.2 -__barray_mask_return.exit.i.2: ; preds = %__barray_check_bounds.exit.i.2 +cond_exit_20.i.2: ; preds = %__barray_check_bounds.exit.i.2 %12 = and i64 %10, -5 store i64 %12, ptr %2, align 4 %13 = getelementptr inbounds nuw i8, ptr %1, i64 16 @@ -85,14 +85,14 @@ __barray_mask_return.exit.i.2: ; preds = %__barray_check_boun %not_max.not.not.i.i.3 = icmp eq i64 %qalloc.i.i.3, -1 br i1 %not_max.not.not.i.i.3, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.3 -__barray_check_bounds.exit.i.3: ; preds = %__barray_mask_return.exit.i.2 +__barray_check_bounds.exit.i.3: ; preds = %cond_exit_20.i.2 tail call void @___reset(i64 %qalloc.i.i.3) %14 = load i64, ptr %2, align 4 %15 = and i64 %14, 8 %.not2 = icmp eq i64 %15, 0 - br i1 %.not2, label %panic.i.i, label %__barray_mask_return.exit.i.3 + br i1 %.not2, label %panic.i.i, label %cond_exit_20.i.3 -__barray_mask_return.exit.i.3: ; preds = %__barray_check_bounds.exit.i.3 +cond_exit_20.i.3: ; preds = %__barray_check_bounds.exit.i.3 %16 = and i64 %14, -9 store i64 %16, ptr %2, align 4 %17 = getelementptr inbounds nuw i8, ptr %1, i64 24 @@ -101,14 +101,14 @@ __barray_mask_return.exit.i.3: ; preds = %__barray_check_boun %not_max.not.not.i.i.4 = icmp eq i64 %qalloc.i.i.4, -1 br i1 %not_max.not.not.i.i.4, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.4 -__barray_check_bounds.exit.i.4: ; preds = %__barray_mask_return.exit.i.3 +__barray_check_bounds.exit.i.4: ; preds = %cond_exit_20.i.3 tail call void @___reset(i64 %qalloc.i.i.4) %18 = load i64, ptr %2, align 4 %19 = and i64 %18, 16 %.not3 = icmp eq i64 %19, 0 - br i1 %.not3, label %panic.i.i, label %__barray_mask_return.exit.i.4 + br i1 %.not3, label %panic.i.i, label %cond_exit_20.i.4 -__barray_mask_return.exit.i.4: ; preds = %__barray_check_bounds.exit.i.4 +cond_exit_20.i.4: ; preds = %__barray_check_bounds.exit.i.4 %20 = and i64 %18, -17 store i64 %20, ptr %2, align 4 %21 = getelementptr inbounds nuw i8, ptr %1, i64 32 @@ -117,14 +117,14 @@ __barray_mask_return.exit.i.4: ; preds = %__barray_check_boun %not_max.not.not.i.i.5 = icmp eq i64 %qalloc.i.i.5, -1 br i1 %not_max.not.not.i.i.5, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.5 -__barray_check_bounds.exit.i.5: ; preds = %__barray_mask_return.exit.i.4 +__barray_check_bounds.exit.i.5: ; preds = %cond_exit_20.i.4 tail call void @___reset(i64 %qalloc.i.i.5) %22 = load i64, ptr %2, align 4 %23 = and i64 %22, 32 %.not4 = icmp eq i64 %23, 0 - br i1 %.not4, label %panic.i.i, label %__barray_mask_return.exit.i.5 + br i1 %.not4, label %panic.i.i, label %cond_exit_20.i.5 -__barray_mask_return.exit.i.5: ; preds = %__barray_check_bounds.exit.i.5 +cond_exit_20.i.5: ; preds = %__barray_check_bounds.exit.i.5 %24 = and i64 %22, -33 store i64 %24, ptr %2, align 4 %25 = getelementptr inbounds nuw i8, ptr %1, i64 40 @@ -133,14 +133,14 @@ __barray_mask_return.exit.i.5: ; preds = %__barray_check_boun %not_max.not.not.i.i.6 = icmp eq i64 %qalloc.i.i.6, -1 br i1 %not_max.not.not.i.i.6, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.6 -__barray_check_bounds.exit.i.6: ; preds = %__barray_mask_return.exit.i.5 +__barray_check_bounds.exit.i.6: ; preds = %cond_exit_20.i.5 tail call void @___reset(i64 %qalloc.i.i.6) %26 = load i64, ptr %2, align 4 %27 = and i64 %26, 64 %.not5 = icmp eq i64 %27, 0 - br i1 %.not5, label %panic.i.i, label %__barray_mask_return.exit.i.6 + br i1 %.not5, label %panic.i.i, label %cond_exit_20.i.6 -__barray_mask_return.exit.i.6: ; preds = %__barray_check_bounds.exit.i.6 +cond_exit_20.i.6: ; preds = %__barray_check_bounds.exit.i.6 %28 = and i64 %26, -65 store i64 %28, ptr %2, align 4 %29 = getelementptr inbounds nuw i8, ptr %1, i64 48 @@ -149,14 +149,14 @@ __barray_mask_return.exit.i.6: ; preds = %__barray_check_boun %not_max.not.not.i.i.7 = icmp eq i64 %qalloc.i.i.7, -1 br i1 %not_max.not.not.i.i.7, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.7 -__barray_check_bounds.exit.i.7: ; preds = %__barray_mask_return.exit.i.6 +__barray_check_bounds.exit.i.7: ; preds = %cond_exit_20.i.6 tail call void @___reset(i64 %qalloc.i.i.7) %30 = load i64, ptr %2, align 4 %31 = and i64 %30, 128 %.not6 = icmp eq i64 %31, 0 - br i1 %.not6, label %panic.i.i, label %__barray_mask_return.exit.i.7 + br i1 %.not6, label %panic.i.i, label %cond_exit_20.i.7 -__barray_mask_return.exit.i.7: ; preds = %__barray_check_bounds.exit.i.7 +cond_exit_20.i.7: ; preds = %__barray_check_bounds.exit.i.7 %32 = and i64 %30, -129 store i64 %32, ptr %2, align 4 %33 = getelementptr inbounds nuw i8, ptr %1, i64 56 @@ -165,14 +165,14 @@ __barray_mask_return.exit.i.7: ; preds = %__barray_check_boun %not_max.not.not.i.i.8 = icmp eq i64 %qalloc.i.i.8, -1 br i1 %not_max.not.not.i.i.8, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.8 -__barray_check_bounds.exit.i.8: ; preds = %__barray_mask_return.exit.i.7 +__barray_check_bounds.exit.i.8: ; preds = %cond_exit_20.i.7 tail call void @___reset(i64 %qalloc.i.i.8) %34 = load i64, ptr %2, align 4 %35 = and i64 %34, 256 %.not7 = icmp eq i64 %35, 0 - br i1 %.not7, label %panic.i.i, label %__barray_mask_return.exit.i.8 + br i1 %.not7, label %panic.i.i, label %cond_exit_20.i.8 -__barray_mask_return.exit.i.8: ; preds = %__barray_check_bounds.exit.i.8 +cond_exit_20.i.8: ; preds = %__barray_check_bounds.exit.i.8 %36 = and i64 %34, -257 store i64 %36, ptr %2, align 4 %37 = getelementptr inbounds nuw i8, ptr %1, i64 64 @@ -181,14 +181,14 @@ __barray_mask_return.exit.i.8: ; preds = %__barray_check_boun %not_max.not.not.i.i.9 = icmp eq i64 %qalloc.i.i.9, -1 br i1 %not_max.not.not.i.i.9, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.9 -__barray_check_bounds.exit.i.9: ; preds = %__barray_mask_return.exit.i.8 +__barray_check_bounds.exit.i.9: ; preds = %cond_exit_20.i.8 tail call void @___reset(i64 %qalloc.i.i.9) %38 = load i64, ptr %2, align 4 %39 = and i64 %38, 512 %.not8 = icmp eq i64 %39, 0 - br i1 %.not8, label %panic.i.i, label %__barray_mask_return.exit.i.9 + br i1 %.not8, label %panic.i.i, label %cond_exit_20.i.9 -__barray_mask_return.exit.i.9: ; preds = %__barray_check_bounds.exit.i.9 +cond_exit_20.i.9: ; preds = %__barray_check_bounds.exit.i.9 %40 = and i64 %38, -513 store i64 %40, ptr %2, align 4 %41 = getelementptr inbounds nuw i8, ptr %1, i64 72 @@ -240,15 +240,15 @@ mask_block_err.i.i.i.i: ; preds = %mask_block_ok.i.i.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit.i.i.i: ; preds = %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i", %__barray_mask_return.exit.i.9 - %.fca.2.extract82.i172.i.i = phi i64 [ 0, %__barray_mask_return.exit.i.9 ], [ %.fca.1.0.0.2.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %.fca.1.extract81.i171.i.i = phi ptr [ %2, %__barray_mask_return.exit.i.9 ], [ %.fca.1.0.0.1.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %.fca.0.extract80.i170.i.i = phi ptr [ %1, %__barray_mask_return.exit.i.9 ], [ %.fca.1.0.0.0.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %"294_0.0169.i.i" = phi i64 [ 0, %__barray_mask_return.exit.i.9 ], [ %72, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %.pn168.i.i = phi { { ptr, ptr, i64 }, i64 } [ %42, %__barray_mask_return.exit.i.9 ], [ %80, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %65 = add i64 %"294_0.0169.i.i", %.fca.2.extract82.i172.i.i +__barray_check_bounds.exit.i.i.i: ; preds = %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i", %cond_exit_20.i.9 + %.fca.2.extract82.i185.i.i = phi i64 [ 0, %cond_exit_20.i.9 ], [ %.fca.1.0.0.2.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] + %.fca.1.extract81.i184.i.i = phi ptr [ %2, %cond_exit_20.i.9 ], [ %.fca.1.0.0.1.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] + %.fca.0.extract80.i183.i.i = phi ptr [ %1, %cond_exit_20.i.9 ], [ %.fca.1.0.0.0.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] + %"294_0.0182.i.i" = phi i64 [ 0, %cond_exit_20.i.9 ], [ %72, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] + %.pn181.i.i = phi { { ptr, ptr, i64 }, i64 } [ %42, %cond_exit_20.i.9 ], [ %80, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] + %65 = add i64 %"294_0.0182.i.i", %.fca.2.extract82.i185.i.i %66 = lshr i64 %65, 6 - %67 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i171.i.i, i64 %66 + %67 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i184.i.i, i64 %66 %68 = load i64, ptr %67, align 4 %69 = and i64 %65, 63 %70 = lshr i64 %68, %69 @@ -260,21 +260,21 @@ panic.i.i.i.i: ; preds = %__barray_check_boun unreachable "__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i": ; preds = %__barray_check_bounds.exit.i.i.i - %72 = add nuw nsw i64 %"294_0.0169.i.i", 1 + %72 = add nuw nsw i64 %"294_0.0182.i.i", 1 %73 = shl nuw i64 1, %69 %74 = xor i64 %73, %68 store i64 %74, ptr %67, align 4 - %75 = getelementptr inbounds i64, ptr %.fca.0.extract80.i170.i.i, i64 %65 + %75 = getelementptr inbounds i64, ptr %.fca.0.extract80.i183.i.i, i64 %65 %76 = load i64, ptr %75, align 4 - %.fca.1.0.0.0.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn168.i.i, 0, 0 - %.fca.1.0.0.1.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn168.i.i, 0, 1 - %.fca.1.0.0.2.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn168.i.i, 0, 2 - %77 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn168.i.i, i64 %72, 1 + %.fca.1.0.0.0.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 0 + %.fca.1.0.0.1.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 1 + %.fca.1.0.0.2.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 2 + %77 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, i64 %72, 1 %78 = insertvalue { { ptr, ptr, i64 }, i64 } %77, ptr %.fca.1.0.0.0.extract.i.i.i, 0, 0 %79 = insertvalue { { ptr, ptr, i64 }, i64 } %78, ptr %.fca.1.0.0.1.extract.i.i.i, 0, 1 %80 = insertvalue { { ptr, ptr, i64 }, i64 } %79, i64 %.fca.1.0.0.2.extract.i.i.i, 0, 2 tail call void @___qfree(i64 %76) - %.not.i.i = icmp eq i64 %"294_0.0169.i.i", 9 + %.not.i.i = icmp eq i64 %"294_0.0182.i.i", 9 br i1 %.not.i.i, label %43, label %__barray_check_bounds.exit.i.i.i __hugr__.main.1.exit: ; preds = %61, %43 diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-measure_qb_array/measure_qb_array_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-measure_qb_array/measure_qb_array_x86_64-apple-darwin index 60488a25d..e17eddfda 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-measure_qb_array/measure_qb_array_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-measure_qb_array/measure_qb_array_x86_64-apple-darwin @@ -37,7 +37,7 @@ entry: %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 br i1 %not_max.not.not.i.i, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i -cond_207_case_0.i.i: ; preds = %__barray_mask_return.exit.i.8, %__barray_mask_return.exit.i.7, %__barray_mask_return.exit.i.6, %__barray_mask_return.exit.i.5, %__barray_mask_return.exit.i.4, %__barray_mask_return.exit.i.3, %__barray_mask_return.exit.i.2, %__barray_mask_return.exit.i.1, %__barray_mask_return.exit.i, %entry +cond_207_case_0.i.i: ; preds = %cond_exit_20.i.8, %cond_exit_20.i.7, %cond_exit_20.i.6, %cond_exit_20.i.5, %cond_exit_20.i.4, %cond_exit_20.i.3, %cond_exit_20.i.2, %cond_exit_20.i.1, %cond_exit_20.i, %entry tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable @@ -45,13 +45,13 @@ __barray_check_bounds.exit.i: ; preds = %entry tail call void @___reset(i64 %qalloc.i.i) %3 = load i64, ptr %2, align 4 %4 = trunc i64 %3 to i1 - br i1 %4, label %__barray_mask_return.exit.i, label %panic.i.i + br i1 %4, label %cond_exit_20.i, label %panic.i.i panic.i.i: ; preds = %__barray_check_bounds.exit.i.9, %__barray_check_bounds.exit.i.8, %__barray_check_bounds.exit.i.7, %__barray_check_bounds.exit.i.6, %__barray_check_bounds.exit.i.5, %__barray_check_bounds.exit.i.4, %__barray_check_bounds.exit.i.3, %__barray_check_bounds.exit.i.2, %__barray_check_bounds.exit.i.1, %__barray_check_bounds.exit.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit.i: ; preds = %__barray_check_bounds.exit.i +cond_exit_20.i: ; preds = %__barray_check_bounds.exit.i %5 = and i64 %3, -2 store i64 %5, ptr %2, align 4 store i64 %qalloc.i.i, ptr %1, align 4 @@ -59,14 +59,14 @@ __barray_mask_return.exit.i: ; preds = %__barray_check_boun %not_max.not.not.i.i.1 = icmp eq i64 %qalloc.i.i.1, -1 br i1 %not_max.not.not.i.i.1, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.1 -__barray_check_bounds.exit.i.1: ; preds = %__barray_mask_return.exit.i +__barray_check_bounds.exit.i.1: ; preds = %cond_exit_20.i tail call void @___reset(i64 %qalloc.i.i.1) %6 = load i64, ptr %2, align 4 %7 = and i64 %6, 2 %.not = icmp eq i64 %7, 0 - br i1 %.not, label %panic.i.i, label %__barray_mask_return.exit.i.1 + br i1 %.not, label %panic.i.i, label %cond_exit_20.i.1 -__barray_mask_return.exit.i.1: ; preds = %__barray_check_bounds.exit.i.1 +cond_exit_20.i.1: ; preds = %__barray_check_bounds.exit.i.1 %8 = and i64 %6, -3 store i64 %8, ptr %2, align 4 %9 = getelementptr inbounds nuw i8, ptr %1, i64 8 @@ -75,14 +75,14 @@ __barray_mask_return.exit.i.1: ; preds = %__barray_check_boun %not_max.not.not.i.i.2 = icmp eq i64 %qalloc.i.i.2, -1 br i1 %not_max.not.not.i.i.2, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.2 -__barray_check_bounds.exit.i.2: ; preds = %__barray_mask_return.exit.i.1 +__barray_check_bounds.exit.i.2: ; preds = %cond_exit_20.i.1 tail call void @___reset(i64 %qalloc.i.i.2) %10 = load i64, ptr %2, align 4 %11 = and i64 %10, 4 %.not1 = icmp eq i64 %11, 0 - br i1 %.not1, label %panic.i.i, label %__barray_mask_return.exit.i.2 + br i1 %.not1, label %panic.i.i, label %cond_exit_20.i.2 -__barray_mask_return.exit.i.2: ; preds = %__barray_check_bounds.exit.i.2 +cond_exit_20.i.2: ; preds = %__barray_check_bounds.exit.i.2 %12 = and i64 %10, -5 store i64 %12, ptr %2, align 4 %13 = getelementptr inbounds nuw i8, ptr %1, i64 16 @@ -91,14 +91,14 @@ __barray_mask_return.exit.i.2: ; preds = %__barray_check_boun %not_max.not.not.i.i.3 = icmp eq i64 %qalloc.i.i.3, -1 br i1 %not_max.not.not.i.i.3, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.3 -__barray_check_bounds.exit.i.3: ; preds = %__barray_mask_return.exit.i.2 +__barray_check_bounds.exit.i.3: ; preds = %cond_exit_20.i.2 tail call void @___reset(i64 %qalloc.i.i.3) %14 = load i64, ptr %2, align 4 %15 = and i64 %14, 8 %.not2 = icmp eq i64 %15, 0 - br i1 %.not2, label %panic.i.i, label %__barray_mask_return.exit.i.3 + br i1 %.not2, label %panic.i.i, label %cond_exit_20.i.3 -__barray_mask_return.exit.i.3: ; preds = %__barray_check_bounds.exit.i.3 +cond_exit_20.i.3: ; preds = %__barray_check_bounds.exit.i.3 %16 = and i64 %14, -9 store i64 %16, ptr %2, align 4 %17 = getelementptr inbounds nuw i8, ptr %1, i64 24 @@ -107,14 +107,14 @@ __barray_mask_return.exit.i.3: ; preds = %__barray_check_boun %not_max.not.not.i.i.4 = icmp eq i64 %qalloc.i.i.4, -1 br i1 %not_max.not.not.i.i.4, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.4 -__barray_check_bounds.exit.i.4: ; preds = %__barray_mask_return.exit.i.3 +__barray_check_bounds.exit.i.4: ; preds = %cond_exit_20.i.3 tail call void @___reset(i64 %qalloc.i.i.4) %18 = load i64, ptr %2, align 4 %19 = and i64 %18, 16 %.not3 = icmp eq i64 %19, 0 - br i1 %.not3, label %panic.i.i, label %__barray_mask_return.exit.i.4 + br i1 %.not3, label %panic.i.i, label %cond_exit_20.i.4 -__barray_mask_return.exit.i.4: ; preds = %__barray_check_bounds.exit.i.4 +cond_exit_20.i.4: ; preds = %__barray_check_bounds.exit.i.4 %20 = and i64 %18, -17 store i64 %20, ptr %2, align 4 %21 = getelementptr inbounds nuw i8, ptr %1, i64 32 @@ -123,14 +123,14 @@ __barray_mask_return.exit.i.4: ; preds = %__barray_check_boun %not_max.not.not.i.i.5 = icmp eq i64 %qalloc.i.i.5, -1 br i1 %not_max.not.not.i.i.5, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.5 -__barray_check_bounds.exit.i.5: ; preds = %__barray_mask_return.exit.i.4 +__barray_check_bounds.exit.i.5: ; preds = %cond_exit_20.i.4 tail call void @___reset(i64 %qalloc.i.i.5) %22 = load i64, ptr %2, align 4 %23 = and i64 %22, 32 %.not4 = icmp eq i64 %23, 0 - br i1 %.not4, label %panic.i.i, label %__barray_mask_return.exit.i.5 + br i1 %.not4, label %panic.i.i, label %cond_exit_20.i.5 -__barray_mask_return.exit.i.5: ; preds = %__barray_check_bounds.exit.i.5 +cond_exit_20.i.5: ; preds = %__barray_check_bounds.exit.i.5 %24 = and i64 %22, -33 store i64 %24, ptr %2, align 4 %25 = getelementptr inbounds nuw i8, ptr %1, i64 40 @@ -139,14 +139,14 @@ __barray_mask_return.exit.i.5: ; preds = %__barray_check_boun %not_max.not.not.i.i.6 = icmp eq i64 %qalloc.i.i.6, -1 br i1 %not_max.not.not.i.i.6, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.6 -__barray_check_bounds.exit.i.6: ; preds = %__barray_mask_return.exit.i.5 +__barray_check_bounds.exit.i.6: ; preds = %cond_exit_20.i.5 tail call void @___reset(i64 %qalloc.i.i.6) %26 = load i64, ptr %2, align 4 %27 = and i64 %26, 64 %.not5 = icmp eq i64 %27, 0 - br i1 %.not5, label %panic.i.i, label %__barray_mask_return.exit.i.6 + br i1 %.not5, label %panic.i.i, label %cond_exit_20.i.6 -__barray_mask_return.exit.i.6: ; preds = %__barray_check_bounds.exit.i.6 +cond_exit_20.i.6: ; preds = %__barray_check_bounds.exit.i.6 %28 = and i64 %26, -65 store i64 %28, ptr %2, align 4 %29 = getelementptr inbounds nuw i8, ptr %1, i64 48 @@ -155,14 +155,14 @@ __barray_mask_return.exit.i.6: ; preds = %__barray_check_boun %not_max.not.not.i.i.7 = icmp eq i64 %qalloc.i.i.7, -1 br i1 %not_max.not.not.i.i.7, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.7 -__barray_check_bounds.exit.i.7: ; preds = %__barray_mask_return.exit.i.6 +__barray_check_bounds.exit.i.7: ; preds = %cond_exit_20.i.6 tail call void @___reset(i64 %qalloc.i.i.7) %30 = load i64, ptr %2, align 4 %31 = and i64 %30, 128 %.not6 = icmp eq i64 %31, 0 - br i1 %.not6, label %panic.i.i, label %__barray_mask_return.exit.i.7 + br i1 %.not6, label %panic.i.i, label %cond_exit_20.i.7 -__barray_mask_return.exit.i.7: ; preds = %__barray_check_bounds.exit.i.7 +cond_exit_20.i.7: ; preds = %__barray_check_bounds.exit.i.7 %32 = and i64 %30, -129 store i64 %32, ptr %2, align 4 %33 = getelementptr inbounds nuw i8, ptr %1, i64 56 @@ -171,14 +171,14 @@ __barray_mask_return.exit.i.7: ; preds = %__barray_check_boun %not_max.not.not.i.i.8 = icmp eq i64 %qalloc.i.i.8, -1 br i1 %not_max.not.not.i.i.8, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.8 -__barray_check_bounds.exit.i.8: ; preds = %__barray_mask_return.exit.i.7 +__barray_check_bounds.exit.i.8: ; preds = %cond_exit_20.i.7 tail call void @___reset(i64 %qalloc.i.i.8) %34 = load i64, ptr %2, align 4 %35 = and i64 %34, 256 %.not7 = icmp eq i64 %35, 0 - br i1 %.not7, label %panic.i.i, label %__barray_mask_return.exit.i.8 + br i1 %.not7, label %panic.i.i, label %cond_exit_20.i.8 -__barray_mask_return.exit.i.8: ; preds = %__barray_check_bounds.exit.i.8 +cond_exit_20.i.8: ; preds = %__barray_check_bounds.exit.i.8 %36 = and i64 %34, -257 store i64 %36, ptr %2, align 4 %37 = getelementptr inbounds nuw i8, ptr %1, i64 64 @@ -187,14 +187,14 @@ __barray_mask_return.exit.i.8: ; preds = %__barray_check_boun %not_max.not.not.i.i.9 = icmp eq i64 %qalloc.i.i.9, -1 br i1 %not_max.not.not.i.i.9, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.9 -__barray_check_bounds.exit.i.9: ; preds = %__barray_mask_return.exit.i.8 +__barray_check_bounds.exit.i.9: ; preds = %cond_exit_20.i.8 tail call void @___reset(i64 %qalloc.i.i.9) %38 = load i64, ptr %2, align 4 %39 = and i64 %38, 512 %.not8 = icmp eq i64 %39, 0 - br i1 %.not8, label %panic.i.i, label %__barray_mask_return.exit.i.9 + br i1 %.not8, label %panic.i.i, label %cond_exit_20.i.9 -__barray_mask_return.exit.i.9: ; preds = %__barray_check_bounds.exit.i.9 +cond_exit_20.i.9: ; preds = %__barray_check_bounds.exit.i.9 %40 = and i64 %38, -513 store i64 %40, ptr %2, align 4 %41 = getelementptr inbounds nuw i8, ptr %1, i64 72 @@ -206,11 +206,11 @@ __barray_mask_return.exit.i.9: ; preds = %__barray_check_boun %43 = trunc i64 %42 to i1 br i1 %43, label %panic.i238.i, label %__barray_mask_borrow.exit.i -panic.i238.i: ; preds = %__barray_mask_return.exit.i.9 +panic.i238.i: ; preds = %cond_exit_20.i.9 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_mask_borrow.exit.i: ; preds = %__barray_mask_return.exit.i.9 +__barray_mask_borrow.exit.i: ; preds = %cond_exit_20.i.9 %44 = or disjoint i64 %42, 1 store i64 %44, ptr %2, align 4 %45 = load i64, ptr %1, align 4 @@ -243,8 +243,8 @@ __barray_mask_borrow.exit242.i: ; preds = %__barray_mask_retur tail call void @___rxy(i64 %52, double 0x400921FB54442D18, double 0.000000e+00) %53 = load i64, ptr %2, align 4 %54 = and i64 %53, 4 - %.not265.i = icmp eq i64 %54, 0 - br i1 %.not265.i, label %panic.i243.i, label %__barray_mask_return.exit244.i + %.not268.i = icmp eq i64 %54, 0 + br i1 %.not268.i, label %panic.i243.i, label %__barray_mask_return.exit244.i panic.i243.i: ; preds = %__barray_mask_borrow.exit242.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") @@ -256,8 +256,8 @@ __barray_mask_return.exit244.i: ; preds = %__barray_mask_borro store i64 %52, ptr %13, align 4 %56 = load i64, ptr %2, align 4 %57 = and i64 %56, 8 - %.not266.i = icmp eq i64 %57, 0 - br i1 %.not266.i, label %__barray_mask_borrow.exit246.i, label %panic.i245.i + %.not269.i = icmp eq i64 %57, 0 + br i1 %.not269.i, label %__barray_mask_borrow.exit246.i, label %panic.i245.i panic.i245.i: ; preds = %__barray_mask_return.exit244.i tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") @@ -270,8 +270,8 @@ __barray_mask_borrow.exit246.i: ; preds = %__barray_mask_retur tail call void @___rxy(i64 %59, double 0x400921FB54442D18, double 0.000000e+00) %60 = load i64, ptr %2, align 4 %61 = and i64 %60, 8 - %.not267.i = icmp eq i64 %61, 0 - br i1 %.not267.i, label %panic.i247.i, label %__barray_mask_return.exit248.i + %.not270.i = icmp eq i64 %61, 0 + br i1 %.not270.i, label %panic.i247.i, label %__barray_mask_return.exit248.i panic.i247.i: ; preds = %__barray_mask_borrow.exit246.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") @@ -283,8 +283,8 @@ __barray_mask_return.exit248.i: ; preds = %__barray_mask_borro store i64 %59, ptr %17, align 4 %63 = load i64, ptr %2, align 4 %64 = and i64 %63, 512 - %.not268.i = icmp eq i64 %64, 0 - br i1 %.not268.i, label %__barray_mask_borrow.exit250.i, label %panic.i249.i + %.not271.i = icmp eq i64 %64, 0 + br i1 %.not271.i, label %__barray_mask_borrow.exit250.i, label %panic.i249.i panic.i249.i: ; preds = %__barray_mask_return.exit248.i tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") @@ -297,8 +297,8 @@ __barray_mask_borrow.exit250.i: ; preds = %__barray_mask_retur tail call void @___rxy(i64 %66, double 0x400921FB54442D18, double 0.000000e+00) %67 = load i64, ptr %2, align 4 %68 = and i64 %67, 512 - %.not269.i = icmp eq i64 %68, 0 - br i1 %.not269.i, label %panic.i251.i, label %__barray_mask_return.exit252.i + %.not272.i = icmp eq i64 %68, 0 + br i1 %.not272.i, label %panic.i251.i, label %__barray_mask_return.exit252.i panic.i251.i: ; preds = %__barray_mask_borrow.exit250.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") @@ -314,7 +314,7 @@ __barray_mask_return.exit252.i: ; preds = %__barray_mask_borro store i64 -1, ptr %72, align 1 br label %__barray_check_bounds.exit.i.i.i -73: ; preds = %__barray_mask_return.exit.i.i +73: ; preds = %loop_body.i.i %74 = lshr i64 %.fca.2.extract82.i.i.i, 6 %75 = getelementptr i64, ptr %.fca.1.extract81.i.i.i, i64 %74 %76 = load i64, ptr %75, align 4 @@ -355,17 +355,16 @@ mask_block_err.i.i.i.i: ; preds = %mask_block_ok.i.i.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit.i.i.i: ; preds = %__barray_mask_return.exit.i.i, %__barray_mask_return.exit252.i - %.fca.2.extract82.i175.i.i = phi i64 [ 0, %__barray_mask_return.exit252.i ], [ %.fca.2.extract82.i.i.i, %__barray_mask_return.exit.i.i ] - %.fca.1.extract81.i174.i.i = phi ptr [ %2, %__barray_mask_return.exit252.i ], [ %.fca.1.extract81.i.i.i, %__barray_mask_return.exit.i.i ] - %.fca.0.extract80.i173.i.i = phi ptr [ %1, %__barray_mask_return.exit252.i ], [ %.fca.0.extract80.i.i.i, %__barray_mask_return.exit.i.i ] - %"306_0.sroa.15.0172.i.i" = phi i64 [ 0, %__barray_mask_return.exit252.i ], [ %95, %__barray_mask_return.exit.i.i ] - %.pn.i.i = phi { { ptr, ptr, i64 }, i64 } [ %70, %__barray_mask_return.exit252.i ], [ %.pn171.i.i, %__barray_mask_return.exit.i.i ] - %.pn171.i.i = insertvalue { { ptr, ptr, i64 }, i64 } %.pn.i.i, i64 %"306_0.sroa.15.0172.i.i", 1 - %95 = add nuw nsw i64 %"306_0.sroa.15.0172.i.i", 1 - %96 = add i64 %"306_0.sroa.15.0172.i.i", %.fca.2.extract82.i175.i.i +__barray_check_bounds.exit.i.i.i: ; preds = %loop_body.i.i, %__barray_mask_return.exit252.i + %.fca.2.extract82.i187.i.i = phi i64 [ 0, %__barray_mask_return.exit252.i ], [ %.fca.2.extract82.i.i.i, %loop_body.i.i ] + %.fca.1.extract81.i186.i.i = phi ptr [ %2, %__barray_mask_return.exit252.i ], [ %.fca.1.extract81.i.i.i, %loop_body.i.i ] + %.fca.0.extract80.i185.i.i = phi ptr [ %1, %__barray_mask_return.exit252.i ], [ %.fca.0.extract80.i.i.i, %loop_body.i.i ] + %"306_0.sroa.15.0184.i.i" = phi i64 [ 0, %__barray_mask_return.exit252.i ], [ %95, %loop_body.i.i ] + %.pn165183.i.i = phi { { ptr, ptr, i64 }, i64 } [ %70, %__barray_mask_return.exit252.i ], [ %110, %loop_body.i.i ] + %95 = add nuw nsw i64 %"306_0.sroa.15.0184.i.i", 1 + %96 = add i64 %"306_0.sroa.15.0184.i.i", %.fca.2.extract82.i187.i.i %97 = lshr i64 %96, 6 - %98 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i174.i.i, i64 %97 + %98 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i186.i.i, i64 %97 %99 = load i64, ptr %98, align 4 %100 = and i64 %96, 63 %101 = lshr i64 %99, %100 @@ -380,241 +379,242 @@ __barray_check_bounds.exit.i.i: ; preds = %__barray_check_boun %103 = shl nuw i64 1, %100 %104 = xor i64 %103, %99 store i64 %104, ptr %98, align 4 - %105 = getelementptr inbounds i64, ptr %.fca.0.extract80.i173.i.i, i64 %96 + %105 = getelementptr inbounds i64, ptr %.fca.0.extract80.i185.i.i, i64 %96 %106 = load i64, ptr %105, align 4 %lazy_measure.i.i = tail call i64 @___lazy_measure(i64 %106) tail call void @___qfree(i64 %106) %107 = load i64, ptr %72, align 4 - %108 = lshr i64 %107, %"306_0.sroa.15.0172.i.i" + %108 = lshr i64 %107, %"306_0.sroa.15.0184.i.i" %109 = trunc i64 %108 to i1 - br i1 %109, label %__barray_mask_return.exit.i.i, label %panic.i.i.i + br i1 %109, label %loop_body.i.i, label %panic.i.i.i panic.i.i.i: ; preds = %__barray_check_bounds.exit.i.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit.i.i: ; preds = %__barray_check_bounds.exit.i.i +loop_body.i.i: ; preds = %__barray_check_bounds.exit.i.i %"371_054.fca.1.insert.i.i" = insertvalue { i1, i64, i1 } { i1 true, i64 poison, i1 undef }, i64 %lazy_measure.i.i, 1 %"371_054.fca.2.insert.i.i" = insertvalue { i1, i64, i1 } %"371_054.fca.1.insert.i.i", i1 undef, 2 - %110 = shl nuw nsw i64 1, %"306_0.sroa.15.0172.i.i" - %111 = xor i64 %107, %110 - store i64 %111, ptr %72, align 4 - %112 = getelementptr inbounds nuw { i1, i64, i1 }, ptr %71, i64 %"306_0.sroa.15.0172.i.i" - store { i1, i64, i1 } %"371_054.fca.2.insert.i.i", ptr %112, align 4 - %113 = extractvalue { { ptr, ptr, i64 }, i64 } %.pn.i.i, 0 - %.fca.0.extract80.i.i.i = extractvalue { ptr, ptr, i64 } %113, 0 - %.fca.1.extract81.i.i.i = extractvalue { ptr, ptr, i64 } %113, 1 - %.fca.2.extract82.i.i.i = extractvalue { ptr, ptr, i64 } %113, 2 - %.not.i.i = icmp eq i64 %"306_0.sroa.15.0172.i.i", 9 - br i1 %.not.i.i, label %73, label %__barray_check_bounds.exit.i.i.i + %110 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn165183.i.i, i64 %95, 1 + %111 = shl nuw nsw i64 1, %"306_0.sroa.15.0184.i.i" + %112 = xor i64 %107, %111 + store i64 %112, ptr %72, align 4 + %113 = getelementptr inbounds nuw { i1, i64, i1 }, ptr %71, i64 %"306_0.sroa.15.0184.i.i" + store { i1, i64, i1 } %"371_054.fca.2.insert.i.i", ptr %113, align 4 + %114 = extractvalue { { ptr, ptr, i64 }, i64 } %.pn165183.i.i, 0 + %.fca.0.extract80.i.i.i = extractvalue { ptr, ptr, i64 } %114, 0 + %.fca.1.extract81.i.i.i = extractvalue { ptr, ptr, i64 } %114, 1 + %.fca.2.extract82.i.i.i = extractvalue { ptr, ptr, i64 } %114, 2 + %exitcond.not.i.i = icmp eq i64 %95, 10 + br i1 %exitcond.not.i.i, label %73, label %__barray_check_bounds.exit.i.i.i "__hugr__.$measure_array$$n(10).280.exit.i": ; preds = %91, %73 tail call void @heap_free(ptr %.fca.0.extract80.i.i.i) tail call void @heap_free(ptr nonnull %.fca.1.extract81.i.i.i) - %114 = load i64, ptr %72, align 4 - %115 = trunc i64 %114 to i1 - br i1 %115, label %cond_exit_89.thread.i, label %__barray_mask_borrow.exit258.i + %115 = load i64, ptr %72, align 4 + %116 = trunc i64 %115 to i1 + br i1 %116, label %cond_exit_89.thread.i, label %__barray_mask_borrow.exit259.i mask_block_err.i.i: ; preds = %cond_exit_89.thread.9.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_mask_borrow.exit258.i: ; preds = %"__hugr__.$measure_array$$n(10).280.exit.i" - %116 = or disjoint i64 %114, 1 - store i64 %116, ptr %72, align 4 - %117 = load { i1, i64, i1 }, ptr %71, align 4 - %.fca.0.extract167.i = extractvalue { i1, i64, i1 } %117, 0 +__barray_mask_borrow.exit259.i: ; preds = %"__hugr__.$measure_array$$n(10).280.exit.i" + %117 = or disjoint i64 %115, 1 + store i64 %117, ptr %72, align 4 + %118 = load { i1, i64, i1 }, ptr %71, align 4 + %.fca.0.extract167.i = extractvalue { i1, i64, i1 } %118, 0 br i1 %.fca.0.extract167.i, label %cond_392_case_1.i, label %cond_exit_89.thread.i -cond_exit_89.thread.i: ; preds = %cond_392_case_1.i, %__barray_mask_borrow.exit258.i, %"__hugr__.$measure_array$$n(10).280.exit.i" - %118 = phi i64 [ %.pre.i, %cond_392_case_1.i ], [ %116, %__barray_mask_borrow.exit258.i ], [ %114, %"__hugr__.$measure_array$$n(10).280.exit.i" ] - %119 = and i64 %118, 2 - %.not287.i = icmp eq i64 %119, 0 - br i1 %.not287.i, label %__barray_mask_borrow.exit258.1.i, label %cond_exit_89.thread.1.i - -__barray_mask_borrow.exit258.1.i: ; preds = %cond_exit_89.thread.i - %120 = or disjoint i64 %118, 2 - store i64 %120, ptr %72, align 4 - %121 = getelementptr inbounds nuw i8, ptr %71, i64 24 - %122 = load { i1, i64, i1 }, ptr %121, align 4 - %.fca.0.extract167.1.i = extractvalue { i1, i64, i1 } %122, 0 +cond_exit_89.thread.i: ; preds = %cond_392_case_1.i, %__barray_mask_borrow.exit259.i, %"__hugr__.$measure_array$$n(10).280.exit.i" + %119 = phi i64 [ %.pre.i, %cond_392_case_1.i ], [ %117, %__barray_mask_borrow.exit259.i ], [ %115, %"__hugr__.$measure_array$$n(10).280.exit.i" ] + %120 = and i64 %119, 2 + %.not290.i = icmp eq i64 %120, 0 + br i1 %.not290.i, label %__barray_mask_borrow.exit259.1.i, label %cond_exit_89.thread.1.i + +__barray_mask_borrow.exit259.1.i: ; preds = %cond_exit_89.thread.i + %121 = or disjoint i64 %119, 2 + store i64 %121, ptr %72, align 4 + %122 = getelementptr inbounds nuw i8, ptr %71, i64 24 + %123 = load { i1, i64, i1 }, ptr %122, align 4 + %.fca.0.extract167.1.i = extractvalue { i1, i64, i1 } %123, 0 br i1 %.fca.0.extract167.1.i, label %cond_392_case_1.1.i, label %cond_exit_89.thread.1.i -cond_392_case_1.1.i: ; preds = %__barray_mask_borrow.exit258.1.i - %.fca.1.extract.1.i = extractvalue { i1, i64, i1 } %122, 1 +cond_392_case_1.1.i: ; preds = %__barray_mask_borrow.exit259.1.i + %.fca.1.extract.1.i = extractvalue { i1, i64, i1 } %123, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.1.i) - %.pre278.i = load i64, ptr %72, align 4 + %.pre281.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.1.i -cond_exit_89.thread.1.i: ; preds = %cond_392_case_1.1.i, %__barray_mask_borrow.exit258.1.i, %cond_exit_89.thread.i - %123 = phi i64 [ %.pre278.i, %cond_392_case_1.1.i ], [ %120, %__barray_mask_borrow.exit258.1.i ], [ %118, %cond_exit_89.thread.i ] - %124 = and i64 %123, 4 - %.not288.i = icmp eq i64 %124, 0 - br i1 %.not288.i, label %__barray_mask_borrow.exit258.2.i, label %cond_exit_89.thread.2.i - -__barray_mask_borrow.exit258.2.i: ; preds = %cond_exit_89.thread.1.i - %125 = or disjoint i64 %123, 4 - store i64 %125, ptr %72, align 4 - %126 = getelementptr inbounds nuw i8, ptr %71, i64 48 - %127 = load { i1, i64, i1 }, ptr %126, align 4 - %.fca.0.extract167.2.i = extractvalue { i1, i64, i1 } %127, 0 +cond_exit_89.thread.1.i: ; preds = %cond_392_case_1.1.i, %__barray_mask_borrow.exit259.1.i, %cond_exit_89.thread.i + %124 = phi i64 [ %.pre281.i, %cond_392_case_1.1.i ], [ %121, %__barray_mask_borrow.exit259.1.i ], [ %119, %cond_exit_89.thread.i ] + %125 = and i64 %124, 4 + %.not291.i = icmp eq i64 %125, 0 + br i1 %.not291.i, label %__barray_mask_borrow.exit259.2.i, label %cond_exit_89.thread.2.i + +__barray_mask_borrow.exit259.2.i: ; preds = %cond_exit_89.thread.1.i + %126 = or disjoint i64 %124, 4 + store i64 %126, ptr %72, align 4 + %127 = getelementptr inbounds nuw i8, ptr %71, i64 48 + %128 = load { i1, i64, i1 }, ptr %127, align 4 + %.fca.0.extract167.2.i = extractvalue { i1, i64, i1 } %128, 0 br i1 %.fca.0.extract167.2.i, label %cond_392_case_1.2.i, label %cond_exit_89.thread.2.i -cond_392_case_1.2.i: ; preds = %__barray_mask_borrow.exit258.2.i - %.fca.1.extract.2.i = extractvalue { i1, i64, i1 } %127, 1 +cond_392_case_1.2.i: ; preds = %__barray_mask_borrow.exit259.2.i + %.fca.1.extract.2.i = extractvalue { i1, i64, i1 } %128, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.2.i) - %.pre279.i = load i64, ptr %72, align 4 + %.pre282.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.2.i -cond_exit_89.thread.2.i: ; preds = %cond_392_case_1.2.i, %__barray_mask_borrow.exit258.2.i, %cond_exit_89.thread.1.i - %128 = phi i64 [ %.pre279.i, %cond_392_case_1.2.i ], [ %125, %__barray_mask_borrow.exit258.2.i ], [ %123, %cond_exit_89.thread.1.i ] - %129 = and i64 %128, 8 - %.not289.i = icmp eq i64 %129, 0 - br i1 %.not289.i, label %__barray_mask_borrow.exit258.3.i, label %cond_exit_89.thread.3.i - -__barray_mask_borrow.exit258.3.i: ; preds = %cond_exit_89.thread.2.i - %130 = or disjoint i64 %128, 8 - store i64 %130, ptr %72, align 4 - %131 = getelementptr inbounds nuw i8, ptr %71, i64 72 - %132 = load { i1, i64, i1 }, ptr %131, align 4 - %.fca.0.extract167.3.i = extractvalue { i1, i64, i1 } %132, 0 +cond_exit_89.thread.2.i: ; preds = %cond_392_case_1.2.i, %__barray_mask_borrow.exit259.2.i, %cond_exit_89.thread.1.i + %129 = phi i64 [ %.pre282.i, %cond_392_case_1.2.i ], [ %126, %__barray_mask_borrow.exit259.2.i ], [ %124, %cond_exit_89.thread.1.i ] + %130 = and i64 %129, 8 + %.not292.i = icmp eq i64 %130, 0 + br i1 %.not292.i, label %__barray_mask_borrow.exit259.3.i, label %cond_exit_89.thread.3.i + +__barray_mask_borrow.exit259.3.i: ; preds = %cond_exit_89.thread.2.i + %131 = or disjoint i64 %129, 8 + store i64 %131, ptr %72, align 4 + %132 = getelementptr inbounds nuw i8, ptr %71, i64 72 + %133 = load { i1, i64, i1 }, ptr %132, align 4 + %.fca.0.extract167.3.i = extractvalue { i1, i64, i1 } %133, 0 br i1 %.fca.0.extract167.3.i, label %cond_392_case_1.3.i, label %cond_exit_89.thread.3.i -cond_392_case_1.3.i: ; preds = %__barray_mask_borrow.exit258.3.i - %.fca.1.extract.3.i = extractvalue { i1, i64, i1 } %132, 1 +cond_392_case_1.3.i: ; preds = %__barray_mask_borrow.exit259.3.i + %.fca.1.extract.3.i = extractvalue { i1, i64, i1 } %133, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.3.i) - %.pre280.i = load i64, ptr %72, align 4 + %.pre283.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.3.i -cond_exit_89.thread.3.i: ; preds = %cond_392_case_1.3.i, %__barray_mask_borrow.exit258.3.i, %cond_exit_89.thread.2.i - %133 = phi i64 [ %.pre280.i, %cond_392_case_1.3.i ], [ %130, %__barray_mask_borrow.exit258.3.i ], [ %128, %cond_exit_89.thread.2.i ] - %134 = and i64 %133, 16 - %.not290.i = icmp eq i64 %134, 0 - br i1 %.not290.i, label %__barray_mask_borrow.exit258.4.i, label %cond_exit_89.thread.4.i - -__barray_mask_borrow.exit258.4.i: ; preds = %cond_exit_89.thread.3.i - %135 = or disjoint i64 %133, 16 - store i64 %135, ptr %72, align 4 - %136 = getelementptr inbounds nuw i8, ptr %71, i64 96 - %137 = load { i1, i64, i1 }, ptr %136, align 4 - %.fca.0.extract167.4.i = extractvalue { i1, i64, i1 } %137, 0 +cond_exit_89.thread.3.i: ; preds = %cond_392_case_1.3.i, %__barray_mask_borrow.exit259.3.i, %cond_exit_89.thread.2.i + %134 = phi i64 [ %.pre283.i, %cond_392_case_1.3.i ], [ %131, %__barray_mask_borrow.exit259.3.i ], [ %129, %cond_exit_89.thread.2.i ] + %135 = and i64 %134, 16 + %.not293.i = icmp eq i64 %135, 0 + br i1 %.not293.i, label %__barray_mask_borrow.exit259.4.i, label %cond_exit_89.thread.4.i + +__barray_mask_borrow.exit259.4.i: ; preds = %cond_exit_89.thread.3.i + %136 = or disjoint i64 %134, 16 + store i64 %136, ptr %72, align 4 + %137 = getelementptr inbounds nuw i8, ptr %71, i64 96 + %138 = load { i1, i64, i1 }, ptr %137, align 4 + %.fca.0.extract167.4.i = extractvalue { i1, i64, i1 } %138, 0 br i1 %.fca.0.extract167.4.i, label %cond_392_case_1.4.i, label %cond_exit_89.thread.4.i -cond_392_case_1.4.i: ; preds = %__barray_mask_borrow.exit258.4.i - %.fca.1.extract.4.i = extractvalue { i1, i64, i1 } %137, 1 +cond_392_case_1.4.i: ; preds = %__barray_mask_borrow.exit259.4.i + %.fca.1.extract.4.i = extractvalue { i1, i64, i1 } %138, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.4.i) - %.pre281.i = load i64, ptr %72, align 4 + %.pre284.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.4.i -cond_exit_89.thread.4.i: ; preds = %cond_392_case_1.4.i, %__barray_mask_borrow.exit258.4.i, %cond_exit_89.thread.3.i - %138 = phi i64 [ %.pre281.i, %cond_392_case_1.4.i ], [ %135, %__barray_mask_borrow.exit258.4.i ], [ %133, %cond_exit_89.thread.3.i ] - %139 = and i64 %138, 32 - %.not291.i = icmp eq i64 %139, 0 - br i1 %.not291.i, label %__barray_mask_borrow.exit258.5.i, label %cond_exit_89.thread.5.i - -__barray_mask_borrow.exit258.5.i: ; preds = %cond_exit_89.thread.4.i - %140 = or disjoint i64 %138, 32 - store i64 %140, ptr %72, align 4 - %141 = getelementptr inbounds nuw i8, ptr %71, i64 120 - %142 = load { i1, i64, i1 }, ptr %141, align 4 - %.fca.0.extract167.5.i = extractvalue { i1, i64, i1 } %142, 0 +cond_exit_89.thread.4.i: ; preds = %cond_392_case_1.4.i, %__barray_mask_borrow.exit259.4.i, %cond_exit_89.thread.3.i + %139 = phi i64 [ %.pre284.i, %cond_392_case_1.4.i ], [ %136, %__barray_mask_borrow.exit259.4.i ], [ %134, %cond_exit_89.thread.3.i ] + %140 = and i64 %139, 32 + %.not294.i = icmp eq i64 %140, 0 + br i1 %.not294.i, label %__barray_mask_borrow.exit259.5.i, label %cond_exit_89.thread.5.i + +__barray_mask_borrow.exit259.5.i: ; preds = %cond_exit_89.thread.4.i + %141 = or disjoint i64 %139, 32 + store i64 %141, ptr %72, align 4 + %142 = getelementptr inbounds nuw i8, ptr %71, i64 120 + %143 = load { i1, i64, i1 }, ptr %142, align 4 + %.fca.0.extract167.5.i = extractvalue { i1, i64, i1 } %143, 0 br i1 %.fca.0.extract167.5.i, label %cond_392_case_1.5.i, label %cond_exit_89.thread.5.i -cond_392_case_1.5.i: ; preds = %__barray_mask_borrow.exit258.5.i - %.fca.1.extract.5.i = extractvalue { i1, i64, i1 } %142, 1 +cond_392_case_1.5.i: ; preds = %__barray_mask_borrow.exit259.5.i + %.fca.1.extract.5.i = extractvalue { i1, i64, i1 } %143, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.5.i) - %.pre282.i = load i64, ptr %72, align 4 + %.pre285.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.5.i -cond_exit_89.thread.5.i: ; preds = %cond_392_case_1.5.i, %__barray_mask_borrow.exit258.5.i, %cond_exit_89.thread.4.i - %143 = phi i64 [ %.pre282.i, %cond_392_case_1.5.i ], [ %140, %__barray_mask_borrow.exit258.5.i ], [ %138, %cond_exit_89.thread.4.i ] - %144 = and i64 %143, 64 - %.not292.i = icmp eq i64 %144, 0 - br i1 %.not292.i, label %__barray_mask_borrow.exit258.6.i, label %cond_exit_89.thread.6.i - -__barray_mask_borrow.exit258.6.i: ; preds = %cond_exit_89.thread.5.i - %145 = or disjoint i64 %143, 64 - store i64 %145, ptr %72, align 4 - %146 = getelementptr inbounds nuw i8, ptr %71, i64 144 - %147 = load { i1, i64, i1 }, ptr %146, align 4 - %.fca.0.extract167.6.i = extractvalue { i1, i64, i1 } %147, 0 +cond_exit_89.thread.5.i: ; preds = %cond_392_case_1.5.i, %__barray_mask_borrow.exit259.5.i, %cond_exit_89.thread.4.i + %144 = phi i64 [ %.pre285.i, %cond_392_case_1.5.i ], [ %141, %__barray_mask_borrow.exit259.5.i ], [ %139, %cond_exit_89.thread.4.i ] + %145 = and i64 %144, 64 + %.not295.i = icmp eq i64 %145, 0 + br i1 %.not295.i, label %__barray_mask_borrow.exit259.6.i, label %cond_exit_89.thread.6.i + +__barray_mask_borrow.exit259.6.i: ; preds = %cond_exit_89.thread.5.i + %146 = or disjoint i64 %144, 64 + store i64 %146, ptr %72, align 4 + %147 = getelementptr inbounds nuw i8, ptr %71, i64 144 + %148 = load { i1, i64, i1 }, ptr %147, align 4 + %.fca.0.extract167.6.i = extractvalue { i1, i64, i1 } %148, 0 br i1 %.fca.0.extract167.6.i, label %cond_392_case_1.6.i, label %cond_exit_89.thread.6.i -cond_392_case_1.6.i: ; preds = %__barray_mask_borrow.exit258.6.i - %.fca.1.extract.6.i = extractvalue { i1, i64, i1 } %147, 1 +cond_392_case_1.6.i: ; preds = %__barray_mask_borrow.exit259.6.i + %.fca.1.extract.6.i = extractvalue { i1, i64, i1 } %148, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.6.i) - %.pre283.i = load i64, ptr %72, align 4 + %.pre286.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.6.i -cond_exit_89.thread.6.i: ; preds = %cond_392_case_1.6.i, %__barray_mask_borrow.exit258.6.i, %cond_exit_89.thread.5.i - %148 = phi i64 [ %.pre283.i, %cond_392_case_1.6.i ], [ %145, %__barray_mask_borrow.exit258.6.i ], [ %143, %cond_exit_89.thread.5.i ] - %149 = and i64 %148, 128 - %.not293.i = icmp eq i64 %149, 0 - br i1 %.not293.i, label %__barray_mask_borrow.exit258.7.i, label %cond_exit_89.thread.7.i - -__barray_mask_borrow.exit258.7.i: ; preds = %cond_exit_89.thread.6.i - %150 = or disjoint i64 %148, 128 - store i64 %150, ptr %72, align 4 - %151 = getelementptr inbounds nuw i8, ptr %71, i64 168 - %152 = load { i1, i64, i1 }, ptr %151, align 4 - %.fca.0.extract167.7.i = extractvalue { i1, i64, i1 } %152, 0 +cond_exit_89.thread.6.i: ; preds = %cond_392_case_1.6.i, %__barray_mask_borrow.exit259.6.i, %cond_exit_89.thread.5.i + %149 = phi i64 [ %.pre286.i, %cond_392_case_1.6.i ], [ %146, %__barray_mask_borrow.exit259.6.i ], [ %144, %cond_exit_89.thread.5.i ] + %150 = and i64 %149, 128 + %.not296.i = icmp eq i64 %150, 0 + br i1 %.not296.i, label %__barray_mask_borrow.exit259.7.i, label %cond_exit_89.thread.7.i + +__barray_mask_borrow.exit259.7.i: ; preds = %cond_exit_89.thread.6.i + %151 = or disjoint i64 %149, 128 + store i64 %151, ptr %72, align 4 + %152 = getelementptr inbounds nuw i8, ptr %71, i64 168 + %153 = load { i1, i64, i1 }, ptr %152, align 4 + %.fca.0.extract167.7.i = extractvalue { i1, i64, i1 } %153, 0 br i1 %.fca.0.extract167.7.i, label %cond_392_case_1.7.i, label %cond_exit_89.thread.7.i -cond_392_case_1.7.i: ; preds = %__barray_mask_borrow.exit258.7.i - %.fca.1.extract.7.i = extractvalue { i1, i64, i1 } %152, 1 +cond_392_case_1.7.i: ; preds = %__barray_mask_borrow.exit259.7.i + %.fca.1.extract.7.i = extractvalue { i1, i64, i1 } %153, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.7.i) - %.pre284.i = load i64, ptr %72, align 4 + %.pre287.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.7.i -cond_exit_89.thread.7.i: ; preds = %cond_392_case_1.7.i, %__barray_mask_borrow.exit258.7.i, %cond_exit_89.thread.6.i - %153 = phi i64 [ %.pre284.i, %cond_392_case_1.7.i ], [ %150, %__barray_mask_borrow.exit258.7.i ], [ %148, %cond_exit_89.thread.6.i ] - %154 = and i64 %153, 256 - %.not294.i = icmp eq i64 %154, 0 - br i1 %.not294.i, label %__barray_mask_borrow.exit258.8.i, label %cond_exit_89.thread.8.i - -__barray_mask_borrow.exit258.8.i: ; preds = %cond_exit_89.thread.7.i - %155 = or disjoint i64 %153, 256 - store i64 %155, ptr %72, align 4 - %156 = getelementptr inbounds nuw i8, ptr %71, i64 192 - %157 = load { i1, i64, i1 }, ptr %156, align 4 - %.fca.0.extract167.8.i = extractvalue { i1, i64, i1 } %157, 0 +cond_exit_89.thread.7.i: ; preds = %cond_392_case_1.7.i, %__barray_mask_borrow.exit259.7.i, %cond_exit_89.thread.6.i + %154 = phi i64 [ %.pre287.i, %cond_392_case_1.7.i ], [ %151, %__barray_mask_borrow.exit259.7.i ], [ %149, %cond_exit_89.thread.6.i ] + %155 = and i64 %154, 256 + %.not297.i = icmp eq i64 %155, 0 + br i1 %.not297.i, label %__barray_mask_borrow.exit259.8.i, label %cond_exit_89.thread.8.i + +__barray_mask_borrow.exit259.8.i: ; preds = %cond_exit_89.thread.7.i + %156 = or disjoint i64 %154, 256 + store i64 %156, ptr %72, align 4 + %157 = getelementptr inbounds nuw i8, ptr %71, i64 192 + %158 = load { i1, i64, i1 }, ptr %157, align 4 + %.fca.0.extract167.8.i = extractvalue { i1, i64, i1 } %158, 0 br i1 %.fca.0.extract167.8.i, label %cond_392_case_1.8.i, label %cond_exit_89.thread.8.i -cond_392_case_1.8.i: ; preds = %__barray_mask_borrow.exit258.8.i - %.fca.1.extract.8.i = extractvalue { i1, i64, i1 } %157, 1 +cond_392_case_1.8.i: ; preds = %__barray_mask_borrow.exit259.8.i + %.fca.1.extract.8.i = extractvalue { i1, i64, i1 } %158, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.8.i) - %.pre285.i = load i64, ptr %72, align 4 + %.pre288.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.8.i -cond_exit_89.thread.8.i: ; preds = %cond_392_case_1.8.i, %__barray_mask_borrow.exit258.8.i, %cond_exit_89.thread.7.i - %158 = phi i64 [ %.pre285.i, %cond_392_case_1.8.i ], [ %155, %__barray_mask_borrow.exit258.8.i ], [ %153, %cond_exit_89.thread.7.i ] - %159 = and i64 %158, 512 - %.not295.i = icmp eq i64 %159, 0 - br i1 %.not295.i, label %__barray_mask_borrow.exit258.9.i, label %cond_exit_89.thread.9.i - -__barray_mask_borrow.exit258.9.i: ; preds = %cond_exit_89.thread.8.i - %160 = or disjoint i64 %158, 512 - store i64 %160, ptr %72, align 4 - %161 = getelementptr inbounds nuw i8, ptr %71, i64 216 - %162 = load { i1, i64, i1 }, ptr %161, align 4 - %.fca.0.extract167.9.i = extractvalue { i1, i64, i1 } %162, 0 +cond_exit_89.thread.8.i: ; preds = %cond_392_case_1.8.i, %__barray_mask_borrow.exit259.8.i, %cond_exit_89.thread.7.i + %159 = phi i64 [ %.pre288.i, %cond_392_case_1.8.i ], [ %156, %__barray_mask_borrow.exit259.8.i ], [ %154, %cond_exit_89.thread.7.i ] + %160 = and i64 %159, 512 + %.not298.i = icmp eq i64 %160, 0 + br i1 %.not298.i, label %__barray_mask_borrow.exit259.9.i, label %cond_exit_89.thread.9.i + +__barray_mask_borrow.exit259.9.i: ; preds = %cond_exit_89.thread.8.i + %161 = or disjoint i64 %159, 512 + store i64 %161, ptr %72, align 4 + %162 = getelementptr inbounds nuw i8, ptr %71, i64 216 + %163 = load { i1, i64, i1 }, ptr %162, align 4 + %.fca.0.extract167.9.i = extractvalue { i1, i64, i1 } %163, 0 br i1 %.fca.0.extract167.9.i, label %cond_392_case_1.9.i, label %cond_exit_89.thread.9.i -cond_392_case_1.9.i: ; preds = %__barray_mask_borrow.exit258.9.i - %.fca.1.extract.9.i = extractvalue { i1, i64, i1 } %162, 1 +cond_392_case_1.9.i: ; preds = %__barray_mask_borrow.exit259.9.i + %.fca.1.extract.9.i = extractvalue { i1, i64, i1 } %163, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.9.i) - %.pre286.i = load i64, ptr %72, align 4 + %.pre289.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.9.i -cond_exit_89.thread.9.i: ; preds = %cond_392_case_1.9.i, %__barray_mask_borrow.exit258.9.i, %cond_exit_89.thread.8.i - %163 = phi i64 [ %.pre286.i, %cond_392_case_1.9.i ], [ %160, %__barray_mask_borrow.exit258.9.i ], [ %158, %cond_exit_89.thread.8.i ] - %164 = or i64 %163, -1024 - store i64 %164, ptr %72, align 4 - %165 = icmp eq i64 %164, -1 - br i1 %165, label %__hugr__.main.1.exit, label %mask_block_err.i.i +cond_exit_89.thread.9.i: ; preds = %cond_392_case_1.9.i, %__barray_mask_borrow.exit259.9.i, %cond_exit_89.thread.8.i + %164 = phi i64 [ %.pre289.i, %cond_392_case_1.9.i ], [ %161, %__barray_mask_borrow.exit259.9.i ], [ %159, %cond_exit_89.thread.8.i ] + %165 = or i64 %164, -1024 + store i64 %165, ptr %72, align 4 + %166 = icmp eq i64 %165, -1 + br i1 %166, label %__hugr__.main.1.exit, label %mask_block_err.i.i -cond_392_case_1.i: ; preds = %__barray_mask_borrow.exit258.i - %.fca.1.extract.i = extractvalue { i1, i64, i1 } %117, 1 +cond_392_case_1.i: ; preds = %__barray_mask_borrow.exit259.i + %.fca.1.extract.i = extractvalue { i1, i64, i1 } %118, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.i) %.pre.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.i @@ -622,8 +622,8 @@ cond_392_case_1.i: ; preds = %__barray_mask_borro __hugr__.main.1.exit: ; preds = %cond_exit_89.thread.9.i tail call void @heap_free(ptr %71) tail call void @heap_free(ptr nonnull %72) - %166 = tail call i64 @teardown() - ret i64 %166 + %167 = tail call i64 @teardown() + ret i64 %167 } declare void @setup(i64) local_unnamed_addr diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-discard_qb_array/discard_qb_array_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-discard_qb_array/discard_qb_array_x86_64-unknown-linux-gnu index 471fa3a1f..9d0d0dbab 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-discard_qb_array/discard_qb_array_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-discard_qb_array/discard_qb_array_x86_64-unknown-linux-gnu @@ -31,7 +31,7 @@ entry: %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 br i1 %not_max.not.not.i.i, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i -cond_213_case_0.i.i: ; preds = %__barray_mask_return.exit.i.8, %__barray_mask_return.exit.i.7, %__barray_mask_return.exit.i.6, %__barray_mask_return.exit.i.5, %__barray_mask_return.exit.i.4, %__barray_mask_return.exit.i.3, %__barray_mask_return.exit.i.2, %__barray_mask_return.exit.i.1, %__barray_mask_return.exit.i, %entry +cond_213_case_0.i.i: ; preds = %cond_exit_20.i.8, %cond_exit_20.i.7, %cond_exit_20.i.6, %cond_exit_20.i.5, %cond_exit_20.i.4, %cond_exit_20.i.3, %cond_exit_20.i.2, %cond_exit_20.i.1, %cond_exit_20.i, %entry tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable @@ -39,13 +39,13 @@ __barray_check_bounds.exit.i: ; preds = %entry tail call void @___reset(i64 %qalloc.i.i) %3 = load i64, ptr %2, align 4 %4 = trunc i64 %3 to i1 - br i1 %4, label %__barray_mask_return.exit.i, label %panic.i.i + br i1 %4, label %cond_exit_20.i, label %panic.i.i panic.i.i: ; preds = %__barray_check_bounds.exit.i.9, %__barray_check_bounds.exit.i.8, %__barray_check_bounds.exit.i.7, %__barray_check_bounds.exit.i.6, %__barray_check_bounds.exit.i.5, %__barray_check_bounds.exit.i.4, %__barray_check_bounds.exit.i.3, %__barray_check_bounds.exit.i.2, %__barray_check_bounds.exit.i.1, %__barray_check_bounds.exit.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit.i: ; preds = %__barray_check_bounds.exit.i +cond_exit_20.i: ; preds = %__barray_check_bounds.exit.i %5 = and i64 %3, -2 store i64 %5, ptr %2, align 4 store i64 %qalloc.i.i, ptr %1, align 4 @@ -53,14 +53,14 @@ __barray_mask_return.exit.i: ; preds = %__barray_check_boun %not_max.not.not.i.i.1 = icmp eq i64 %qalloc.i.i.1, -1 br i1 %not_max.not.not.i.i.1, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.1 -__barray_check_bounds.exit.i.1: ; preds = %__barray_mask_return.exit.i +__barray_check_bounds.exit.i.1: ; preds = %cond_exit_20.i tail call void @___reset(i64 %qalloc.i.i.1) %6 = load i64, ptr %2, align 4 %7 = and i64 %6, 2 %.not = icmp eq i64 %7, 0 - br i1 %.not, label %panic.i.i, label %__barray_mask_return.exit.i.1 + br i1 %.not, label %panic.i.i, label %cond_exit_20.i.1 -__barray_mask_return.exit.i.1: ; preds = %__barray_check_bounds.exit.i.1 +cond_exit_20.i.1: ; preds = %__barray_check_bounds.exit.i.1 %8 = and i64 %6, -3 store i64 %8, ptr %2, align 4 %9 = getelementptr inbounds nuw i8, ptr %1, i64 8 @@ -69,14 +69,14 @@ __barray_mask_return.exit.i.1: ; preds = %__barray_check_boun %not_max.not.not.i.i.2 = icmp eq i64 %qalloc.i.i.2, -1 br i1 %not_max.not.not.i.i.2, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.2 -__barray_check_bounds.exit.i.2: ; preds = %__barray_mask_return.exit.i.1 +__barray_check_bounds.exit.i.2: ; preds = %cond_exit_20.i.1 tail call void @___reset(i64 %qalloc.i.i.2) %10 = load i64, ptr %2, align 4 %11 = and i64 %10, 4 %.not1 = icmp eq i64 %11, 0 - br i1 %.not1, label %panic.i.i, label %__barray_mask_return.exit.i.2 + br i1 %.not1, label %panic.i.i, label %cond_exit_20.i.2 -__barray_mask_return.exit.i.2: ; preds = %__barray_check_bounds.exit.i.2 +cond_exit_20.i.2: ; preds = %__barray_check_bounds.exit.i.2 %12 = and i64 %10, -5 store i64 %12, ptr %2, align 4 %13 = getelementptr inbounds nuw i8, ptr %1, i64 16 @@ -85,14 +85,14 @@ __barray_mask_return.exit.i.2: ; preds = %__barray_check_boun %not_max.not.not.i.i.3 = icmp eq i64 %qalloc.i.i.3, -1 br i1 %not_max.not.not.i.i.3, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.3 -__barray_check_bounds.exit.i.3: ; preds = %__barray_mask_return.exit.i.2 +__barray_check_bounds.exit.i.3: ; preds = %cond_exit_20.i.2 tail call void @___reset(i64 %qalloc.i.i.3) %14 = load i64, ptr %2, align 4 %15 = and i64 %14, 8 %.not2 = icmp eq i64 %15, 0 - br i1 %.not2, label %panic.i.i, label %__barray_mask_return.exit.i.3 + br i1 %.not2, label %panic.i.i, label %cond_exit_20.i.3 -__barray_mask_return.exit.i.3: ; preds = %__barray_check_bounds.exit.i.3 +cond_exit_20.i.3: ; preds = %__barray_check_bounds.exit.i.3 %16 = and i64 %14, -9 store i64 %16, ptr %2, align 4 %17 = getelementptr inbounds nuw i8, ptr %1, i64 24 @@ -101,14 +101,14 @@ __barray_mask_return.exit.i.3: ; preds = %__barray_check_boun %not_max.not.not.i.i.4 = icmp eq i64 %qalloc.i.i.4, -1 br i1 %not_max.not.not.i.i.4, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.4 -__barray_check_bounds.exit.i.4: ; preds = %__barray_mask_return.exit.i.3 +__barray_check_bounds.exit.i.4: ; preds = %cond_exit_20.i.3 tail call void @___reset(i64 %qalloc.i.i.4) %18 = load i64, ptr %2, align 4 %19 = and i64 %18, 16 %.not3 = icmp eq i64 %19, 0 - br i1 %.not3, label %panic.i.i, label %__barray_mask_return.exit.i.4 + br i1 %.not3, label %panic.i.i, label %cond_exit_20.i.4 -__barray_mask_return.exit.i.4: ; preds = %__barray_check_bounds.exit.i.4 +cond_exit_20.i.4: ; preds = %__barray_check_bounds.exit.i.4 %20 = and i64 %18, -17 store i64 %20, ptr %2, align 4 %21 = getelementptr inbounds nuw i8, ptr %1, i64 32 @@ -117,14 +117,14 @@ __barray_mask_return.exit.i.4: ; preds = %__barray_check_boun %not_max.not.not.i.i.5 = icmp eq i64 %qalloc.i.i.5, -1 br i1 %not_max.not.not.i.i.5, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.5 -__barray_check_bounds.exit.i.5: ; preds = %__barray_mask_return.exit.i.4 +__barray_check_bounds.exit.i.5: ; preds = %cond_exit_20.i.4 tail call void @___reset(i64 %qalloc.i.i.5) %22 = load i64, ptr %2, align 4 %23 = and i64 %22, 32 %.not4 = icmp eq i64 %23, 0 - br i1 %.not4, label %panic.i.i, label %__barray_mask_return.exit.i.5 + br i1 %.not4, label %panic.i.i, label %cond_exit_20.i.5 -__barray_mask_return.exit.i.5: ; preds = %__barray_check_bounds.exit.i.5 +cond_exit_20.i.5: ; preds = %__barray_check_bounds.exit.i.5 %24 = and i64 %22, -33 store i64 %24, ptr %2, align 4 %25 = getelementptr inbounds nuw i8, ptr %1, i64 40 @@ -133,14 +133,14 @@ __barray_mask_return.exit.i.5: ; preds = %__barray_check_boun %not_max.not.not.i.i.6 = icmp eq i64 %qalloc.i.i.6, -1 br i1 %not_max.not.not.i.i.6, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.6 -__barray_check_bounds.exit.i.6: ; preds = %__barray_mask_return.exit.i.5 +__barray_check_bounds.exit.i.6: ; preds = %cond_exit_20.i.5 tail call void @___reset(i64 %qalloc.i.i.6) %26 = load i64, ptr %2, align 4 %27 = and i64 %26, 64 %.not5 = icmp eq i64 %27, 0 - br i1 %.not5, label %panic.i.i, label %__barray_mask_return.exit.i.6 + br i1 %.not5, label %panic.i.i, label %cond_exit_20.i.6 -__barray_mask_return.exit.i.6: ; preds = %__barray_check_bounds.exit.i.6 +cond_exit_20.i.6: ; preds = %__barray_check_bounds.exit.i.6 %28 = and i64 %26, -65 store i64 %28, ptr %2, align 4 %29 = getelementptr inbounds nuw i8, ptr %1, i64 48 @@ -149,14 +149,14 @@ __barray_mask_return.exit.i.6: ; preds = %__barray_check_boun %not_max.not.not.i.i.7 = icmp eq i64 %qalloc.i.i.7, -1 br i1 %not_max.not.not.i.i.7, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.7 -__barray_check_bounds.exit.i.7: ; preds = %__barray_mask_return.exit.i.6 +__barray_check_bounds.exit.i.7: ; preds = %cond_exit_20.i.6 tail call void @___reset(i64 %qalloc.i.i.7) %30 = load i64, ptr %2, align 4 %31 = and i64 %30, 128 %.not6 = icmp eq i64 %31, 0 - br i1 %.not6, label %panic.i.i, label %__barray_mask_return.exit.i.7 + br i1 %.not6, label %panic.i.i, label %cond_exit_20.i.7 -__barray_mask_return.exit.i.7: ; preds = %__barray_check_bounds.exit.i.7 +cond_exit_20.i.7: ; preds = %__barray_check_bounds.exit.i.7 %32 = and i64 %30, -129 store i64 %32, ptr %2, align 4 %33 = getelementptr inbounds nuw i8, ptr %1, i64 56 @@ -165,14 +165,14 @@ __barray_mask_return.exit.i.7: ; preds = %__barray_check_boun %not_max.not.not.i.i.8 = icmp eq i64 %qalloc.i.i.8, -1 br i1 %not_max.not.not.i.i.8, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.8 -__barray_check_bounds.exit.i.8: ; preds = %__barray_mask_return.exit.i.7 +__barray_check_bounds.exit.i.8: ; preds = %cond_exit_20.i.7 tail call void @___reset(i64 %qalloc.i.i.8) %34 = load i64, ptr %2, align 4 %35 = and i64 %34, 256 %.not7 = icmp eq i64 %35, 0 - br i1 %.not7, label %panic.i.i, label %__barray_mask_return.exit.i.8 + br i1 %.not7, label %panic.i.i, label %cond_exit_20.i.8 -__barray_mask_return.exit.i.8: ; preds = %__barray_check_bounds.exit.i.8 +cond_exit_20.i.8: ; preds = %__barray_check_bounds.exit.i.8 %36 = and i64 %34, -257 store i64 %36, ptr %2, align 4 %37 = getelementptr inbounds nuw i8, ptr %1, i64 64 @@ -181,14 +181,14 @@ __barray_mask_return.exit.i.8: ; preds = %__barray_check_boun %not_max.not.not.i.i.9 = icmp eq i64 %qalloc.i.i.9, -1 br i1 %not_max.not.not.i.i.9, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.9 -__barray_check_bounds.exit.i.9: ; preds = %__barray_mask_return.exit.i.8 +__barray_check_bounds.exit.i.9: ; preds = %cond_exit_20.i.8 tail call void @___reset(i64 %qalloc.i.i.9) %38 = load i64, ptr %2, align 4 %39 = and i64 %38, 512 %.not8 = icmp eq i64 %39, 0 - br i1 %.not8, label %panic.i.i, label %__barray_mask_return.exit.i.9 + br i1 %.not8, label %panic.i.i, label %cond_exit_20.i.9 -__barray_mask_return.exit.i.9: ; preds = %__barray_check_bounds.exit.i.9 +cond_exit_20.i.9: ; preds = %__barray_check_bounds.exit.i.9 %40 = and i64 %38, -513 store i64 %40, ptr %2, align 4 %41 = getelementptr inbounds nuw i8, ptr %1, i64 72 @@ -240,15 +240,15 @@ mask_block_err.i.i.i.i: ; preds = %mask_block_ok.i.i.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit.i.i.i: ; preds = %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i", %__barray_mask_return.exit.i.9 - %.fca.2.extract82.i172.i.i = phi i64 [ 0, %__barray_mask_return.exit.i.9 ], [ %.fca.1.0.0.2.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %.fca.1.extract81.i171.i.i = phi ptr [ %2, %__barray_mask_return.exit.i.9 ], [ %.fca.1.0.0.1.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %.fca.0.extract80.i170.i.i = phi ptr [ %1, %__barray_mask_return.exit.i.9 ], [ %.fca.1.0.0.0.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %"294_0.0169.i.i" = phi i64 [ 0, %__barray_mask_return.exit.i.9 ], [ %72, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %.pn168.i.i = phi { { ptr, ptr, i64 }, i64 } [ %42, %__barray_mask_return.exit.i.9 ], [ %80, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %65 = add i64 %"294_0.0169.i.i", %.fca.2.extract82.i172.i.i +__barray_check_bounds.exit.i.i.i: ; preds = %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i", %cond_exit_20.i.9 + %.fca.2.extract82.i185.i.i = phi i64 [ 0, %cond_exit_20.i.9 ], [ %.fca.1.0.0.2.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] + %.fca.1.extract81.i184.i.i = phi ptr [ %2, %cond_exit_20.i.9 ], [ %.fca.1.0.0.1.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] + %.fca.0.extract80.i183.i.i = phi ptr [ %1, %cond_exit_20.i.9 ], [ %.fca.1.0.0.0.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] + %"294_0.0182.i.i" = phi i64 [ 0, %cond_exit_20.i.9 ], [ %72, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] + %.pn181.i.i = phi { { ptr, ptr, i64 }, i64 } [ %42, %cond_exit_20.i.9 ], [ %80, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] + %65 = add i64 %"294_0.0182.i.i", %.fca.2.extract82.i185.i.i %66 = lshr i64 %65, 6 - %67 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i171.i.i, i64 %66 + %67 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i184.i.i, i64 %66 %68 = load i64, ptr %67, align 4 %69 = and i64 %65, 63 %70 = lshr i64 %68, %69 @@ -260,21 +260,21 @@ panic.i.i.i.i: ; preds = %__barray_check_boun unreachable "__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i": ; preds = %__barray_check_bounds.exit.i.i.i - %72 = add nuw nsw i64 %"294_0.0169.i.i", 1 + %72 = add nuw nsw i64 %"294_0.0182.i.i", 1 %73 = shl nuw i64 1, %69 %74 = xor i64 %73, %68 store i64 %74, ptr %67, align 4 - %75 = getelementptr inbounds i64, ptr %.fca.0.extract80.i170.i.i, i64 %65 + %75 = getelementptr inbounds i64, ptr %.fca.0.extract80.i183.i.i, i64 %65 %76 = load i64, ptr %75, align 4 - %.fca.1.0.0.0.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn168.i.i, 0, 0 - %.fca.1.0.0.1.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn168.i.i, 0, 1 - %.fca.1.0.0.2.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn168.i.i, 0, 2 - %77 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn168.i.i, i64 %72, 1 + %.fca.1.0.0.0.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 0 + %.fca.1.0.0.1.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 1 + %.fca.1.0.0.2.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 2 + %77 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, i64 %72, 1 %78 = insertvalue { { ptr, ptr, i64 }, i64 } %77, ptr %.fca.1.0.0.0.extract.i.i.i, 0, 0 %79 = insertvalue { { ptr, ptr, i64 }, i64 } %78, ptr %.fca.1.0.0.1.extract.i.i.i, 0, 1 %80 = insertvalue { { ptr, ptr, i64 }, i64 } %79, i64 %.fca.1.0.0.2.extract.i.i.i, 0, 2 tail call void @___qfree(i64 %76) - %.not.i.i = icmp eq i64 %"294_0.0169.i.i", 9 + %.not.i.i = icmp eq i64 %"294_0.0182.i.i", 9 br i1 %.not.i.i, label %43, label %__barray_check_bounds.exit.i.i.i __hugr__.main.1.exit: ; preds = %61, %43 diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-measure_qb_array/measure_qb_array_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-measure_qb_array/measure_qb_array_x86_64-unknown-linux-gnu index b108636a1..a61cea991 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-measure_qb_array/measure_qb_array_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-measure_qb_array/measure_qb_array_x86_64-unknown-linux-gnu @@ -37,7 +37,7 @@ entry: %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 br i1 %not_max.not.not.i.i, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i -cond_207_case_0.i.i: ; preds = %__barray_mask_return.exit.i.8, %__barray_mask_return.exit.i.7, %__barray_mask_return.exit.i.6, %__barray_mask_return.exit.i.5, %__barray_mask_return.exit.i.4, %__barray_mask_return.exit.i.3, %__barray_mask_return.exit.i.2, %__barray_mask_return.exit.i.1, %__barray_mask_return.exit.i, %entry +cond_207_case_0.i.i: ; preds = %cond_exit_20.i.8, %cond_exit_20.i.7, %cond_exit_20.i.6, %cond_exit_20.i.5, %cond_exit_20.i.4, %cond_exit_20.i.3, %cond_exit_20.i.2, %cond_exit_20.i.1, %cond_exit_20.i, %entry tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable @@ -45,13 +45,13 @@ __barray_check_bounds.exit.i: ; preds = %entry tail call void @___reset(i64 %qalloc.i.i) %3 = load i64, ptr %2, align 4 %4 = trunc i64 %3 to i1 - br i1 %4, label %__barray_mask_return.exit.i, label %panic.i.i + br i1 %4, label %cond_exit_20.i, label %panic.i.i panic.i.i: ; preds = %__barray_check_bounds.exit.i.9, %__barray_check_bounds.exit.i.8, %__barray_check_bounds.exit.i.7, %__barray_check_bounds.exit.i.6, %__barray_check_bounds.exit.i.5, %__barray_check_bounds.exit.i.4, %__barray_check_bounds.exit.i.3, %__barray_check_bounds.exit.i.2, %__barray_check_bounds.exit.i.1, %__barray_check_bounds.exit.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit.i: ; preds = %__barray_check_bounds.exit.i +cond_exit_20.i: ; preds = %__barray_check_bounds.exit.i %5 = and i64 %3, -2 store i64 %5, ptr %2, align 4 store i64 %qalloc.i.i, ptr %1, align 4 @@ -59,14 +59,14 @@ __barray_mask_return.exit.i: ; preds = %__barray_check_boun %not_max.not.not.i.i.1 = icmp eq i64 %qalloc.i.i.1, -1 br i1 %not_max.not.not.i.i.1, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.1 -__barray_check_bounds.exit.i.1: ; preds = %__barray_mask_return.exit.i +__barray_check_bounds.exit.i.1: ; preds = %cond_exit_20.i tail call void @___reset(i64 %qalloc.i.i.1) %6 = load i64, ptr %2, align 4 %7 = and i64 %6, 2 %.not = icmp eq i64 %7, 0 - br i1 %.not, label %panic.i.i, label %__barray_mask_return.exit.i.1 + br i1 %.not, label %panic.i.i, label %cond_exit_20.i.1 -__barray_mask_return.exit.i.1: ; preds = %__barray_check_bounds.exit.i.1 +cond_exit_20.i.1: ; preds = %__barray_check_bounds.exit.i.1 %8 = and i64 %6, -3 store i64 %8, ptr %2, align 4 %9 = getelementptr inbounds nuw i8, ptr %1, i64 8 @@ -75,14 +75,14 @@ __barray_mask_return.exit.i.1: ; preds = %__barray_check_boun %not_max.not.not.i.i.2 = icmp eq i64 %qalloc.i.i.2, -1 br i1 %not_max.not.not.i.i.2, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.2 -__barray_check_bounds.exit.i.2: ; preds = %__barray_mask_return.exit.i.1 +__barray_check_bounds.exit.i.2: ; preds = %cond_exit_20.i.1 tail call void @___reset(i64 %qalloc.i.i.2) %10 = load i64, ptr %2, align 4 %11 = and i64 %10, 4 %.not1 = icmp eq i64 %11, 0 - br i1 %.not1, label %panic.i.i, label %__barray_mask_return.exit.i.2 + br i1 %.not1, label %panic.i.i, label %cond_exit_20.i.2 -__barray_mask_return.exit.i.2: ; preds = %__barray_check_bounds.exit.i.2 +cond_exit_20.i.2: ; preds = %__barray_check_bounds.exit.i.2 %12 = and i64 %10, -5 store i64 %12, ptr %2, align 4 %13 = getelementptr inbounds nuw i8, ptr %1, i64 16 @@ -91,14 +91,14 @@ __barray_mask_return.exit.i.2: ; preds = %__barray_check_boun %not_max.not.not.i.i.3 = icmp eq i64 %qalloc.i.i.3, -1 br i1 %not_max.not.not.i.i.3, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.3 -__barray_check_bounds.exit.i.3: ; preds = %__barray_mask_return.exit.i.2 +__barray_check_bounds.exit.i.3: ; preds = %cond_exit_20.i.2 tail call void @___reset(i64 %qalloc.i.i.3) %14 = load i64, ptr %2, align 4 %15 = and i64 %14, 8 %.not2 = icmp eq i64 %15, 0 - br i1 %.not2, label %panic.i.i, label %__barray_mask_return.exit.i.3 + br i1 %.not2, label %panic.i.i, label %cond_exit_20.i.3 -__barray_mask_return.exit.i.3: ; preds = %__barray_check_bounds.exit.i.3 +cond_exit_20.i.3: ; preds = %__barray_check_bounds.exit.i.3 %16 = and i64 %14, -9 store i64 %16, ptr %2, align 4 %17 = getelementptr inbounds nuw i8, ptr %1, i64 24 @@ -107,14 +107,14 @@ __barray_mask_return.exit.i.3: ; preds = %__barray_check_boun %not_max.not.not.i.i.4 = icmp eq i64 %qalloc.i.i.4, -1 br i1 %not_max.not.not.i.i.4, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.4 -__barray_check_bounds.exit.i.4: ; preds = %__barray_mask_return.exit.i.3 +__barray_check_bounds.exit.i.4: ; preds = %cond_exit_20.i.3 tail call void @___reset(i64 %qalloc.i.i.4) %18 = load i64, ptr %2, align 4 %19 = and i64 %18, 16 %.not3 = icmp eq i64 %19, 0 - br i1 %.not3, label %panic.i.i, label %__barray_mask_return.exit.i.4 + br i1 %.not3, label %panic.i.i, label %cond_exit_20.i.4 -__barray_mask_return.exit.i.4: ; preds = %__barray_check_bounds.exit.i.4 +cond_exit_20.i.4: ; preds = %__barray_check_bounds.exit.i.4 %20 = and i64 %18, -17 store i64 %20, ptr %2, align 4 %21 = getelementptr inbounds nuw i8, ptr %1, i64 32 @@ -123,14 +123,14 @@ __barray_mask_return.exit.i.4: ; preds = %__barray_check_boun %not_max.not.not.i.i.5 = icmp eq i64 %qalloc.i.i.5, -1 br i1 %not_max.not.not.i.i.5, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.5 -__barray_check_bounds.exit.i.5: ; preds = %__barray_mask_return.exit.i.4 +__barray_check_bounds.exit.i.5: ; preds = %cond_exit_20.i.4 tail call void @___reset(i64 %qalloc.i.i.5) %22 = load i64, ptr %2, align 4 %23 = and i64 %22, 32 %.not4 = icmp eq i64 %23, 0 - br i1 %.not4, label %panic.i.i, label %__barray_mask_return.exit.i.5 + br i1 %.not4, label %panic.i.i, label %cond_exit_20.i.5 -__barray_mask_return.exit.i.5: ; preds = %__barray_check_bounds.exit.i.5 +cond_exit_20.i.5: ; preds = %__barray_check_bounds.exit.i.5 %24 = and i64 %22, -33 store i64 %24, ptr %2, align 4 %25 = getelementptr inbounds nuw i8, ptr %1, i64 40 @@ -139,14 +139,14 @@ __barray_mask_return.exit.i.5: ; preds = %__barray_check_boun %not_max.not.not.i.i.6 = icmp eq i64 %qalloc.i.i.6, -1 br i1 %not_max.not.not.i.i.6, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.6 -__barray_check_bounds.exit.i.6: ; preds = %__barray_mask_return.exit.i.5 +__barray_check_bounds.exit.i.6: ; preds = %cond_exit_20.i.5 tail call void @___reset(i64 %qalloc.i.i.6) %26 = load i64, ptr %2, align 4 %27 = and i64 %26, 64 %.not5 = icmp eq i64 %27, 0 - br i1 %.not5, label %panic.i.i, label %__barray_mask_return.exit.i.6 + br i1 %.not5, label %panic.i.i, label %cond_exit_20.i.6 -__barray_mask_return.exit.i.6: ; preds = %__barray_check_bounds.exit.i.6 +cond_exit_20.i.6: ; preds = %__barray_check_bounds.exit.i.6 %28 = and i64 %26, -65 store i64 %28, ptr %2, align 4 %29 = getelementptr inbounds nuw i8, ptr %1, i64 48 @@ -155,14 +155,14 @@ __barray_mask_return.exit.i.6: ; preds = %__barray_check_boun %not_max.not.not.i.i.7 = icmp eq i64 %qalloc.i.i.7, -1 br i1 %not_max.not.not.i.i.7, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.7 -__barray_check_bounds.exit.i.7: ; preds = %__barray_mask_return.exit.i.6 +__barray_check_bounds.exit.i.7: ; preds = %cond_exit_20.i.6 tail call void @___reset(i64 %qalloc.i.i.7) %30 = load i64, ptr %2, align 4 %31 = and i64 %30, 128 %.not6 = icmp eq i64 %31, 0 - br i1 %.not6, label %panic.i.i, label %__barray_mask_return.exit.i.7 + br i1 %.not6, label %panic.i.i, label %cond_exit_20.i.7 -__barray_mask_return.exit.i.7: ; preds = %__barray_check_bounds.exit.i.7 +cond_exit_20.i.7: ; preds = %__barray_check_bounds.exit.i.7 %32 = and i64 %30, -129 store i64 %32, ptr %2, align 4 %33 = getelementptr inbounds nuw i8, ptr %1, i64 56 @@ -171,14 +171,14 @@ __barray_mask_return.exit.i.7: ; preds = %__barray_check_boun %not_max.not.not.i.i.8 = icmp eq i64 %qalloc.i.i.8, -1 br i1 %not_max.not.not.i.i.8, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.8 -__barray_check_bounds.exit.i.8: ; preds = %__barray_mask_return.exit.i.7 +__barray_check_bounds.exit.i.8: ; preds = %cond_exit_20.i.7 tail call void @___reset(i64 %qalloc.i.i.8) %34 = load i64, ptr %2, align 4 %35 = and i64 %34, 256 %.not7 = icmp eq i64 %35, 0 - br i1 %.not7, label %panic.i.i, label %__barray_mask_return.exit.i.8 + br i1 %.not7, label %panic.i.i, label %cond_exit_20.i.8 -__barray_mask_return.exit.i.8: ; preds = %__barray_check_bounds.exit.i.8 +cond_exit_20.i.8: ; preds = %__barray_check_bounds.exit.i.8 %36 = and i64 %34, -257 store i64 %36, ptr %2, align 4 %37 = getelementptr inbounds nuw i8, ptr %1, i64 64 @@ -187,14 +187,14 @@ __barray_mask_return.exit.i.8: ; preds = %__barray_check_boun %not_max.not.not.i.i.9 = icmp eq i64 %qalloc.i.i.9, -1 br i1 %not_max.not.not.i.i.9, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.9 -__barray_check_bounds.exit.i.9: ; preds = %__barray_mask_return.exit.i.8 +__barray_check_bounds.exit.i.9: ; preds = %cond_exit_20.i.8 tail call void @___reset(i64 %qalloc.i.i.9) %38 = load i64, ptr %2, align 4 %39 = and i64 %38, 512 %.not8 = icmp eq i64 %39, 0 - br i1 %.not8, label %panic.i.i, label %__barray_mask_return.exit.i.9 + br i1 %.not8, label %panic.i.i, label %cond_exit_20.i.9 -__barray_mask_return.exit.i.9: ; preds = %__barray_check_bounds.exit.i.9 +cond_exit_20.i.9: ; preds = %__barray_check_bounds.exit.i.9 %40 = and i64 %38, -513 store i64 %40, ptr %2, align 4 %41 = getelementptr inbounds nuw i8, ptr %1, i64 72 @@ -206,11 +206,11 @@ __barray_mask_return.exit.i.9: ; preds = %__barray_check_boun %43 = trunc i64 %42 to i1 br i1 %43, label %panic.i238.i, label %__barray_mask_borrow.exit.i -panic.i238.i: ; preds = %__barray_mask_return.exit.i.9 +panic.i238.i: ; preds = %cond_exit_20.i.9 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_mask_borrow.exit.i: ; preds = %__barray_mask_return.exit.i.9 +__barray_mask_borrow.exit.i: ; preds = %cond_exit_20.i.9 %44 = or disjoint i64 %42, 1 store i64 %44, ptr %2, align 4 %45 = load i64, ptr %1, align 4 @@ -243,8 +243,8 @@ __barray_mask_borrow.exit242.i: ; preds = %__barray_mask_retur tail call void @___rxy(i64 %52, double 0x400921FB54442D18, double 0.000000e+00) %53 = load i64, ptr %2, align 4 %54 = and i64 %53, 4 - %.not265.i = icmp eq i64 %54, 0 - br i1 %.not265.i, label %panic.i243.i, label %__barray_mask_return.exit244.i + %.not268.i = icmp eq i64 %54, 0 + br i1 %.not268.i, label %panic.i243.i, label %__barray_mask_return.exit244.i panic.i243.i: ; preds = %__barray_mask_borrow.exit242.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") @@ -256,8 +256,8 @@ __barray_mask_return.exit244.i: ; preds = %__barray_mask_borro store i64 %52, ptr %13, align 4 %56 = load i64, ptr %2, align 4 %57 = and i64 %56, 8 - %.not266.i = icmp eq i64 %57, 0 - br i1 %.not266.i, label %__barray_mask_borrow.exit246.i, label %panic.i245.i + %.not269.i = icmp eq i64 %57, 0 + br i1 %.not269.i, label %__barray_mask_borrow.exit246.i, label %panic.i245.i panic.i245.i: ; preds = %__barray_mask_return.exit244.i tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") @@ -270,8 +270,8 @@ __barray_mask_borrow.exit246.i: ; preds = %__barray_mask_retur tail call void @___rxy(i64 %59, double 0x400921FB54442D18, double 0.000000e+00) %60 = load i64, ptr %2, align 4 %61 = and i64 %60, 8 - %.not267.i = icmp eq i64 %61, 0 - br i1 %.not267.i, label %panic.i247.i, label %__barray_mask_return.exit248.i + %.not270.i = icmp eq i64 %61, 0 + br i1 %.not270.i, label %panic.i247.i, label %__barray_mask_return.exit248.i panic.i247.i: ; preds = %__barray_mask_borrow.exit246.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") @@ -283,8 +283,8 @@ __barray_mask_return.exit248.i: ; preds = %__barray_mask_borro store i64 %59, ptr %17, align 4 %63 = load i64, ptr %2, align 4 %64 = and i64 %63, 512 - %.not268.i = icmp eq i64 %64, 0 - br i1 %.not268.i, label %__barray_mask_borrow.exit250.i, label %panic.i249.i + %.not271.i = icmp eq i64 %64, 0 + br i1 %.not271.i, label %__barray_mask_borrow.exit250.i, label %panic.i249.i panic.i249.i: ; preds = %__barray_mask_return.exit248.i tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") @@ -297,8 +297,8 @@ __barray_mask_borrow.exit250.i: ; preds = %__barray_mask_retur tail call void @___rxy(i64 %66, double 0x400921FB54442D18, double 0.000000e+00) %67 = load i64, ptr %2, align 4 %68 = and i64 %67, 512 - %.not269.i = icmp eq i64 %68, 0 - br i1 %.not269.i, label %panic.i251.i, label %__barray_mask_return.exit252.i + %.not272.i = icmp eq i64 %68, 0 + br i1 %.not272.i, label %panic.i251.i, label %__barray_mask_return.exit252.i panic.i251.i: ; preds = %__barray_mask_borrow.exit250.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") @@ -314,7 +314,7 @@ __barray_mask_return.exit252.i: ; preds = %__barray_mask_borro store i64 -1, ptr %72, align 1 br label %__barray_check_bounds.exit.i.i.i -73: ; preds = %__barray_mask_return.exit.i.i +73: ; preds = %loop_body.i.i %74 = lshr i64 %.fca.2.extract82.i.i.i, 6 %75 = getelementptr i64, ptr %.fca.1.extract81.i.i.i, i64 %74 %76 = load i64, ptr %75, align 4 @@ -355,17 +355,16 @@ mask_block_err.i.i.i.i: ; preds = %mask_block_ok.i.i.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit.i.i.i: ; preds = %__barray_mask_return.exit.i.i, %__barray_mask_return.exit252.i - %.fca.2.extract82.i175.i.i = phi i64 [ 0, %__barray_mask_return.exit252.i ], [ %.fca.2.extract82.i.i.i, %__barray_mask_return.exit.i.i ] - %.fca.1.extract81.i174.i.i = phi ptr [ %2, %__barray_mask_return.exit252.i ], [ %.fca.1.extract81.i.i.i, %__barray_mask_return.exit.i.i ] - %.fca.0.extract80.i173.i.i = phi ptr [ %1, %__barray_mask_return.exit252.i ], [ %.fca.0.extract80.i.i.i, %__barray_mask_return.exit.i.i ] - %"306_0.sroa.15.0172.i.i" = phi i64 [ 0, %__barray_mask_return.exit252.i ], [ %95, %__barray_mask_return.exit.i.i ] - %.pn.i.i = phi { { ptr, ptr, i64 }, i64 } [ %70, %__barray_mask_return.exit252.i ], [ %.pn171.i.i, %__barray_mask_return.exit.i.i ] - %.pn171.i.i = insertvalue { { ptr, ptr, i64 }, i64 } %.pn.i.i, i64 %"306_0.sroa.15.0172.i.i", 1 - %95 = add nuw nsw i64 %"306_0.sroa.15.0172.i.i", 1 - %96 = add i64 %"306_0.sroa.15.0172.i.i", %.fca.2.extract82.i175.i.i +__barray_check_bounds.exit.i.i.i: ; preds = %loop_body.i.i, %__barray_mask_return.exit252.i + %.fca.2.extract82.i187.i.i = phi i64 [ 0, %__barray_mask_return.exit252.i ], [ %.fca.2.extract82.i.i.i, %loop_body.i.i ] + %.fca.1.extract81.i186.i.i = phi ptr [ %2, %__barray_mask_return.exit252.i ], [ %.fca.1.extract81.i.i.i, %loop_body.i.i ] + %.fca.0.extract80.i185.i.i = phi ptr [ %1, %__barray_mask_return.exit252.i ], [ %.fca.0.extract80.i.i.i, %loop_body.i.i ] + %"306_0.sroa.15.0184.i.i" = phi i64 [ 0, %__barray_mask_return.exit252.i ], [ %95, %loop_body.i.i ] + %.pn165183.i.i = phi { { ptr, ptr, i64 }, i64 } [ %70, %__barray_mask_return.exit252.i ], [ %110, %loop_body.i.i ] + %95 = add nuw nsw i64 %"306_0.sroa.15.0184.i.i", 1 + %96 = add i64 %"306_0.sroa.15.0184.i.i", %.fca.2.extract82.i187.i.i %97 = lshr i64 %96, 6 - %98 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i174.i.i, i64 %97 + %98 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i186.i.i, i64 %97 %99 = load i64, ptr %98, align 4 %100 = and i64 %96, 63 %101 = lshr i64 %99, %100 @@ -380,241 +379,242 @@ __barray_check_bounds.exit.i.i: ; preds = %__barray_check_boun %103 = shl nuw i64 1, %100 %104 = xor i64 %103, %99 store i64 %104, ptr %98, align 4 - %105 = getelementptr inbounds i64, ptr %.fca.0.extract80.i173.i.i, i64 %96 + %105 = getelementptr inbounds i64, ptr %.fca.0.extract80.i185.i.i, i64 %96 %106 = load i64, ptr %105, align 4 %lazy_measure.i.i = tail call i64 @___lazy_measure(i64 %106) tail call void @___qfree(i64 %106) %107 = load i64, ptr %72, align 4 - %108 = lshr i64 %107, %"306_0.sroa.15.0172.i.i" + %108 = lshr i64 %107, %"306_0.sroa.15.0184.i.i" %109 = trunc i64 %108 to i1 - br i1 %109, label %__barray_mask_return.exit.i.i, label %panic.i.i.i + br i1 %109, label %loop_body.i.i, label %panic.i.i.i panic.i.i.i: ; preds = %__barray_check_bounds.exit.i.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit.i.i: ; preds = %__barray_check_bounds.exit.i.i +loop_body.i.i: ; preds = %__barray_check_bounds.exit.i.i %"371_054.fca.1.insert.i.i" = insertvalue { i1, i64, i1 } { i1 true, i64 poison, i1 undef }, i64 %lazy_measure.i.i, 1 %"371_054.fca.2.insert.i.i" = insertvalue { i1, i64, i1 } %"371_054.fca.1.insert.i.i", i1 undef, 2 - %110 = shl nuw nsw i64 1, %"306_0.sroa.15.0172.i.i" - %111 = xor i64 %107, %110 - store i64 %111, ptr %72, align 4 - %112 = getelementptr inbounds nuw { i1, i64, i1 }, ptr %71, i64 %"306_0.sroa.15.0172.i.i" - store { i1, i64, i1 } %"371_054.fca.2.insert.i.i", ptr %112, align 4 - %113 = extractvalue { { ptr, ptr, i64 }, i64 } %.pn.i.i, 0 - %.fca.0.extract80.i.i.i = extractvalue { ptr, ptr, i64 } %113, 0 - %.fca.1.extract81.i.i.i = extractvalue { ptr, ptr, i64 } %113, 1 - %.fca.2.extract82.i.i.i = extractvalue { ptr, ptr, i64 } %113, 2 - %.not.i.i = icmp eq i64 %"306_0.sroa.15.0172.i.i", 9 - br i1 %.not.i.i, label %73, label %__barray_check_bounds.exit.i.i.i + %110 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn165183.i.i, i64 %95, 1 + %111 = shl nuw nsw i64 1, %"306_0.sroa.15.0184.i.i" + %112 = xor i64 %107, %111 + store i64 %112, ptr %72, align 4 + %113 = getelementptr inbounds nuw { i1, i64, i1 }, ptr %71, i64 %"306_0.sroa.15.0184.i.i" + store { i1, i64, i1 } %"371_054.fca.2.insert.i.i", ptr %113, align 4 + %114 = extractvalue { { ptr, ptr, i64 }, i64 } %.pn165183.i.i, 0 + %.fca.0.extract80.i.i.i = extractvalue { ptr, ptr, i64 } %114, 0 + %.fca.1.extract81.i.i.i = extractvalue { ptr, ptr, i64 } %114, 1 + %.fca.2.extract82.i.i.i = extractvalue { ptr, ptr, i64 } %114, 2 + %exitcond.not.i.i = icmp eq i64 %95, 10 + br i1 %exitcond.not.i.i, label %73, label %__barray_check_bounds.exit.i.i.i "__hugr__.$measure_array$$n(10).280.exit.i": ; preds = %91, %73 tail call void @heap_free(ptr %.fca.0.extract80.i.i.i) tail call void @heap_free(ptr nonnull %.fca.1.extract81.i.i.i) - %114 = load i64, ptr %72, align 4 - %115 = trunc i64 %114 to i1 - br i1 %115, label %cond_exit_89.thread.i, label %__barray_mask_borrow.exit258.i + %115 = load i64, ptr %72, align 4 + %116 = trunc i64 %115 to i1 + br i1 %116, label %cond_exit_89.thread.i, label %__barray_mask_borrow.exit259.i mask_block_err.i.i: ; preds = %cond_exit_89.thread.9.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_mask_borrow.exit258.i: ; preds = %"__hugr__.$measure_array$$n(10).280.exit.i" - %116 = or disjoint i64 %114, 1 - store i64 %116, ptr %72, align 4 - %117 = load { i1, i64, i1 }, ptr %71, align 4 - %.fca.0.extract167.i = extractvalue { i1, i64, i1 } %117, 0 +__barray_mask_borrow.exit259.i: ; preds = %"__hugr__.$measure_array$$n(10).280.exit.i" + %117 = or disjoint i64 %115, 1 + store i64 %117, ptr %72, align 4 + %118 = load { i1, i64, i1 }, ptr %71, align 4 + %.fca.0.extract167.i = extractvalue { i1, i64, i1 } %118, 0 br i1 %.fca.0.extract167.i, label %cond_392_case_1.i, label %cond_exit_89.thread.i -cond_exit_89.thread.i: ; preds = %cond_392_case_1.i, %__barray_mask_borrow.exit258.i, %"__hugr__.$measure_array$$n(10).280.exit.i" - %118 = phi i64 [ %.pre.i, %cond_392_case_1.i ], [ %116, %__barray_mask_borrow.exit258.i ], [ %114, %"__hugr__.$measure_array$$n(10).280.exit.i" ] - %119 = and i64 %118, 2 - %.not287.i = icmp eq i64 %119, 0 - br i1 %.not287.i, label %__barray_mask_borrow.exit258.1.i, label %cond_exit_89.thread.1.i - -__barray_mask_borrow.exit258.1.i: ; preds = %cond_exit_89.thread.i - %120 = or disjoint i64 %118, 2 - store i64 %120, ptr %72, align 4 - %121 = getelementptr inbounds nuw i8, ptr %71, i64 24 - %122 = load { i1, i64, i1 }, ptr %121, align 4 - %.fca.0.extract167.1.i = extractvalue { i1, i64, i1 } %122, 0 +cond_exit_89.thread.i: ; preds = %cond_392_case_1.i, %__barray_mask_borrow.exit259.i, %"__hugr__.$measure_array$$n(10).280.exit.i" + %119 = phi i64 [ %.pre.i, %cond_392_case_1.i ], [ %117, %__barray_mask_borrow.exit259.i ], [ %115, %"__hugr__.$measure_array$$n(10).280.exit.i" ] + %120 = and i64 %119, 2 + %.not290.i = icmp eq i64 %120, 0 + br i1 %.not290.i, label %__barray_mask_borrow.exit259.1.i, label %cond_exit_89.thread.1.i + +__barray_mask_borrow.exit259.1.i: ; preds = %cond_exit_89.thread.i + %121 = or disjoint i64 %119, 2 + store i64 %121, ptr %72, align 4 + %122 = getelementptr inbounds nuw i8, ptr %71, i64 24 + %123 = load { i1, i64, i1 }, ptr %122, align 4 + %.fca.0.extract167.1.i = extractvalue { i1, i64, i1 } %123, 0 br i1 %.fca.0.extract167.1.i, label %cond_392_case_1.1.i, label %cond_exit_89.thread.1.i -cond_392_case_1.1.i: ; preds = %__barray_mask_borrow.exit258.1.i - %.fca.1.extract.1.i = extractvalue { i1, i64, i1 } %122, 1 +cond_392_case_1.1.i: ; preds = %__barray_mask_borrow.exit259.1.i + %.fca.1.extract.1.i = extractvalue { i1, i64, i1 } %123, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.1.i) - %.pre278.i = load i64, ptr %72, align 4 + %.pre281.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.1.i -cond_exit_89.thread.1.i: ; preds = %cond_392_case_1.1.i, %__barray_mask_borrow.exit258.1.i, %cond_exit_89.thread.i - %123 = phi i64 [ %.pre278.i, %cond_392_case_1.1.i ], [ %120, %__barray_mask_borrow.exit258.1.i ], [ %118, %cond_exit_89.thread.i ] - %124 = and i64 %123, 4 - %.not288.i = icmp eq i64 %124, 0 - br i1 %.not288.i, label %__barray_mask_borrow.exit258.2.i, label %cond_exit_89.thread.2.i - -__barray_mask_borrow.exit258.2.i: ; preds = %cond_exit_89.thread.1.i - %125 = or disjoint i64 %123, 4 - store i64 %125, ptr %72, align 4 - %126 = getelementptr inbounds nuw i8, ptr %71, i64 48 - %127 = load { i1, i64, i1 }, ptr %126, align 4 - %.fca.0.extract167.2.i = extractvalue { i1, i64, i1 } %127, 0 +cond_exit_89.thread.1.i: ; preds = %cond_392_case_1.1.i, %__barray_mask_borrow.exit259.1.i, %cond_exit_89.thread.i + %124 = phi i64 [ %.pre281.i, %cond_392_case_1.1.i ], [ %121, %__barray_mask_borrow.exit259.1.i ], [ %119, %cond_exit_89.thread.i ] + %125 = and i64 %124, 4 + %.not291.i = icmp eq i64 %125, 0 + br i1 %.not291.i, label %__barray_mask_borrow.exit259.2.i, label %cond_exit_89.thread.2.i + +__barray_mask_borrow.exit259.2.i: ; preds = %cond_exit_89.thread.1.i + %126 = or disjoint i64 %124, 4 + store i64 %126, ptr %72, align 4 + %127 = getelementptr inbounds nuw i8, ptr %71, i64 48 + %128 = load { i1, i64, i1 }, ptr %127, align 4 + %.fca.0.extract167.2.i = extractvalue { i1, i64, i1 } %128, 0 br i1 %.fca.0.extract167.2.i, label %cond_392_case_1.2.i, label %cond_exit_89.thread.2.i -cond_392_case_1.2.i: ; preds = %__barray_mask_borrow.exit258.2.i - %.fca.1.extract.2.i = extractvalue { i1, i64, i1 } %127, 1 +cond_392_case_1.2.i: ; preds = %__barray_mask_borrow.exit259.2.i + %.fca.1.extract.2.i = extractvalue { i1, i64, i1 } %128, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.2.i) - %.pre279.i = load i64, ptr %72, align 4 + %.pre282.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.2.i -cond_exit_89.thread.2.i: ; preds = %cond_392_case_1.2.i, %__barray_mask_borrow.exit258.2.i, %cond_exit_89.thread.1.i - %128 = phi i64 [ %.pre279.i, %cond_392_case_1.2.i ], [ %125, %__barray_mask_borrow.exit258.2.i ], [ %123, %cond_exit_89.thread.1.i ] - %129 = and i64 %128, 8 - %.not289.i = icmp eq i64 %129, 0 - br i1 %.not289.i, label %__barray_mask_borrow.exit258.3.i, label %cond_exit_89.thread.3.i - -__barray_mask_borrow.exit258.3.i: ; preds = %cond_exit_89.thread.2.i - %130 = or disjoint i64 %128, 8 - store i64 %130, ptr %72, align 4 - %131 = getelementptr inbounds nuw i8, ptr %71, i64 72 - %132 = load { i1, i64, i1 }, ptr %131, align 4 - %.fca.0.extract167.3.i = extractvalue { i1, i64, i1 } %132, 0 +cond_exit_89.thread.2.i: ; preds = %cond_392_case_1.2.i, %__barray_mask_borrow.exit259.2.i, %cond_exit_89.thread.1.i + %129 = phi i64 [ %.pre282.i, %cond_392_case_1.2.i ], [ %126, %__barray_mask_borrow.exit259.2.i ], [ %124, %cond_exit_89.thread.1.i ] + %130 = and i64 %129, 8 + %.not292.i = icmp eq i64 %130, 0 + br i1 %.not292.i, label %__barray_mask_borrow.exit259.3.i, label %cond_exit_89.thread.3.i + +__barray_mask_borrow.exit259.3.i: ; preds = %cond_exit_89.thread.2.i + %131 = or disjoint i64 %129, 8 + store i64 %131, ptr %72, align 4 + %132 = getelementptr inbounds nuw i8, ptr %71, i64 72 + %133 = load { i1, i64, i1 }, ptr %132, align 4 + %.fca.0.extract167.3.i = extractvalue { i1, i64, i1 } %133, 0 br i1 %.fca.0.extract167.3.i, label %cond_392_case_1.3.i, label %cond_exit_89.thread.3.i -cond_392_case_1.3.i: ; preds = %__barray_mask_borrow.exit258.3.i - %.fca.1.extract.3.i = extractvalue { i1, i64, i1 } %132, 1 +cond_392_case_1.3.i: ; preds = %__barray_mask_borrow.exit259.3.i + %.fca.1.extract.3.i = extractvalue { i1, i64, i1 } %133, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.3.i) - %.pre280.i = load i64, ptr %72, align 4 + %.pre283.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.3.i -cond_exit_89.thread.3.i: ; preds = %cond_392_case_1.3.i, %__barray_mask_borrow.exit258.3.i, %cond_exit_89.thread.2.i - %133 = phi i64 [ %.pre280.i, %cond_392_case_1.3.i ], [ %130, %__barray_mask_borrow.exit258.3.i ], [ %128, %cond_exit_89.thread.2.i ] - %134 = and i64 %133, 16 - %.not290.i = icmp eq i64 %134, 0 - br i1 %.not290.i, label %__barray_mask_borrow.exit258.4.i, label %cond_exit_89.thread.4.i - -__barray_mask_borrow.exit258.4.i: ; preds = %cond_exit_89.thread.3.i - %135 = or disjoint i64 %133, 16 - store i64 %135, ptr %72, align 4 - %136 = getelementptr inbounds nuw i8, ptr %71, i64 96 - %137 = load { i1, i64, i1 }, ptr %136, align 4 - %.fca.0.extract167.4.i = extractvalue { i1, i64, i1 } %137, 0 +cond_exit_89.thread.3.i: ; preds = %cond_392_case_1.3.i, %__barray_mask_borrow.exit259.3.i, %cond_exit_89.thread.2.i + %134 = phi i64 [ %.pre283.i, %cond_392_case_1.3.i ], [ %131, %__barray_mask_borrow.exit259.3.i ], [ %129, %cond_exit_89.thread.2.i ] + %135 = and i64 %134, 16 + %.not293.i = icmp eq i64 %135, 0 + br i1 %.not293.i, label %__barray_mask_borrow.exit259.4.i, label %cond_exit_89.thread.4.i + +__barray_mask_borrow.exit259.4.i: ; preds = %cond_exit_89.thread.3.i + %136 = or disjoint i64 %134, 16 + store i64 %136, ptr %72, align 4 + %137 = getelementptr inbounds nuw i8, ptr %71, i64 96 + %138 = load { i1, i64, i1 }, ptr %137, align 4 + %.fca.0.extract167.4.i = extractvalue { i1, i64, i1 } %138, 0 br i1 %.fca.0.extract167.4.i, label %cond_392_case_1.4.i, label %cond_exit_89.thread.4.i -cond_392_case_1.4.i: ; preds = %__barray_mask_borrow.exit258.4.i - %.fca.1.extract.4.i = extractvalue { i1, i64, i1 } %137, 1 +cond_392_case_1.4.i: ; preds = %__barray_mask_borrow.exit259.4.i + %.fca.1.extract.4.i = extractvalue { i1, i64, i1 } %138, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.4.i) - %.pre281.i = load i64, ptr %72, align 4 + %.pre284.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.4.i -cond_exit_89.thread.4.i: ; preds = %cond_392_case_1.4.i, %__barray_mask_borrow.exit258.4.i, %cond_exit_89.thread.3.i - %138 = phi i64 [ %.pre281.i, %cond_392_case_1.4.i ], [ %135, %__barray_mask_borrow.exit258.4.i ], [ %133, %cond_exit_89.thread.3.i ] - %139 = and i64 %138, 32 - %.not291.i = icmp eq i64 %139, 0 - br i1 %.not291.i, label %__barray_mask_borrow.exit258.5.i, label %cond_exit_89.thread.5.i - -__barray_mask_borrow.exit258.5.i: ; preds = %cond_exit_89.thread.4.i - %140 = or disjoint i64 %138, 32 - store i64 %140, ptr %72, align 4 - %141 = getelementptr inbounds nuw i8, ptr %71, i64 120 - %142 = load { i1, i64, i1 }, ptr %141, align 4 - %.fca.0.extract167.5.i = extractvalue { i1, i64, i1 } %142, 0 +cond_exit_89.thread.4.i: ; preds = %cond_392_case_1.4.i, %__barray_mask_borrow.exit259.4.i, %cond_exit_89.thread.3.i + %139 = phi i64 [ %.pre284.i, %cond_392_case_1.4.i ], [ %136, %__barray_mask_borrow.exit259.4.i ], [ %134, %cond_exit_89.thread.3.i ] + %140 = and i64 %139, 32 + %.not294.i = icmp eq i64 %140, 0 + br i1 %.not294.i, label %__barray_mask_borrow.exit259.5.i, label %cond_exit_89.thread.5.i + +__barray_mask_borrow.exit259.5.i: ; preds = %cond_exit_89.thread.4.i + %141 = or disjoint i64 %139, 32 + store i64 %141, ptr %72, align 4 + %142 = getelementptr inbounds nuw i8, ptr %71, i64 120 + %143 = load { i1, i64, i1 }, ptr %142, align 4 + %.fca.0.extract167.5.i = extractvalue { i1, i64, i1 } %143, 0 br i1 %.fca.0.extract167.5.i, label %cond_392_case_1.5.i, label %cond_exit_89.thread.5.i -cond_392_case_1.5.i: ; preds = %__barray_mask_borrow.exit258.5.i - %.fca.1.extract.5.i = extractvalue { i1, i64, i1 } %142, 1 +cond_392_case_1.5.i: ; preds = %__barray_mask_borrow.exit259.5.i + %.fca.1.extract.5.i = extractvalue { i1, i64, i1 } %143, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.5.i) - %.pre282.i = load i64, ptr %72, align 4 + %.pre285.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.5.i -cond_exit_89.thread.5.i: ; preds = %cond_392_case_1.5.i, %__barray_mask_borrow.exit258.5.i, %cond_exit_89.thread.4.i - %143 = phi i64 [ %.pre282.i, %cond_392_case_1.5.i ], [ %140, %__barray_mask_borrow.exit258.5.i ], [ %138, %cond_exit_89.thread.4.i ] - %144 = and i64 %143, 64 - %.not292.i = icmp eq i64 %144, 0 - br i1 %.not292.i, label %__barray_mask_borrow.exit258.6.i, label %cond_exit_89.thread.6.i - -__barray_mask_borrow.exit258.6.i: ; preds = %cond_exit_89.thread.5.i - %145 = or disjoint i64 %143, 64 - store i64 %145, ptr %72, align 4 - %146 = getelementptr inbounds nuw i8, ptr %71, i64 144 - %147 = load { i1, i64, i1 }, ptr %146, align 4 - %.fca.0.extract167.6.i = extractvalue { i1, i64, i1 } %147, 0 +cond_exit_89.thread.5.i: ; preds = %cond_392_case_1.5.i, %__barray_mask_borrow.exit259.5.i, %cond_exit_89.thread.4.i + %144 = phi i64 [ %.pre285.i, %cond_392_case_1.5.i ], [ %141, %__barray_mask_borrow.exit259.5.i ], [ %139, %cond_exit_89.thread.4.i ] + %145 = and i64 %144, 64 + %.not295.i = icmp eq i64 %145, 0 + br i1 %.not295.i, label %__barray_mask_borrow.exit259.6.i, label %cond_exit_89.thread.6.i + +__barray_mask_borrow.exit259.6.i: ; preds = %cond_exit_89.thread.5.i + %146 = or disjoint i64 %144, 64 + store i64 %146, ptr %72, align 4 + %147 = getelementptr inbounds nuw i8, ptr %71, i64 144 + %148 = load { i1, i64, i1 }, ptr %147, align 4 + %.fca.0.extract167.6.i = extractvalue { i1, i64, i1 } %148, 0 br i1 %.fca.0.extract167.6.i, label %cond_392_case_1.6.i, label %cond_exit_89.thread.6.i -cond_392_case_1.6.i: ; preds = %__barray_mask_borrow.exit258.6.i - %.fca.1.extract.6.i = extractvalue { i1, i64, i1 } %147, 1 +cond_392_case_1.6.i: ; preds = %__barray_mask_borrow.exit259.6.i + %.fca.1.extract.6.i = extractvalue { i1, i64, i1 } %148, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.6.i) - %.pre283.i = load i64, ptr %72, align 4 + %.pre286.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.6.i -cond_exit_89.thread.6.i: ; preds = %cond_392_case_1.6.i, %__barray_mask_borrow.exit258.6.i, %cond_exit_89.thread.5.i - %148 = phi i64 [ %.pre283.i, %cond_392_case_1.6.i ], [ %145, %__barray_mask_borrow.exit258.6.i ], [ %143, %cond_exit_89.thread.5.i ] - %149 = and i64 %148, 128 - %.not293.i = icmp eq i64 %149, 0 - br i1 %.not293.i, label %__barray_mask_borrow.exit258.7.i, label %cond_exit_89.thread.7.i - -__barray_mask_borrow.exit258.7.i: ; preds = %cond_exit_89.thread.6.i - %150 = or disjoint i64 %148, 128 - store i64 %150, ptr %72, align 4 - %151 = getelementptr inbounds nuw i8, ptr %71, i64 168 - %152 = load { i1, i64, i1 }, ptr %151, align 4 - %.fca.0.extract167.7.i = extractvalue { i1, i64, i1 } %152, 0 +cond_exit_89.thread.6.i: ; preds = %cond_392_case_1.6.i, %__barray_mask_borrow.exit259.6.i, %cond_exit_89.thread.5.i + %149 = phi i64 [ %.pre286.i, %cond_392_case_1.6.i ], [ %146, %__barray_mask_borrow.exit259.6.i ], [ %144, %cond_exit_89.thread.5.i ] + %150 = and i64 %149, 128 + %.not296.i = icmp eq i64 %150, 0 + br i1 %.not296.i, label %__barray_mask_borrow.exit259.7.i, label %cond_exit_89.thread.7.i + +__barray_mask_borrow.exit259.7.i: ; preds = %cond_exit_89.thread.6.i + %151 = or disjoint i64 %149, 128 + store i64 %151, ptr %72, align 4 + %152 = getelementptr inbounds nuw i8, ptr %71, i64 168 + %153 = load { i1, i64, i1 }, ptr %152, align 4 + %.fca.0.extract167.7.i = extractvalue { i1, i64, i1 } %153, 0 br i1 %.fca.0.extract167.7.i, label %cond_392_case_1.7.i, label %cond_exit_89.thread.7.i -cond_392_case_1.7.i: ; preds = %__barray_mask_borrow.exit258.7.i - %.fca.1.extract.7.i = extractvalue { i1, i64, i1 } %152, 1 +cond_392_case_1.7.i: ; preds = %__barray_mask_borrow.exit259.7.i + %.fca.1.extract.7.i = extractvalue { i1, i64, i1 } %153, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.7.i) - %.pre284.i = load i64, ptr %72, align 4 + %.pre287.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.7.i -cond_exit_89.thread.7.i: ; preds = %cond_392_case_1.7.i, %__barray_mask_borrow.exit258.7.i, %cond_exit_89.thread.6.i - %153 = phi i64 [ %.pre284.i, %cond_392_case_1.7.i ], [ %150, %__barray_mask_borrow.exit258.7.i ], [ %148, %cond_exit_89.thread.6.i ] - %154 = and i64 %153, 256 - %.not294.i = icmp eq i64 %154, 0 - br i1 %.not294.i, label %__barray_mask_borrow.exit258.8.i, label %cond_exit_89.thread.8.i - -__barray_mask_borrow.exit258.8.i: ; preds = %cond_exit_89.thread.7.i - %155 = or disjoint i64 %153, 256 - store i64 %155, ptr %72, align 4 - %156 = getelementptr inbounds nuw i8, ptr %71, i64 192 - %157 = load { i1, i64, i1 }, ptr %156, align 4 - %.fca.0.extract167.8.i = extractvalue { i1, i64, i1 } %157, 0 +cond_exit_89.thread.7.i: ; preds = %cond_392_case_1.7.i, %__barray_mask_borrow.exit259.7.i, %cond_exit_89.thread.6.i + %154 = phi i64 [ %.pre287.i, %cond_392_case_1.7.i ], [ %151, %__barray_mask_borrow.exit259.7.i ], [ %149, %cond_exit_89.thread.6.i ] + %155 = and i64 %154, 256 + %.not297.i = icmp eq i64 %155, 0 + br i1 %.not297.i, label %__barray_mask_borrow.exit259.8.i, label %cond_exit_89.thread.8.i + +__barray_mask_borrow.exit259.8.i: ; preds = %cond_exit_89.thread.7.i + %156 = or disjoint i64 %154, 256 + store i64 %156, ptr %72, align 4 + %157 = getelementptr inbounds nuw i8, ptr %71, i64 192 + %158 = load { i1, i64, i1 }, ptr %157, align 4 + %.fca.0.extract167.8.i = extractvalue { i1, i64, i1 } %158, 0 br i1 %.fca.0.extract167.8.i, label %cond_392_case_1.8.i, label %cond_exit_89.thread.8.i -cond_392_case_1.8.i: ; preds = %__barray_mask_borrow.exit258.8.i - %.fca.1.extract.8.i = extractvalue { i1, i64, i1 } %157, 1 +cond_392_case_1.8.i: ; preds = %__barray_mask_borrow.exit259.8.i + %.fca.1.extract.8.i = extractvalue { i1, i64, i1 } %158, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.8.i) - %.pre285.i = load i64, ptr %72, align 4 + %.pre288.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.8.i -cond_exit_89.thread.8.i: ; preds = %cond_392_case_1.8.i, %__barray_mask_borrow.exit258.8.i, %cond_exit_89.thread.7.i - %158 = phi i64 [ %.pre285.i, %cond_392_case_1.8.i ], [ %155, %__barray_mask_borrow.exit258.8.i ], [ %153, %cond_exit_89.thread.7.i ] - %159 = and i64 %158, 512 - %.not295.i = icmp eq i64 %159, 0 - br i1 %.not295.i, label %__barray_mask_borrow.exit258.9.i, label %cond_exit_89.thread.9.i - -__barray_mask_borrow.exit258.9.i: ; preds = %cond_exit_89.thread.8.i - %160 = or disjoint i64 %158, 512 - store i64 %160, ptr %72, align 4 - %161 = getelementptr inbounds nuw i8, ptr %71, i64 216 - %162 = load { i1, i64, i1 }, ptr %161, align 4 - %.fca.0.extract167.9.i = extractvalue { i1, i64, i1 } %162, 0 +cond_exit_89.thread.8.i: ; preds = %cond_392_case_1.8.i, %__barray_mask_borrow.exit259.8.i, %cond_exit_89.thread.7.i + %159 = phi i64 [ %.pre288.i, %cond_392_case_1.8.i ], [ %156, %__barray_mask_borrow.exit259.8.i ], [ %154, %cond_exit_89.thread.7.i ] + %160 = and i64 %159, 512 + %.not298.i = icmp eq i64 %160, 0 + br i1 %.not298.i, label %__barray_mask_borrow.exit259.9.i, label %cond_exit_89.thread.9.i + +__barray_mask_borrow.exit259.9.i: ; preds = %cond_exit_89.thread.8.i + %161 = or disjoint i64 %159, 512 + store i64 %161, ptr %72, align 4 + %162 = getelementptr inbounds nuw i8, ptr %71, i64 216 + %163 = load { i1, i64, i1 }, ptr %162, align 4 + %.fca.0.extract167.9.i = extractvalue { i1, i64, i1 } %163, 0 br i1 %.fca.0.extract167.9.i, label %cond_392_case_1.9.i, label %cond_exit_89.thread.9.i -cond_392_case_1.9.i: ; preds = %__barray_mask_borrow.exit258.9.i - %.fca.1.extract.9.i = extractvalue { i1, i64, i1 } %162, 1 +cond_392_case_1.9.i: ; preds = %__barray_mask_borrow.exit259.9.i + %.fca.1.extract.9.i = extractvalue { i1, i64, i1 } %163, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.9.i) - %.pre286.i = load i64, ptr %72, align 4 + %.pre289.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.9.i -cond_exit_89.thread.9.i: ; preds = %cond_392_case_1.9.i, %__barray_mask_borrow.exit258.9.i, %cond_exit_89.thread.8.i - %163 = phi i64 [ %.pre286.i, %cond_392_case_1.9.i ], [ %160, %__barray_mask_borrow.exit258.9.i ], [ %158, %cond_exit_89.thread.8.i ] - %164 = or i64 %163, -1024 - store i64 %164, ptr %72, align 4 - %165 = icmp eq i64 %164, -1 - br i1 %165, label %__hugr__.main.1.exit, label %mask_block_err.i.i +cond_exit_89.thread.9.i: ; preds = %cond_392_case_1.9.i, %__barray_mask_borrow.exit259.9.i, %cond_exit_89.thread.8.i + %164 = phi i64 [ %.pre289.i, %cond_392_case_1.9.i ], [ %161, %__barray_mask_borrow.exit259.9.i ], [ %159, %cond_exit_89.thread.8.i ] + %165 = or i64 %164, -1024 + store i64 %165, ptr %72, align 4 + %166 = icmp eq i64 %165, -1 + br i1 %166, label %__hugr__.main.1.exit, label %mask_block_err.i.i -cond_392_case_1.i: ; preds = %__barray_mask_borrow.exit258.i - %.fca.1.extract.i = extractvalue { i1, i64, i1 } %117, 1 +cond_392_case_1.i: ; preds = %__barray_mask_borrow.exit259.i + %.fca.1.extract.i = extractvalue { i1, i64, i1 } %118, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.i) %.pre.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.i @@ -622,8 +622,8 @@ cond_392_case_1.i: ; preds = %__barray_mask_borro __hugr__.main.1.exit: ; preds = %cond_exit_89.thread.9.i tail call void @heap_free(ptr %71) tail call void @heap_free(ptr nonnull %72) - %166 = tail call i64 @teardown() - ret i64 %166 + %167 = tail call i64 @teardown() + ret i64 %167 } declare void @setup(i64) local_unnamed_addr diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-discard_qb_array/discard_qb_array_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-discard_qb_array/discard_qb_array_x86_64-windows-msvc index b5708c2ea..12ac202e7 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-discard_qb_array/discard_qb_array_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-discard_qb_array/discard_qb_array_x86_64-windows-msvc @@ -31,7 +31,7 @@ entry: %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 br i1 %not_max.not.not.i.i, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i -cond_213_case_0.i.i: ; preds = %__barray_mask_return.exit.i.8, %__barray_mask_return.exit.i.7, %__barray_mask_return.exit.i.6, %__barray_mask_return.exit.i.5, %__barray_mask_return.exit.i.4, %__barray_mask_return.exit.i.3, %__barray_mask_return.exit.i.2, %__barray_mask_return.exit.i.1, %__barray_mask_return.exit.i, %entry +cond_213_case_0.i.i: ; preds = %cond_exit_20.i.8, %cond_exit_20.i.7, %cond_exit_20.i.6, %cond_exit_20.i.5, %cond_exit_20.i.4, %cond_exit_20.i.3, %cond_exit_20.i.2, %cond_exit_20.i.1, %cond_exit_20.i, %entry tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable @@ -39,13 +39,13 @@ __barray_check_bounds.exit.i: ; preds = %entry tail call void @___reset(i64 %qalloc.i.i) %3 = load i64, ptr %2, align 4 %4 = trunc i64 %3 to i1 - br i1 %4, label %__barray_mask_return.exit.i, label %panic.i.i + br i1 %4, label %cond_exit_20.i, label %panic.i.i panic.i.i: ; preds = %__barray_check_bounds.exit.i.9, %__barray_check_bounds.exit.i.8, %__barray_check_bounds.exit.i.7, %__barray_check_bounds.exit.i.6, %__barray_check_bounds.exit.i.5, %__barray_check_bounds.exit.i.4, %__barray_check_bounds.exit.i.3, %__barray_check_bounds.exit.i.2, %__barray_check_bounds.exit.i.1, %__barray_check_bounds.exit.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit.i: ; preds = %__barray_check_bounds.exit.i +cond_exit_20.i: ; preds = %__barray_check_bounds.exit.i %5 = and i64 %3, -2 store i64 %5, ptr %2, align 4 store i64 %qalloc.i.i, ptr %1, align 4 @@ -53,14 +53,14 @@ __barray_mask_return.exit.i: ; preds = %__barray_check_boun %not_max.not.not.i.i.1 = icmp eq i64 %qalloc.i.i.1, -1 br i1 %not_max.not.not.i.i.1, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.1 -__barray_check_bounds.exit.i.1: ; preds = %__barray_mask_return.exit.i +__barray_check_bounds.exit.i.1: ; preds = %cond_exit_20.i tail call void @___reset(i64 %qalloc.i.i.1) %6 = load i64, ptr %2, align 4 %7 = and i64 %6, 2 %.not = icmp eq i64 %7, 0 - br i1 %.not, label %panic.i.i, label %__barray_mask_return.exit.i.1 + br i1 %.not, label %panic.i.i, label %cond_exit_20.i.1 -__barray_mask_return.exit.i.1: ; preds = %__barray_check_bounds.exit.i.1 +cond_exit_20.i.1: ; preds = %__barray_check_bounds.exit.i.1 %8 = and i64 %6, -3 store i64 %8, ptr %2, align 4 %9 = getelementptr inbounds nuw i8, ptr %1, i64 8 @@ -69,14 +69,14 @@ __barray_mask_return.exit.i.1: ; preds = %__barray_check_boun %not_max.not.not.i.i.2 = icmp eq i64 %qalloc.i.i.2, -1 br i1 %not_max.not.not.i.i.2, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.2 -__barray_check_bounds.exit.i.2: ; preds = %__barray_mask_return.exit.i.1 +__barray_check_bounds.exit.i.2: ; preds = %cond_exit_20.i.1 tail call void @___reset(i64 %qalloc.i.i.2) %10 = load i64, ptr %2, align 4 %11 = and i64 %10, 4 %.not1 = icmp eq i64 %11, 0 - br i1 %.not1, label %panic.i.i, label %__barray_mask_return.exit.i.2 + br i1 %.not1, label %panic.i.i, label %cond_exit_20.i.2 -__barray_mask_return.exit.i.2: ; preds = %__barray_check_bounds.exit.i.2 +cond_exit_20.i.2: ; preds = %__barray_check_bounds.exit.i.2 %12 = and i64 %10, -5 store i64 %12, ptr %2, align 4 %13 = getelementptr inbounds nuw i8, ptr %1, i64 16 @@ -85,14 +85,14 @@ __barray_mask_return.exit.i.2: ; preds = %__barray_check_boun %not_max.not.not.i.i.3 = icmp eq i64 %qalloc.i.i.3, -1 br i1 %not_max.not.not.i.i.3, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.3 -__barray_check_bounds.exit.i.3: ; preds = %__barray_mask_return.exit.i.2 +__barray_check_bounds.exit.i.3: ; preds = %cond_exit_20.i.2 tail call void @___reset(i64 %qalloc.i.i.3) %14 = load i64, ptr %2, align 4 %15 = and i64 %14, 8 %.not2 = icmp eq i64 %15, 0 - br i1 %.not2, label %panic.i.i, label %__barray_mask_return.exit.i.3 + br i1 %.not2, label %panic.i.i, label %cond_exit_20.i.3 -__barray_mask_return.exit.i.3: ; preds = %__barray_check_bounds.exit.i.3 +cond_exit_20.i.3: ; preds = %__barray_check_bounds.exit.i.3 %16 = and i64 %14, -9 store i64 %16, ptr %2, align 4 %17 = getelementptr inbounds nuw i8, ptr %1, i64 24 @@ -101,14 +101,14 @@ __barray_mask_return.exit.i.3: ; preds = %__barray_check_boun %not_max.not.not.i.i.4 = icmp eq i64 %qalloc.i.i.4, -1 br i1 %not_max.not.not.i.i.4, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.4 -__barray_check_bounds.exit.i.4: ; preds = %__barray_mask_return.exit.i.3 +__barray_check_bounds.exit.i.4: ; preds = %cond_exit_20.i.3 tail call void @___reset(i64 %qalloc.i.i.4) %18 = load i64, ptr %2, align 4 %19 = and i64 %18, 16 %.not3 = icmp eq i64 %19, 0 - br i1 %.not3, label %panic.i.i, label %__barray_mask_return.exit.i.4 + br i1 %.not3, label %panic.i.i, label %cond_exit_20.i.4 -__barray_mask_return.exit.i.4: ; preds = %__barray_check_bounds.exit.i.4 +cond_exit_20.i.4: ; preds = %__barray_check_bounds.exit.i.4 %20 = and i64 %18, -17 store i64 %20, ptr %2, align 4 %21 = getelementptr inbounds nuw i8, ptr %1, i64 32 @@ -117,14 +117,14 @@ __barray_mask_return.exit.i.4: ; preds = %__barray_check_boun %not_max.not.not.i.i.5 = icmp eq i64 %qalloc.i.i.5, -1 br i1 %not_max.not.not.i.i.5, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.5 -__barray_check_bounds.exit.i.5: ; preds = %__barray_mask_return.exit.i.4 +__barray_check_bounds.exit.i.5: ; preds = %cond_exit_20.i.4 tail call void @___reset(i64 %qalloc.i.i.5) %22 = load i64, ptr %2, align 4 %23 = and i64 %22, 32 %.not4 = icmp eq i64 %23, 0 - br i1 %.not4, label %panic.i.i, label %__barray_mask_return.exit.i.5 + br i1 %.not4, label %panic.i.i, label %cond_exit_20.i.5 -__barray_mask_return.exit.i.5: ; preds = %__barray_check_bounds.exit.i.5 +cond_exit_20.i.5: ; preds = %__barray_check_bounds.exit.i.5 %24 = and i64 %22, -33 store i64 %24, ptr %2, align 4 %25 = getelementptr inbounds nuw i8, ptr %1, i64 40 @@ -133,14 +133,14 @@ __barray_mask_return.exit.i.5: ; preds = %__barray_check_boun %not_max.not.not.i.i.6 = icmp eq i64 %qalloc.i.i.6, -1 br i1 %not_max.not.not.i.i.6, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.6 -__barray_check_bounds.exit.i.6: ; preds = %__barray_mask_return.exit.i.5 +__barray_check_bounds.exit.i.6: ; preds = %cond_exit_20.i.5 tail call void @___reset(i64 %qalloc.i.i.6) %26 = load i64, ptr %2, align 4 %27 = and i64 %26, 64 %.not5 = icmp eq i64 %27, 0 - br i1 %.not5, label %panic.i.i, label %__barray_mask_return.exit.i.6 + br i1 %.not5, label %panic.i.i, label %cond_exit_20.i.6 -__barray_mask_return.exit.i.6: ; preds = %__barray_check_bounds.exit.i.6 +cond_exit_20.i.6: ; preds = %__barray_check_bounds.exit.i.6 %28 = and i64 %26, -65 store i64 %28, ptr %2, align 4 %29 = getelementptr inbounds nuw i8, ptr %1, i64 48 @@ -149,14 +149,14 @@ __barray_mask_return.exit.i.6: ; preds = %__barray_check_boun %not_max.not.not.i.i.7 = icmp eq i64 %qalloc.i.i.7, -1 br i1 %not_max.not.not.i.i.7, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.7 -__barray_check_bounds.exit.i.7: ; preds = %__barray_mask_return.exit.i.6 +__barray_check_bounds.exit.i.7: ; preds = %cond_exit_20.i.6 tail call void @___reset(i64 %qalloc.i.i.7) %30 = load i64, ptr %2, align 4 %31 = and i64 %30, 128 %.not6 = icmp eq i64 %31, 0 - br i1 %.not6, label %panic.i.i, label %__barray_mask_return.exit.i.7 + br i1 %.not6, label %panic.i.i, label %cond_exit_20.i.7 -__barray_mask_return.exit.i.7: ; preds = %__barray_check_bounds.exit.i.7 +cond_exit_20.i.7: ; preds = %__barray_check_bounds.exit.i.7 %32 = and i64 %30, -129 store i64 %32, ptr %2, align 4 %33 = getelementptr inbounds nuw i8, ptr %1, i64 56 @@ -165,14 +165,14 @@ __barray_mask_return.exit.i.7: ; preds = %__barray_check_boun %not_max.not.not.i.i.8 = icmp eq i64 %qalloc.i.i.8, -1 br i1 %not_max.not.not.i.i.8, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.8 -__barray_check_bounds.exit.i.8: ; preds = %__barray_mask_return.exit.i.7 +__barray_check_bounds.exit.i.8: ; preds = %cond_exit_20.i.7 tail call void @___reset(i64 %qalloc.i.i.8) %34 = load i64, ptr %2, align 4 %35 = and i64 %34, 256 %.not7 = icmp eq i64 %35, 0 - br i1 %.not7, label %panic.i.i, label %__barray_mask_return.exit.i.8 + br i1 %.not7, label %panic.i.i, label %cond_exit_20.i.8 -__barray_mask_return.exit.i.8: ; preds = %__barray_check_bounds.exit.i.8 +cond_exit_20.i.8: ; preds = %__barray_check_bounds.exit.i.8 %36 = and i64 %34, -257 store i64 %36, ptr %2, align 4 %37 = getelementptr inbounds nuw i8, ptr %1, i64 64 @@ -181,14 +181,14 @@ __barray_mask_return.exit.i.8: ; preds = %__barray_check_boun %not_max.not.not.i.i.9 = icmp eq i64 %qalloc.i.i.9, -1 br i1 %not_max.not.not.i.i.9, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.9 -__barray_check_bounds.exit.i.9: ; preds = %__barray_mask_return.exit.i.8 +__barray_check_bounds.exit.i.9: ; preds = %cond_exit_20.i.8 tail call void @___reset(i64 %qalloc.i.i.9) %38 = load i64, ptr %2, align 4 %39 = and i64 %38, 512 %.not8 = icmp eq i64 %39, 0 - br i1 %.not8, label %panic.i.i, label %__barray_mask_return.exit.i.9 + br i1 %.not8, label %panic.i.i, label %cond_exit_20.i.9 -__barray_mask_return.exit.i.9: ; preds = %__barray_check_bounds.exit.i.9 +cond_exit_20.i.9: ; preds = %__barray_check_bounds.exit.i.9 %40 = and i64 %38, -513 store i64 %40, ptr %2, align 4 %41 = getelementptr inbounds nuw i8, ptr %1, i64 72 @@ -240,15 +240,15 @@ mask_block_err.i.i.i.i: ; preds = %mask_block_ok.i.i.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit.i.i.i: ; preds = %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i", %__barray_mask_return.exit.i.9 - %.fca.2.extract82.i172.i.i = phi i64 [ 0, %__barray_mask_return.exit.i.9 ], [ %.fca.1.0.0.2.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %.fca.1.extract81.i171.i.i = phi ptr [ %2, %__barray_mask_return.exit.i.9 ], [ %.fca.1.0.0.1.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %.fca.0.extract80.i170.i.i = phi ptr [ %1, %__barray_mask_return.exit.i.9 ], [ %.fca.1.0.0.0.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %"294_0.0169.i.i" = phi i64 [ 0, %__barray_mask_return.exit.i.9 ], [ %72, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %.pn168.i.i = phi { { ptr, ptr, i64 }, i64 } [ %42, %__barray_mask_return.exit.i.9 ], [ %80, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %65 = add i64 %"294_0.0169.i.i", %.fca.2.extract82.i172.i.i +__barray_check_bounds.exit.i.i.i: ; preds = %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i", %cond_exit_20.i.9 + %.fca.2.extract82.i185.i.i = phi i64 [ 0, %cond_exit_20.i.9 ], [ %.fca.1.0.0.2.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] + %.fca.1.extract81.i184.i.i = phi ptr [ %2, %cond_exit_20.i.9 ], [ %.fca.1.0.0.1.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] + %.fca.0.extract80.i183.i.i = phi ptr [ %1, %cond_exit_20.i.9 ], [ %.fca.1.0.0.0.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] + %"294_0.0182.i.i" = phi i64 [ 0, %cond_exit_20.i.9 ], [ %72, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] + %.pn181.i.i = phi { { ptr, ptr, i64 }, i64 } [ %42, %cond_exit_20.i.9 ], [ %80, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] + %65 = add i64 %"294_0.0182.i.i", %.fca.2.extract82.i185.i.i %66 = lshr i64 %65, 6 - %67 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i171.i.i, i64 %66 + %67 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i184.i.i, i64 %66 %68 = load i64, ptr %67, align 4 %69 = and i64 %65, 63 %70 = lshr i64 %68, %69 @@ -260,21 +260,21 @@ panic.i.i.i.i: ; preds = %__barray_check_boun unreachable "__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i": ; preds = %__barray_check_bounds.exit.i.i.i - %72 = add nuw nsw i64 %"294_0.0169.i.i", 1 + %72 = add nuw nsw i64 %"294_0.0182.i.i", 1 %73 = shl nuw i64 1, %69 %74 = xor i64 %73, %68 store i64 %74, ptr %67, align 4 - %75 = getelementptr inbounds i64, ptr %.fca.0.extract80.i170.i.i, i64 %65 + %75 = getelementptr inbounds i64, ptr %.fca.0.extract80.i183.i.i, i64 %65 %76 = load i64, ptr %75, align 4 - %.fca.1.0.0.0.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn168.i.i, 0, 0 - %.fca.1.0.0.1.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn168.i.i, 0, 1 - %.fca.1.0.0.2.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn168.i.i, 0, 2 - %77 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn168.i.i, i64 %72, 1 + %.fca.1.0.0.0.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 0 + %.fca.1.0.0.1.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 1 + %.fca.1.0.0.2.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 2 + %77 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, i64 %72, 1 %78 = insertvalue { { ptr, ptr, i64 }, i64 } %77, ptr %.fca.1.0.0.0.extract.i.i.i, 0, 0 %79 = insertvalue { { ptr, ptr, i64 }, i64 } %78, ptr %.fca.1.0.0.1.extract.i.i.i, 0, 1 %80 = insertvalue { { ptr, ptr, i64 }, i64 } %79, i64 %.fca.1.0.0.2.extract.i.i.i, 0, 2 tail call void @___qfree(i64 %76) - %.not.i.i = icmp eq i64 %"294_0.0169.i.i", 9 + %.not.i.i = icmp eq i64 %"294_0.0182.i.i", 9 br i1 %.not.i.i, label %43, label %__barray_check_bounds.exit.i.i.i __hugr__.main.1.exit: ; preds = %61, %43 diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-measure_qb_array/measure_qb_array_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-measure_qb_array/measure_qb_array_x86_64-windows-msvc index c44c617eb..3e3e75456 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-measure_qb_array/measure_qb_array_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-measure_qb_array/measure_qb_array_x86_64-windows-msvc @@ -37,7 +37,7 @@ entry: %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 br i1 %not_max.not.not.i.i, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i -cond_207_case_0.i.i: ; preds = %__barray_mask_return.exit.i.8, %__barray_mask_return.exit.i.7, %__barray_mask_return.exit.i.6, %__barray_mask_return.exit.i.5, %__barray_mask_return.exit.i.4, %__barray_mask_return.exit.i.3, %__barray_mask_return.exit.i.2, %__barray_mask_return.exit.i.1, %__barray_mask_return.exit.i, %entry +cond_207_case_0.i.i: ; preds = %cond_exit_20.i.8, %cond_exit_20.i.7, %cond_exit_20.i.6, %cond_exit_20.i.5, %cond_exit_20.i.4, %cond_exit_20.i.3, %cond_exit_20.i.2, %cond_exit_20.i.1, %cond_exit_20.i, %entry tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") unreachable @@ -45,13 +45,13 @@ __barray_check_bounds.exit.i: ; preds = %entry tail call void @___reset(i64 %qalloc.i.i) %3 = load i64, ptr %2, align 4 %4 = trunc i64 %3 to i1 - br i1 %4, label %__barray_mask_return.exit.i, label %panic.i.i + br i1 %4, label %cond_exit_20.i, label %panic.i.i panic.i.i: ; preds = %__barray_check_bounds.exit.i.9, %__barray_check_bounds.exit.i.8, %__barray_check_bounds.exit.i.7, %__barray_check_bounds.exit.i.6, %__barray_check_bounds.exit.i.5, %__barray_check_bounds.exit.i.4, %__barray_check_bounds.exit.i.3, %__barray_check_bounds.exit.i.2, %__barray_check_bounds.exit.i.1, %__barray_check_bounds.exit.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit.i: ; preds = %__barray_check_bounds.exit.i +cond_exit_20.i: ; preds = %__barray_check_bounds.exit.i %5 = and i64 %3, -2 store i64 %5, ptr %2, align 4 store i64 %qalloc.i.i, ptr %1, align 4 @@ -59,14 +59,14 @@ __barray_mask_return.exit.i: ; preds = %__barray_check_boun %not_max.not.not.i.i.1 = icmp eq i64 %qalloc.i.i.1, -1 br i1 %not_max.not.not.i.i.1, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.1 -__barray_check_bounds.exit.i.1: ; preds = %__barray_mask_return.exit.i +__barray_check_bounds.exit.i.1: ; preds = %cond_exit_20.i tail call void @___reset(i64 %qalloc.i.i.1) %6 = load i64, ptr %2, align 4 %7 = and i64 %6, 2 %.not = icmp eq i64 %7, 0 - br i1 %.not, label %panic.i.i, label %__barray_mask_return.exit.i.1 + br i1 %.not, label %panic.i.i, label %cond_exit_20.i.1 -__barray_mask_return.exit.i.1: ; preds = %__barray_check_bounds.exit.i.1 +cond_exit_20.i.1: ; preds = %__barray_check_bounds.exit.i.1 %8 = and i64 %6, -3 store i64 %8, ptr %2, align 4 %9 = getelementptr inbounds nuw i8, ptr %1, i64 8 @@ -75,14 +75,14 @@ __barray_mask_return.exit.i.1: ; preds = %__barray_check_boun %not_max.not.not.i.i.2 = icmp eq i64 %qalloc.i.i.2, -1 br i1 %not_max.not.not.i.i.2, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.2 -__barray_check_bounds.exit.i.2: ; preds = %__barray_mask_return.exit.i.1 +__barray_check_bounds.exit.i.2: ; preds = %cond_exit_20.i.1 tail call void @___reset(i64 %qalloc.i.i.2) %10 = load i64, ptr %2, align 4 %11 = and i64 %10, 4 %.not1 = icmp eq i64 %11, 0 - br i1 %.not1, label %panic.i.i, label %__barray_mask_return.exit.i.2 + br i1 %.not1, label %panic.i.i, label %cond_exit_20.i.2 -__barray_mask_return.exit.i.2: ; preds = %__barray_check_bounds.exit.i.2 +cond_exit_20.i.2: ; preds = %__barray_check_bounds.exit.i.2 %12 = and i64 %10, -5 store i64 %12, ptr %2, align 4 %13 = getelementptr inbounds nuw i8, ptr %1, i64 16 @@ -91,14 +91,14 @@ __barray_mask_return.exit.i.2: ; preds = %__barray_check_boun %not_max.not.not.i.i.3 = icmp eq i64 %qalloc.i.i.3, -1 br i1 %not_max.not.not.i.i.3, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.3 -__barray_check_bounds.exit.i.3: ; preds = %__barray_mask_return.exit.i.2 +__barray_check_bounds.exit.i.3: ; preds = %cond_exit_20.i.2 tail call void @___reset(i64 %qalloc.i.i.3) %14 = load i64, ptr %2, align 4 %15 = and i64 %14, 8 %.not2 = icmp eq i64 %15, 0 - br i1 %.not2, label %panic.i.i, label %__barray_mask_return.exit.i.3 + br i1 %.not2, label %panic.i.i, label %cond_exit_20.i.3 -__barray_mask_return.exit.i.3: ; preds = %__barray_check_bounds.exit.i.3 +cond_exit_20.i.3: ; preds = %__barray_check_bounds.exit.i.3 %16 = and i64 %14, -9 store i64 %16, ptr %2, align 4 %17 = getelementptr inbounds nuw i8, ptr %1, i64 24 @@ -107,14 +107,14 @@ __barray_mask_return.exit.i.3: ; preds = %__barray_check_boun %not_max.not.not.i.i.4 = icmp eq i64 %qalloc.i.i.4, -1 br i1 %not_max.not.not.i.i.4, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.4 -__barray_check_bounds.exit.i.4: ; preds = %__barray_mask_return.exit.i.3 +__barray_check_bounds.exit.i.4: ; preds = %cond_exit_20.i.3 tail call void @___reset(i64 %qalloc.i.i.4) %18 = load i64, ptr %2, align 4 %19 = and i64 %18, 16 %.not3 = icmp eq i64 %19, 0 - br i1 %.not3, label %panic.i.i, label %__barray_mask_return.exit.i.4 + br i1 %.not3, label %panic.i.i, label %cond_exit_20.i.4 -__barray_mask_return.exit.i.4: ; preds = %__barray_check_bounds.exit.i.4 +cond_exit_20.i.4: ; preds = %__barray_check_bounds.exit.i.4 %20 = and i64 %18, -17 store i64 %20, ptr %2, align 4 %21 = getelementptr inbounds nuw i8, ptr %1, i64 32 @@ -123,14 +123,14 @@ __barray_mask_return.exit.i.4: ; preds = %__barray_check_boun %not_max.not.not.i.i.5 = icmp eq i64 %qalloc.i.i.5, -1 br i1 %not_max.not.not.i.i.5, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.5 -__barray_check_bounds.exit.i.5: ; preds = %__barray_mask_return.exit.i.4 +__barray_check_bounds.exit.i.5: ; preds = %cond_exit_20.i.4 tail call void @___reset(i64 %qalloc.i.i.5) %22 = load i64, ptr %2, align 4 %23 = and i64 %22, 32 %.not4 = icmp eq i64 %23, 0 - br i1 %.not4, label %panic.i.i, label %__barray_mask_return.exit.i.5 + br i1 %.not4, label %panic.i.i, label %cond_exit_20.i.5 -__barray_mask_return.exit.i.5: ; preds = %__barray_check_bounds.exit.i.5 +cond_exit_20.i.5: ; preds = %__barray_check_bounds.exit.i.5 %24 = and i64 %22, -33 store i64 %24, ptr %2, align 4 %25 = getelementptr inbounds nuw i8, ptr %1, i64 40 @@ -139,14 +139,14 @@ __barray_mask_return.exit.i.5: ; preds = %__barray_check_boun %not_max.not.not.i.i.6 = icmp eq i64 %qalloc.i.i.6, -1 br i1 %not_max.not.not.i.i.6, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.6 -__barray_check_bounds.exit.i.6: ; preds = %__barray_mask_return.exit.i.5 +__barray_check_bounds.exit.i.6: ; preds = %cond_exit_20.i.5 tail call void @___reset(i64 %qalloc.i.i.6) %26 = load i64, ptr %2, align 4 %27 = and i64 %26, 64 %.not5 = icmp eq i64 %27, 0 - br i1 %.not5, label %panic.i.i, label %__barray_mask_return.exit.i.6 + br i1 %.not5, label %panic.i.i, label %cond_exit_20.i.6 -__barray_mask_return.exit.i.6: ; preds = %__barray_check_bounds.exit.i.6 +cond_exit_20.i.6: ; preds = %__barray_check_bounds.exit.i.6 %28 = and i64 %26, -65 store i64 %28, ptr %2, align 4 %29 = getelementptr inbounds nuw i8, ptr %1, i64 48 @@ -155,14 +155,14 @@ __barray_mask_return.exit.i.6: ; preds = %__barray_check_boun %not_max.not.not.i.i.7 = icmp eq i64 %qalloc.i.i.7, -1 br i1 %not_max.not.not.i.i.7, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.7 -__barray_check_bounds.exit.i.7: ; preds = %__barray_mask_return.exit.i.6 +__barray_check_bounds.exit.i.7: ; preds = %cond_exit_20.i.6 tail call void @___reset(i64 %qalloc.i.i.7) %30 = load i64, ptr %2, align 4 %31 = and i64 %30, 128 %.not6 = icmp eq i64 %31, 0 - br i1 %.not6, label %panic.i.i, label %__barray_mask_return.exit.i.7 + br i1 %.not6, label %panic.i.i, label %cond_exit_20.i.7 -__barray_mask_return.exit.i.7: ; preds = %__barray_check_bounds.exit.i.7 +cond_exit_20.i.7: ; preds = %__barray_check_bounds.exit.i.7 %32 = and i64 %30, -129 store i64 %32, ptr %2, align 4 %33 = getelementptr inbounds nuw i8, ptr %1, i64 56 @@ -171,14 +171,14 @@ __barray_mask_return.exit.i.7: ; preds = %__barray_check_boun %not_max.not.not.i.i.8 = icmp eq i64 %qalloc.i.i.8, -1 br i1 %not_max.not.not.i.i.8, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.8 -__barray_check_bounds.exit.i.8: ; preds = %__barray_mask_return.exit.i.7 +__barray_check_bounds.exit.i.8: ; preds = %cond_exit_20.i.7 tail call void @___reset(i64 %qalloc.i.i.8) %34 = load i64, ptr %2, align 4 %35 = and i64 %34, 256 %.not7 = icmp eq i64 %35, 0 - br i1 %.not7, label %panic.i.i, label %__barray_mask_return.exit.i.8 + br i1 %.not7, label %panic.i.i, label %cond_exit_20.i.8 -__barray_mask_return.exit.i.8: ; preds = %__barray_check_bounds.exit.i.8 +cond_exit_20.i.8: ; preds = %__barray_check_bounds.exit.i.8 %36 = and i64 %34, -257 store i64 %36, ptr %2, align 4 %37 = getelementptr inbounds nuw i8, ptr %1, i64 64 @@ -187,14 +187,14 @@ __barray_mask_return.exit.i.8: ; preds = %__barray_check_boun %not_max.not.not.i.i.9 = icmp eq i64 %qalloc.i.i.9, -1 br i1 %not_max.not.not.i.i.9, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.9 -__barray_check_bounds.exit.i.9: ; preds = %__barray_mask_return.exit.i.8 +__barray_check_bounds.exit.i.9: ; preds = %cond_exit_20.i.8 tail call void @___reset(i64 %qalloc.i.i.9) %38 = load i64, ptr %2, align 4 %39 = and i64 %38, 512 %.not8 = icmp eq i64 %39, 0 - br i1 %.not8, label %panic.i.i, label %__barray_mask_return.exit.i.9 + br i1 %.not8, label %panic.i.i, label %cond_exit_20.i.9 -__barray_mask_return.exit.i.9: ; preds = %__barray_check_bounds.exit.i.9 +cond_exit_20.i.9: ; preds = %__barray_check_bounds.exit.i.9 %40 = and i64 %38, -513 store i64 %40, ptr %2, align 4 %41 = getelementptr inbounds nuw i8, ptr %1, i64 72 @@ -206,11 +206,11 @@ __barray_mask_return.exit.i.9: ; preds = %__barray_check_boun %43 = trunc i64 %42 to i1 br i1 %43, label %panic.i238.i, label %__barray_mask_borrow.exit.i -panic.i238.i: ; preds = %__barray_mask_return.exit.i.9 +panic.i238.i: ; preds = %cond_exit_20.i.9 tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") unreachable -__barray_mask_borrow.exit.i: ; preds = %__barray_mask_return.exit.i.9 +__barray_mask_borrow.exit.i: ; preds = %cond_exit_20.i.9 %44 = or disjoint i64 %42, 1 store i64 %44, ptr %2, align 4 %45 = load i64, ptr %1, align 4 @@ -243,8 +243,8 @@ __barray_mask_borrow.exit242.i: ; preds = %__barray_mask_retur tail call void @___rxy(i64 %52, double 0x400921FB54442D18, double 0.000000e+00) %53 = load i64, ptr %2, align 4 %54 = and i64 %53, 4 - %.not265.i = icmp eq i64 %54, 0 - br i1 %.not265.i, label %panic.i243.i, label %__barray_mask_return.exit244.i + %.not268.i = icmp eq i64 %54, 0 + br i1 %.not268.i, label %panic.i243.i, label %__barray_mask_return.exit244.i panic.i243.i: ; preds = %__barray_mask_borrow.exit242.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") @@ -256,8 +256,8 @@ __barray_mask_return.exit244.i: ; preds = %__barray_mask_borro store i64 %52, ptr %13, align 4 %56 = load i64, ptr %2, align 4 %57 = and i64 %56, 8 - %.not266.i = icmp eq i64 %57, 0 - br i1 %.not266.i, label %__barray_mask_borrow.exit246.i, label %panic.i245.i + %.not269.i = icmp eq i64 %57, 0 + br i1 %.not269.i, label %__barray_mask_borrow.exit246.i, label %panic.i245.i panic.i245.i: ; preds = %__barray_mask_return.exit244.i tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") @@ -270,8 +270,8 @@ __barray_mask_borrow.exit246.i: ; preds = %__barray_mask_retur tail call void @___rxy(i64 %59, double 0x400921FB54442D18, double 0.000000e+00) %60 = load i64, ptr %2, align 4 %61 = and i64 %60, 8 - %.not267.i = icmp eq i64 %61, 0 - br i1 %.not267.i, label %panic.i247.i, label %__barray_mask_return.exit248.i + %.not270.i = icmp eq i64 %61, 0 + br i1 %.not270.i, label %panic.i247.i, label %__barray_mask_return.exit248.i panic.i247.i: ; preds = %__barray_mask_borrow.exit246.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") @@ -283,8 +283,8 @@ __barray_mask_return.exit248.i: ; preds = %__barray_mask_borro store i64 %59, ptr %17, align 4 %63 = load i64, ptr %2, align 4 %64 = and i64 %63, 512 - %.not268.i = icmp eq i64 %64, 0 - br i1 %.not268.i, label %__barray_mask_borrow.exit250.i, label %panic.i249.i + %.not271.i = icmp eq i64 %64, 0 + br i1 %.not271.i, label %__barray_mask_borrow.exit250.i, label %panic.i249.i panic.i249.i: ; preds = %__barray_mask_return.exit248.i tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") @@ -297,8 +297,8 @@ __barray_mask_borrow.exit250.i: ; preds = %__barray_mask_retur tail call void @___rxy(i64 %66, double 0x400921FB54442D18, double 0.000000e+00) %67 = load i64, ptr %2, align 4 %68 = and i64 %67, 512 - %.not269.i = icmp eq i64 %68, 0 - br i1 %.not269.i, label %panic.i251.i, label %__barray_mask_return.exit252.i + %.not272.i = icmp eq i64 %68, 0 + br i1 %.not272.i, label %panic.i251.i, label %__barray_mask_return.exit252.i panic.i251.i: ; preds = %__barray_mask_borrow.exit250.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") @@ -314,7 +314,7 @@ __barray_mask_return.exit252.i: ; preds = %__barray_mask_borro store i64 -1, ptr %72, align 1 br label %__barray_check_bounds.exit.i.i.i -73: ; preds = %__barray_mask_return.exit.i.i +73: ; preds = %loop_body.i.i %74 = lshr i64 %.fca.2.extract82.i.i.i, 6 %75 = getelementptr i64, ptr %.fca.1.extract81.i.i.i, i64 %74 %76 = load i64, ptr %75, align 4 @@ -355,17 +355,16 @@ mask_block_err.i.i.i.i: ; preds = %mask_block_ok.i.i.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_check_bounds.exit.i.i.i: ; preds = %__barray_mask_return.exit.i.i, %__barray_mask_return.exit252.i - %.fca.2.extract82.i175.i.i = phi i64 [ 0, %__barray_mask_return.exit252.i ], [ %.fca.2.extract82.i.i.i, %__barray_mask_return.exit.i.i ] - %.fca.1.extract81.i174.i.i = phi ptr [ %2, %__barray_mask_return.exit252.i ], [ %.fca.1.extract81.i.i.i, %__barray_mask_return.exit.i.i ] - %.fca.0.extract80.i173.i.i = phi ptr [ %1, %__barray_mask_return.exit252.i ], [ %.fca.0.extract80.i.i.i, %__barray_mask_return.exit.i.i ] - %"306_0.sroa.15.0172.i.i" = phi i64 [ 0, %__barray_mask_return.exit252.i ], [ %95, %__barray_mask_return.exit.i.i ] - %.pn.i.i = phi { { ptr, ptr, i64 }, i64 } [ %70, %__barray_mask_return.exit252.i ], [ %.pn171.i.i, %__barray_mask_return.exit.i.i ] - %.pn171.i.i = insertvalue { { ptr, ptr, i64 }, i64 } %.pn.i.i, i64 %"306_0.sroa.15.0172.i.i", 1 - %95 = add nuw nsw i64 %"306_0.sroa.15.0172.i.i", 1 - %96 = add i64 %"306_0.sroa.15.0172.i.i", %.fca.2.extract82.i175.i.i +__barray_check_bounds.exit.i.i.i: ; preds = %loop_body.i.i, %__barray_mask_return.exit252.i + %.fca.2.extract82.i187.i.i = phi i64 [ 0, %__barray_mask_return.exit252.i ], [ %.fca.2.extract82.i.i.i, %loop_body.i.i ] + %.fca.1.extract81.i186.i.i = phi ptr [ %2, %__barray_mask_return.exit252.i ], [ %.fca.1.extract81.i.i.i, %loop_body.i.i ] + %.fca.0.extract80.i185.i.i = phi ptr [ %1, %__barray_mask_return.exit252.i ], [ %.fca.0.extract80.i.i.i, %loop_body.i.i ] + %"306_0.sroa.15.0184.i.i" = phi i64 [ 0, %__barray_mask_return.exit252.i ], [ %95, %loop_body.i.i ] + %.pn165183.i.i = phi { { ptr, ptr, i64 }, i64 } [ %70, %__barray_mask_return.exit252.i ], [ %110, %loop_body.i.i ] + %95 = add nuw nsw i64 %"306_0.sroa.15.0184.i.i", 1 + %96 = add i64 %"306_0.sroa.15.0184.i.i", %.fca.2.extract82.i187.i.i %97 = lshr i64 %96, 6 - %98 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i174.i.i, i64 %97 + %98 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i186.i.i, i64 %97 %99 = load i64, ptr %98, align 4 %100 = and i64 %96, 63 %101 = lshr i64 %99, %100 @@ -380,241 +379,242 @@ __barray_check_bounds.exit.i.i: ; preds = %__barray_check_boun %103 = shl nuw i64 1, %100 %104 = xor i64 %103, %99 store i64 %104, ptr %98, align 4 - %105 = getelementptr inbounds i64, ptr %.fca.0.extract80.i173.i.i, i64 %96 + %105 = getelementptr inbounds i64, ptr %.fca.0.extract80.i185.i.i, i64 %96 %106 = load i64, ptr %105, align 4 %lazy_measure.i.i = tail call i64 @___lazy_measure(i64 %106) tail call void @___qfree(i64 %106) %107 = load i64, ptr %72, align 4 - %108 = lshr i64 %107, %"306_0.sroa.15.0172.i.i" + %108 = lshr i64 %107, %"306_0.sroa.15.0184.i.i" %109 = trunc i64 %108 to i1 - br i1 %109, label %__barray_mask_return.exit.i.i, label %panic.i.i.i + br i1 %109, label %loop_body.i.i, label %panic.i.i.i panic.i.i.i: ; preds = %__barray_check_bounds.exit.i.i tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable -__barray_mask_return.exit.i.i: ; preds = %__barray_check_bounds.exit.i.i +loop_body.i.i: ; preds = %__barray_check_bounds.exit.i.i %"371_054.fca.1.insert.i.i" = insertvalue { i1, i64, i1 } { i1 true, i64 poison, i1 undef }, i64 %lazy_measure.i.i, 1 %"371_054.fca.2.insert.i.i" = insertvalue { i1, i64, i1 } %"371_054.fca.1.insert.i.i", i1 undef, 2 - %110 = shl nuw nsw i64 1, %"306_0.sroa.15.0172.i.i" - %111 = xor i64 %107, %110 - store i64 %111, ptr %72, align 4 - %112 = getelementptr inbounds nuw { i1, i64, i1 }, ptr %71, i64 %"306_0.sroa.15.0172.i.i" - store { i1, i64, i1 } %"371_054.fca.2.insert.i.i", ptr %112, align 4 - %113 = extractvalue { { ptr, ptr, i64 }, i64 } %.pn.i.i, 0 - %.fca.0.extract80.i.i.i = extractvalue { ptr, ptr, i64 } %113, 0 - %.fca.1.extract81.i.i.i = extractvalue { ptr, ptr, i64 } %113, 1 - %.fca.2.extract82.i.i.i = extractvalue { ptr, ptr, i64 } %113, 2 - %.not.i.i = icmp eq i64 %"306_0.sroa.15.0172.i.i", 9 - br i1 %.not.i.i, label %73, label %__barray_check_bounds.exit.i.i.i + %110 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn165183.i.i, i64 %95, 1 + %111 = shl nuw nsw i64 1, %"306_0.sroa.15.0184.i.i" + %112 = xor i64 %107, %111 + store i64 %112, ptr %72, align 4 + %113 = getelementptr inbounds nuw { i1, i64, i1 }, ptr %71, i64 %"306_0.sroa.15.0184.i.i" + store { i1, i64, i1 } %"371_054.fca.2.insert.i.i", ptr %113, align 4 + %114 = extractvalue { { ptr, ptr, i64 }, i64 } %.pn165183.i.i, 0 + %.fca.0.extract80.i.i.i = extractvalue { ptr, ptr, i64 } %114, 0 + %.fca.1.extract81.i.i.i = extractvalue { ptr, ptr, i64 } %114, 1 + %.fca.2.extract82.i.i.i = extractvalue { ptr, ptr, i64 } %114, 2 + %exitcond.not.i.i = icmp eq i64 %95, 10 + br i1 %exitcond.not.i.i, label %73, label %__barray_check_bounds.exit.i.i.i "__hugr__.$measure_array$$n(10).280.exit.i": ; preds = %91, %73 tail call void @heap_free(ptr %.fca.0.extract80.i.i.i) tail call void @heap_free(ptr nonnull %.fca.1.extract81.i.i.i) - %114 = load i64, ptr %72, align 4 - %115 = trunc i64 %114 to i1 - br i1 %115, label %cond_exit_89.thread.i, label %__barray_mask_borrow.exit258.i + %115 = load i64, ptr %72, align 4 + %116 = trunc i64 %115 to i1 + br i1 %116, label %cond_exit_89.thread.i, label %__barray_mask_borrow.exit259.i mask_block_err.i.i: ; preds = %cond_exit_89.thread.9.i tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable -__barray_mask_borrow.exit258.i: ; preds = %"__hugr__.$measure_array$$n(10).280.exit.i" - %116 = or disjoint i64 %114, 1 - store i64 %116, ptr %72, align 4 - %117 = load { i1, i64, i1 }, ptr %71, align 4 - %.fca.0.extract167.i = extractvalue { i1, i64, i1 } %117, 0 +__barray_mask_borrow.exit259.i: ; preds = %"__hugr__.$measure_array$$n(10).280.exit.i" + %117 = or disjoint i64 %115, 1 + store i64 %117, ptr %72, align 4 + %118 = load { i1, i64, i1 }, ptr %71, align 4 + %.fca.0.extract167.i = extractvalue { i1, i64, i1 } %118, 0 br i1 %.fca.0.extract167.i, label %cond_392_case_1.i, label %cond_exit_89.thread.i -cond_exit_89.thread.i: ; preds = %cond_392_case_1.i, %__barray_mask_borrow.exit258.i, %"__hugr__.$measure_array$$n(10).280.exit.i" - %118 = phi i64 [ %.pre.i, %cond_392_case_1.i ], [ %116, %__barray_mask_borrow.exit258.i ], [ %114, %"__hugr__.$measure_array$$n(10).280.exit.i" ] - %119 = and i64 %118, 2 - %.not287.i = icmp eq i64 %119, 0 - br i1 %.not287.i, label %__barray_mask_borrow.exit258.1.i, label %cond_exit_89.thread.1.i - -__barray_mask_borrow.exit258.1.i: ; preds = %cond_exit_89.thread.i - %120 = or disjoint i64 %118, 2 - store i64 %120, ptr %72, align 4 - %121 = getelementptr inbounds nuw i8, ptr %71, i64 24 - %122 = load { i1, i64, i1 }, ptr %121, align 4 - %.fca.0.extract167.1.i = extractvalue { i1, i64, i1 } %122, 0 +cond_exit_89.thread.i: ; preds = %cond_392_case_1.i, %__barray_mask_borrow.exit259.i, %"__hugr__.$measure_array$$n(10).280.exit.i" + %119 = phi i64 [ %.pre.i, %cond_392_case_1.i ], [ %117, %__barray_mask_borrow.exit259.i ], [ %115, %"__hugr__.$measure_array$$n(10).280.exit.i" ] + %120 = and i64 %119, 2 + %.not290.i = icmp eq i64 %120, 0 + br i1 %.not290.i, label %__barray_mask_borrow.exit259.1.i, label %cond_exit_89.thread.1.i + +__barray_mask_borrow.exit259.1.i: ; preds = %cond_exit_89.thread.i + %121 = or disjoint i64 %119, 2 + store i64 %121, ptr %72, align 4 + %122 = getelementptr inbounds nuw i8, ptr %71, i64 24 + %123 = load { i1, i64, i1 }, ptr %122, align 4 + %.fca.0.extract167.1.i = extractvalue { i1, i64, i1 } %123, 0 br i1 %.fca.0.extract167.1.i, label %cond_392_case_1.1.i, label %cond_exit_89.thread.1.i -cond_392_case_1.1.i: ; preds = %__barray_mask_borrow.exit258.1.i - %.fca.1.extract.1.i = extractvalue { i1, i64, i1 } %122, 1 +cond_392_case_1.1.i: ; preds = %__barray_mask_borrow.exit259.1.i + %.fca.1.extract.1.i = extractvalue { i1, i64, i1 } %123, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.1.i) - %.pre278.i = load i64, ptr %72, align 4 + %.pre281.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.1.i -cond_exit_89.thread.1.i: ; preds = %cond_392_case_1.1.i, %__barray_mask_borrow.exit258.1.i, %cond_exit_89.thread.i - %123 = phi i64 [ %.pre278.i, %cond_392_case_1.1.i ], [ %120, %__barray_mask_borrow.exit258.1.i ], [ %118, %cond_exit_89.thread.i ] - %124 = and i64 %123, 4 - %.not288.i = icmp eq i64 %124, 0 - br i1 %.not288.i, label %__barray_mask_borrow.exit258.2.i, label %cond_exit_89.thread.2.i - -__barray_mask_borrow.exit258.2.i: ; preds = %cond_exit_89.thread.1.i - %125 = or disjoint i64 %123, 4 - store i64 %125, ptr %72, align 4 - %126 = getelementptr inbounds nuw i8, ptr %71, i64 48 - %127 = load { i1, i64, i1 }, ptr %126, align 4 - %.fca.0.extract167.2.i = extractvalue { i1, i64, i1 } %127, 0 +cond_exit_89.thread.1.i: ; preds = %cond_392_case_1.1.i, %__barray_mask_borrow.exit259.1.i, %cond_exit_89.thread.i + %124 = phi i64 [ %.pre281.i, %cond_392_case_1.1.i ], [ %121, %__barray_mask_borrow.exit259.1.i ], [ %119, %cond_exit_89.thread.i ] + %125 = and i64 %124, 4 + %.not291.i = icmp eq i64 %125, 0 + br i1 %.not291.i, label %__barray_mask_borrow.exit259.2.i, label %cond_exit_89.thread.2.i + +__barray_mask_borrow.exit259.2.i: ; preds = %cond_exit_89.thread.1.i + %126 = or disjoint i64 %124, 4 + store i64 %126, ptr %72, align 4 + %127 = getelementptr inbounds nuw i8, ptr %71, i64 48 + %128 = load { i1, i64, i1 }, ptr %127, align 4 + %.fca.0.extract167.2.i = extractvalue { i1, i64, i1 } %128, 0 br i1 %.fca.0.extract167.2.i, label %cond_392_case_1.2.i, label %cond_exit_89.thread.2.i -cond_392_case_1.2.i: ; preds = %__barray_mask_borrow.exit258.2.i - %.fca.1.extract.2.i = extractvalue { i1, i64, i1 } %127, 1 +cond_392_case_1.2.i: ; preds = %__barray_mask_borrow.exit259.2.i + %.fca.1.extract.2.i = extractvalue { i1, i64, i1 } %128, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.2.i) - %.pre279.i = load i64, ptr %72, align 4 + %.pre282.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.2.i -cond_exit_89.thread.2.i: ; preds = %cond_392_case_1.2.i, %__barray_mask_borrow.exit258.2.i, %cond_exit_89.thread.1.i - %128 = phi i64 [ %.pre279.i, %cond_392_case_1.2.i ], [ %125, %__barray_mask_borrow.exit258.2.i ], [ %123, %cond_exit_89.thread.1.i ] - %129 = and i64 %128, 8 - %.not289.i = icmp eq i64 %129, 0 - br i1 %.not289.i, label %__barray_mask_borrow.exit258.3.i, label %cond_exit_89.thread.3.i - -__barray_mask_borrow.exit258.3.i: ; preds = %cond_exit_89.thread.2.i - %130 = or disjoint i64 %128, 8 - store i64 %130, ptr %72, align 4 - %131 = getelementptr inbounds nuw i8, ptr %71, i64 72 - %132 = load { i1, i64, i1 }, ptr %131, align 4 - %.fca.0.extract167.3.i = extractvalue { i1, i64, i1 } %132, 0 +cond_exit_89.thread.2.i: ; preds = %cond_392_case_1.2.i, %__barray_mask_borrow.exit259.2.i, %cond_exit_89.thread.1.i + %129 = phi i64 [ %.pre282.i, %cond_392_case_1.2.i ], [ %126, %__barray_mask_borrow.exit259.2.i ], [ %124, %cond_exit_89.thread.1.i ] + %130 = and i64 %129, 8 + %.not292.i = icmp eq i64 %130, 0 + br i1 %.not292.i, label %__barray_mask_borrow.exit259.3.i, label %cond_exit_89.thread.3.i + +__barray_mask_borrow.exit259.3.i: ; preds = %cond_exit_89.thread.2.i + %131 = or disjoint i64 %129, 8 + store i64 %131, ptr %72, align 4 + %132 = getelementptr inbounds nuw i8, ptr %71, i64 72 + %133 = load { i1, i64, i1 }, ptr %132, align 4 + %.fca.0.extract167.3.i = extractvalue { i1, i64, i1 } %133, 0 br i1 %.fca.0.extract167.3.i, label %cond_392_case_1.3.i, label %cond_exit_89.thread.3.i -cond_392_case_1.3.i: ; preds = %__barray_mask_borrow.exit258.3.i - %.fca.1.extract.3.i = extractvalue { i1, i64, i1 } %132, 1 +cond_392_case_1.3.i: ; preds = %__barray_mask_borrow.exit259.3.i + %.fca.1.extract.3.i = extractvalue { i1, i64, i1 } %133, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.3.i) - %.pre280.i = load i64, ptr %72, align 4 + %.pre283.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.3.i -cond_exit_89.thread.3.i: ; preds = %cond_392_case_1.3.i, %__barray_mask_borrow.exit258.3.i, %cond_exit_89.thread.2.i - %133 = phi i64 [ %.pre280.i, %cond_392_case_1.3.i ], [ %130, %__barray_mask_borrow.exit258.3.i ], [ %128, %cond_exit_89.thread.2.i ] - %134 = and i64 %133, 16 - %.not290.i = icmp eq i64 %134, 0 - br i1 %.not290.i, label %__barray_mask_borrow.exit258.4.i, label %cond_exit_89.thread.4.i - -__barray_mask_borrow.exit258.4.i: ; preds = %cond_exit_89.thread.3.i - %135 = or disjoint i64 %133, 16 - store i64 %135, ptr %72, align 4 - %136 = getelementptr inbounds nuw i8, ptr %71, i64 96 - %137 = load { i1, i64, i1 }, ptr %136, align 4 - %.fca.0.extract167.4.i = extractvalue { i1, i64, i1 } %137, 0 +cond_exit_89.thread.3.i: ; preds = %cond_392_case_1.3.i, %__barray_mask_borrow.exit259.3.i, %cond_exit_89.thread.2.i + %134 = phi i64 [ %.pre283.i, %cond_392_case_1.3.i ], [ %131, %__barray_mask_borrow.exit259.3.i ], [ %129, %cond_exit_89.thread.2.i ] + %135 = and i64 %134, 16 + %.not293.i = icmp eq i64 %135, 0 + br i1 %.not293.i, label %__barray_mask_borrow.exit259.4.i, label %cond_exit_89.thread.4.i + +__barray_mask_borrow.exit259.4.i: ; preds = %cond_exit_89.thread.3.i + %136 = or disjoint i64 %134, 16 + store i64 %136, ptr %72, align 4 + %137 = getelementptr inbounds nuw i8, ptr %71, i64 96 + %138 = load { i1, i64, i1 }, ptr %137, align 4 + %.fca.0.extract167.4.i = extractvalue { i1, i64, i1 } %138, 0 br i1 %.fca.0.extract167.4.i, label %cond_392_case_1.4.i, label %cond_exit_89.thread.4.i -cond_392_case_1.4.i: ; preds = %__barray_mask_borrow.exit258.4.i - %.fca.1.extract.4.i = extractvalue { i1, i64, i1 } %137, 1 +cond_392_case_1.4.i: ; preds = %__barray_mask_borrow.exit259.4.i + %.fca.1.extract.4.i = extractvalue { i1, i64, i1 } %138, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.4.i) - %.pre281.i = load i64, ptr %72, align 4 + %.pre284.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.4.i -cond_exit_89.thread.4.i: ; preds = %cond_392_case_1.4.i, %__barray_mask_borrow.exit258.4.i, %cond_exit_89.thread.3.i - %138 = phi i64 [ %.pre281.i, %cond_392_case_1.4.i ], [ %135, %__barray_mask_borrow.exit258.4.i ], [ %133, %cond_exit_89.thread.3.i ] - %139 = and i64 %138, 32 - %.not291.i = icmp eq i64 %139, 0 - br i1 %.not291.i, label %__barray_mask_borrow.exit258.5.i, label %cond_exit_89.thread.5.i - -__barray_mask_borrow.exit258.5.i: ; preds = %cond_exit_89.thread.4.i - %140 = or disjoint i64 %138, 32 - store i64 %140, ptr %72, align 4 - %141 = getelementptr inbounds nuw i8, ptr %71, i64 120 - %142 = load { i1, i64, i1 }, ptr %141, align 4 - %.fca.0.extract167.5.i = extractvalue { i1, i64, i1 } %142, 0 +cond_exit_89.thread.4.i: ; preds = %cond_392_case_1.4.i, %__barray_mask_borrow.exit259.4.i, %cond_exit_89.thread.3.i + %139 = phi i64 [ %.pre284.i, %cond_392_case_1.4.i ], [ %136, %__barray_mask_borrow.exit259.4.i ], [ %134, %cond_exit_89.thread.3.i ] + %140 = and i64 %139, 32 + %.not294.i = icmp eq i64 %140, 0 + br i1 %.not294.i, label %__barray_mask_borrow.exit259.5.i, label %cond_exit_89.thread.5.i + +__barray_mask_borrow.exit259.5.i: ; preds = %cond_exit_89.thread.4.i + %141 = or disjoint i64 %139, 32 + store i64 %141, ptr %72, align 4 + %142 = getelementptr inbounds nuw i8, ptr %71, i64 120 + %143 = load { i1, i64, i1 }, ptr %142, align 4 + %.fca.0.extract167.5.i = extractvalue { i1, i64, i1 } %143, 0 br i1 %.fca.0.extract167.5.i, label %cond_392_case_1.5.i, label %cond_exit_89.thread.5.i -cond_392_case_1.5.i: ; preds = %__barray_mask_borrow.exit258.5.i - %.fca.1.extract.5.i = extractvalue { i1, i64, i1 } %142, 1 +cond_392_case_1.5.i: ; preds = %__barray_mask_borrow.exit259.5.i + %.fca.1.extract.5.i = extractvalue { i1, i64, i1 } %143, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.5.i) - %.pre282.i = load i64, ptr %72, align 4 + %.pre285.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.5.i -cond_exit_89.thread.5.i: ; preds = %cond_392_case_1.5.i, %__barray_mask_borrow.exit258.5.i, %cond_exit_89.thread.4.i - %143 = phi i64 [ %.pre282.i, %cond_392_case_1.5.i ], [ %140, %__barray_mask_borrow.exit258.5.i ], [ %138, %cond_exit_89.thread.4.i ] - %144 = and i64 %143, 64 - %.not292.i = icmp eq i64 %144, 0 - br i1 %.not292.i, label %__barray_mask_borrow.exit258.6.i, label %cond_exit_89.thread.6.i - -__barray_mask_borrow.exit258.6.i: ; preds = %cond_exit_89.thread.5.i - %145 = or disjoint i64 %143, 64 - store i64 %145, ptr %72, align 4 - %146 = getelementptr inbounds nuw i8, ptr %71, i64 144 - %147 = load { i1, i64, i1 }, ptr %146, align 4 - %.fca.0.extract167.6.i = extractvalue { i1, i64, i1 } %147, 0 +cond_exit_89.thread.5.i: ; preds = %cond_392_case_1.5.i, %__barray_mask_borrow.exit259.5.i, %cond_exit_89.thread.4.i + %144 = phi i64 [ %.pre285.i, %cond_392_case_1.5.i ], [ %141, %__barray_mask_borrow.exit259.5.i ], [ %139, %cond_exit_89.thread.4.i ] + %145 = and i64 %144, 64 + %.not295.i = icmp eq i64 %145, 0 + br i1 %.not295.i, label %__barray_mask_borrow.exit259.6.i, label %cond_exit_89.thread.6.i + +__barray_mask_borrow.exit259.6.i: ; preds = %cond_exit_89.thread.5.i + %146 = or disjoint i64 %144, 64 + store i64 %146, ptr %72, align 4 + %147 = getelementptr inbounds nuw i8, ptr %71, i64 144 + %148 = load { i1, i64, i1 }, ptr %147, align 4 + %.fca.0.extract167.6.i = extractvalue { i1, i64, i1 } %148, 0 br i1 %.fca.0.extract167.6.i, label %cond_392_case_1.6.i, label %cond_exit_89.thread.6.i -cond_392_case_1.6.i: ; preds = %__barray_mask_borrow.exit258.6.i - %.fca.1.extract.6.i = extractvalue { i1, i64, i1 } %147, 1 +cond_392_case_1.6.i: ; preds = %__barray_mask_borrow.exit259.6.i + %.fca.1.extract.6.i = extractvalue { i1, i64, i1 } %148, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.6.i) - %.pre283.i = load i64, ptr %72, align 4 + %.pre286.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.6.i -cond_exit_89.thread.6.i: ; preds = %cond_392_case_1.6.i, %__barray_mask_borrow.exit258.6.i, %cond_exit_89.thread.5.i - %148 = phi i64 [ %.pre283.i, %cond_392_case_1.6.i ], [ %145, %__barray_mask_borrow.exit258.6.i ], [ %143, %cond_exit_89.thread.5.i ] - %149 = and i64 %148, 128 - %.not293.i = icmp eq i64 %149, 0 - br i1 %.not293.i, label %__barray_mask_borrow.exit258.7.i, label %cond_exit_89.thread.7.i - -__barray_mask_borrow.exit258.7.i: ; preds = %cond_exit_89.thread.6.i - %150 = or disjoint i64 %148, 128 - store i64 %150, ptr %72, align 4 - %151 = getelementptr inbounds nuw i8, ptr %71, i64 168 - %152 = load { i1, i64, i1 }, ptr %151, align 4 - %.fca.0.extract167.7.i = extractvalue { i1, i64, i1 } %152, 0 +cond_exit_89.thread.6.i: ; preds = %cond_392_case_1.6.i, %__barray_mask_borrow.exit259.6.i, %cond_exit_89.thread.5.i + %149 = phi i64 [ %.pre286.i, %cond_392_case_1.6.i ], [ %146, %__barray_mask_borrow.exit259.6.i ], [ %144, %cond_exit_89.thread.5.i ] + %150 = and i64 %149, 128 + %.not296.i = icmp eq i64 %150, 0 + br i1 %.not296.i, label %__barray_mask_borrow.exit259.7.i, label %cond_exit_89.thread.7.i + +__barray_mask_borrow.exit259.7.i: ; preds = %cond_exit_89.thread.6.i + %151 = or disjoint i64 %149, 128 + store i64 %151, ptr %72, align 4 + %152 = getelementptr inbounds nuw i8, ptr %71, i64 168 + %153 = load { i1, i64, i1 }, ptr %152, align 4 + %.fca.0.extract167.7.i = extractvalue { i1, i64, i1 } %153, 0 br i1 %.fca.0.extract167.7.i, label %cond_392_case_1.7.i, label %cond_exit_89.thread.7.i -cond_392_case_1.7.i: ; preds = %__barray_mask_borrow.exit258.7.i - %.fca.1.extract.7.i = extractvalue { i1, i64, i1 } %152, 1 +cond_392_case_1.7.i: ; preds = %__barray_mask_borrow.exit259.7.i + %.fca.1.extract.7.i = extractvalue { i1, i64, i1 } %153, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.7.i) - %.pre284.i = load i64, ptr %72, align 4 + %.pre287.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.7.i -cond_exit_89.thread.7.i: ; preds = %cond_392_case_1.7.i, %__barray_mask_borrow.exit258.7.i, %cond_exit_89.thread.6.i - %153 = phi i64 [ %.pre284.i, %cond_392_case_1.7.i ], [ %150, %__barray_mask_borrow.exit258.7.i ], [ %148, %cond_exit_89.thread.6.i ] - %154 = and i64 %153, 256 - %.not294.i = icmp eq i64 %154, 0 - br i1 %.not294.i, label %__barray_mask_borrow.exit258.8.i, label %cond_exit_89.thread.8.i - -__barray_mask_borrow.exit258.8.i: ; preds = %cond_exit_89.thread.7.i - %155 = or disjoint i64 %153, 256 - store i64 %155, ptr %72, align 4 - %156 = getelementptr inbounds nuw i8, ptr %71, i64 192 - %157 = load { i1, i64, i1 }, ptr %156, align 4 - %.fca.0.extract167.8.i = extractvalue { i1, i64, i1 } %157, 0 +cond_exit_89.thread.7.i: ; preds = %cond_392_case_1.7.i, %__barray_mask_borrow.exit259.7.i, %cond_exit_89.thread.6.i + %154 = phi i64 [ %.pre287.i, %cond_392_case_1.7.i ], [ %151, %__barray_mask_borrow.exit259.7.i ], [ %149, %cond_exit_89.thread.6.i ] + %155 = and i64 %154, 256 + %.not297.i = icmp eq i64 %155, 0 + br i1 %.not297.i, label %__barray_mask_borrow.exit259.8.i, label %cond_exit_89.thread.8.i + +__barray_mask_borrow.exit259.8.i: ; preds = %cond_exit_89.thread.7.i + %156 = or disjoint i64 %154, 256 + store i64 %156, ptr %72, align 4 + %157 = getelementptr inbounds nuw i8, ptr %71, i64 192 + %158 = load { i1, i64, i1 }, ptr %157, align 4 + %.fca.0.extract167.8.i = extractvalue { i1, i64, i1 } %158, 0 br i1 %.fca.0.extract167.8.i, label %cond_392_case_1.8.i, label %cond_exit_89.thread.8.i -cond_392_case_1.8.i: ; preds = %__barray_mask_borrow.exit258.8.i - %.fca.1.extract.8.i = extractvalue { i1, i64, i1 } %157, 1 +cond_392_case_1.8.i: ; preds = %__barray_mask_borrow.exit259.8.i + %.fca.1.extract.8.i = extractvalue { i1, i64, i1 } %158, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.8.i) - %.pre285.i = load i64, ptr %72, align 4 + %.pre288.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.8.i -cond_exit_89.thread.8.i: ; preds = %cond_392_case_1.8.i, %__barray_mask_borrow.exit258.8.i, %cond_exit_89.thread.7.i - %158 = phi i64 [ %.pre285.i, %cond_392_case_1.8.i ], [ %155, %__barray_mask_borrow.exit258.8.i ], [ %153, %cond_exit_89.thread.7.i ] - %159 = and i64 %158, 512 - %.not295.i = icmp eq i64 %159, 0 - br i1 %.not295.i, label %__barray_mask_borrow.exit258.9.i, label %cond_exit_89.thread.9.i - -__barray_mask_borrow.exit258.9.i: ; preds = %cond_exit_89.thread.8.i - %160 = or disjoint i64 %158, 512 - store i64 %160, ptr %72, align 4 - %161 = getelementptr inbounds nuw i8, ptr %71, i64 216 - %162 = load { i1, i64, i1 }, ptr %161, align 4 - %.fca.0.extract167.9.i = extractvalue { i1, i64, i1 } %162, 0 +cond_exit_89.thread.8.i: ; preds = %cond_392_case_1.8.i, %__barray_mask_borrow.exit259.8.i, %cond_exit_89.thread.7.i + %159 = phi i64 [ %.pre288.i, %cond_392_case_1.8.i ], [ %156, %__barray_mask_borrow.exit259.8.i ], [ %154, %cond_exit_89.thread.7.i ] + %160 = and i64 %159, 512 + %.not298.i = icmp eq i64 %160, 0 + br i1 %.not298.i, label %__barray_mask_borrow.exit259.9.i, label %cond_exit_89.thread.9.i + +__barray_mask_borrow.exit259.9.i: ; preds = %cond_exit_89.thread.8.i + %161 = or disjoint i64 %159, 512 + store i64 %161, ptr %72, align 4 + %162 = getelementptr inbounds nuw i8, ptr %71, i64 216 + %163 = load { i1, i64, i1 }, ptr %162, align 4 + %.fca.0.extract167.9.i = extractvalue { i1, i64, i1 } %163, 0 br i1 %.fca.0.extract167.9.i, label %cond_392_case_1.9.i, label %cond_exit_89.thread.9.i -cond_392_case_1.9.i: ; preds = %__barray_mask_borrow.exit258.9.i - %.fca.1.extract.9.i = extractvalue { i1, i64, i1 } %162, 1 +cond_392_case_1.9.i: ; preds = %__barray_mask_borrow.exit259.9.i + %.fca.1.extract.9.i = extractvalue { i1, i64, i1 } %163, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.9.i) - %.pre286.i = load i64, ptr %72, align 4 + %.pre289.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.9.i -cond_exit_89.thread.9.i: ; preds = %cond_392_case_1.9.i, %__barray_mask_borrow.exit258.9.i, %cond_exit_89.thread.8.i - %163 = phi i64 [ %.pre286.i, %cond_392_case_1.9.i ], [ %160, %__barray_mask_borrow.exit258.9.i ], [ %158, %cond_exit_89.thread.8.i ] - %164 = or i64 %163, -1024 - store i64 %164, ptr %72, align 4 - %165 = icmp eq i64 %164, -1 - br i1 %165, label %__hugr__.main.1.exit, label %mask_block_err.i.i +cond_exit_89.thread.9.i: ; preds = %cond_392_case_1.9.i, %__barray_mask_borrow.exit259.9.i, %cond_exit_89.thread.8.i + %164 = phi i64 [ %.pre289.i, %cond_392_case_1.9.i ], [ %161, %__barray_mask_borrow.exit259.9.i ], [ %159, %cond_exit_89.thread.8.i ] + %165 = or i64 %164, -1024 + store i64 %165, ptr %72, align 4 + %166 = icmp eq i64 %165, -1 + br i1 %166, label %__hugr__.main.1.exit, label %mask_block_err.i.i -cond_392_case_1.i: ; preds = %__barray_mask_borrow.exit258.i - %.fca.1.extract.i = extractvalue { i1, i64, i1 } %117, 1 +cond_392_case_1.i: ; preds = %__barray_mask_borrow.exit259.i + %.fca.1.extract.i = extractvalue { i1, i64, i1 } %118, 1 tail call void @___dec_future_refcount(i64 %.fca.1.extract.i) %.pre.i = load i64, ptr %72, align 4 br label %cond_exit_89.thread.i @@ -622,8 +622,8 @@ cond_392_case_1.i: ; preds = %__barray_mask_borro __hugr__.main.1.exit: ; preds = %cond_exit_89.thread.9.i tail call void @heap_free(ptr %71) tail call void @heap_free(ptr nonnull %72) - %166 = tail call i64 @teardown() - ret i64 %166 + %167 = tail call i64 @teardown() + ret i64 %167 } declare void @setup(i64) local_unnamed_addr From f8be757a61b9a40c1ceb01e35ad46d8a3858b4d7 Mon Sep 17 00:00:00 2001 From: George Hodgkins Date: Mon, 20 Apr 2026 10:22:45 -0600 Subject: [PATCH 05/11] Actually test debug info generation --- .../selene_hugr_qis_compiler.pyi | 14 +- qis-compiler/python/tests/generate_hugrs.py | 7 +- .../python/tests/resources/check.hugr | Bin 2594 -> 2855 bytes .../tests/resources/discard_qb_array.hugr | Bin 9138 -> 9581 bytes .../python/tests/resources/entry_args.hugr | Bin 1681 -> 1929 bytes .../python/tests/resources/flip_some.hugr | Bin 3764 -> 4286 bytes .../tests/resources/measure_qb_array.hugr | Bin 9324 -> 9979 bytes .../python/tests/resources/no_results.hugr | Bin 2669 -> 2959 bytes .../tests/resources/postselect_exit.hugr | Bin 4240 -> 4489 bytes .../tests/resources/postselect_panic.hugr | Bin 4194 -> 4550 bytes .../tests/resources/print_current_shot.hugr | Bin 1821 -> 2091 bytes qis-compiler/python/tests/resources/rng.hugr | Bin 4796 -> 5489 bytes qis-compiler/python/tests/resources/rus.hugr | Bin 5000 -> 5629 bytes .../resources/unsupported_pytket_ops.hugr | Bin 3373 -> 3738 bytes .../discard_qb_array_aarch64-apple-darwin | 636 +++++---- .../flip_some_aarch64-apple-darwin | 172 ++- .../measure_qb_array_aarch64-apple-darwin | 931 ++++++------ .../no_results_aarch64-apple-darwin | 67 +- .../postselect_exit_aarch64-apple-darwin | 93 +- .../postselect_panic_aarch64-apple-darwin | 93 +- .../print_current_shot_aarch64-apple-darwin | 45 +- .../rng_aarch64-apple-darwin | 99 +- .../rus_aarch64-apple-darwin | 216 +-- .../discard_qb_array_x86_64-apple-darwin | 645 +++++---- .../flip_some_x86_64-apple-darwin | 172 ++- .../measure_qb_array_x86_64-apple-darwin | 1272 +++++++++-------- .../no_results_x86_64-apple-darwin | 67 +- .../postselect_exit_x86_64-apple-darwin | 93 +- .../postselect_panic_x86_64-apple-darwin | 93 +- .../print_current_shot_x86_64-apple-darwin | 45 +- .../rng_x86_64-apple-darwin | 99 +- .../rus_x86_64-apple-darwin | 216 +-- .../discard_qb_array_x86_64-unknown-linux-gnu | 645 +++++---- .../flip_some_x86_64-unknown-linux-gnu | 172 ++- .../measure_qb_array_x86_64-unknown-linux-gnu | 1272 +++++++++-------- .../no_results_x86_64-unknown-linux-gnu | 67 +- .../postselect_exit_x86_64-unknown-linux-gnu | 93 +- .../postselect_panic_x86_64-unknown-linux-gnu | 93 +- ...rint_current_shot_x86_64-unknown-linux-gnu | 45 +- .../rng_x86_64-unknown-linux-gnu | 99 +- .../rus_x86_64-unknown-linux-gnu | 216 +-- .../discard_qb_array_x86_64-windows-msvc | 645 +++++---- .../flip_some_x86_64-windows-msvc | 172 ++- .../measure_qb_array_x86_64-windows-msvc | 1272 +++++++++-------- .../no_results_x86_64-windows-msvc | 67 +- .../postselect_exit_x86_64-windows-msvc | 93 +- .../postselect_panic_x86_64-windows-msvc | 93 +- .../print_current_shot_x86_64-windows-msvc | 45 +- .../rng_x86_64-windows-msvc | 99 +- .../rus_x86_64-windows-msvc | 216 +-- .../python/tests/test_basic_generation.py | 2 +- 51 files changed, 6046 insertions(+), 4435 deletions(-) diff --git a/qis-compiler/python/selene_hugr_qis_compiler/selene_hugr_qis_compiler.pyi b/qis-compiler/python/selene_hugr_qis_compiler/selene_hugr_qis_compiler.pyi index aa7b405dc..b5cb52c50 100644 --- a/qis-compiler/python/selene_hugr_qis_compiler/selene_hugr_qis_compiler.pyi +++ b/qis-compiler/python/selene_hugr_qis_compiler/selene_hugr_qis_compiler.pyi @@ -1,8 +1,18 @@ -def compile_to_bitcode(pkg_bytes: bytes, opt_level: int = 2) -> bytes: +def compile_to_bitcode( + pkg_bytes: bytes, + opt_level: int = 2, + target_triple: str = "native", + emit_debug: bool = False, +) -> bytes: """Compile serialized HUGR to LLVM IR bitcode""" ... -def compile_to_llvm_ir(pkg_bytes: bytes, opt_level: int = 2) -> str: +def compile_to_llvm_ir( + pkg_bytes: bytes, + opt_level: int = 2, + target_triple: str = "native", + emit_debug: bool = False, +) -> str: """Compile serialized HUGR to LLVM IR string""" ... diff --git a/qis-compiler/python/tests/generate_hugrs.py b/qis-compiler/python/tests/generate_hugrs.py index 81b91bcb1..a1b0c47d5 100644 --- a/qis-compiler/python/tests/generate_hugrs.py +++ b/qis-compiler/python/tests/generate_hugrs.py @@ -1,10 +1,12 @@ # /// script # requires-python = ">=3.10" # dependencies = [ -# "guppylang ==0.21.9", +# "guppylang==0.21.9, # "tket", # ] # /// +# TODO: point at re-released guppylang(-internals) once available with debug info. right +# now the code below is not compatible with the version specified above. from pathlib import Path @@ -25,6 +27,7 @@ x, z, ) +from guppylang_internals.debug_mode import turn_off_debug_mode, turn_on_debug_mode resources_dir = Path(__file__).parent / "resources" @@ -244,5 +247,7 @@ def foo(a: int) -> None: rng, entry_args, ]: + turn_on_debug_mode() envelope = func() + turn_off_debug_mode() (resources_dir / f"{func.__name__}.hugr").write_bytes(envelope) diff --git a/qis-compiler/python/tests/resources/check.hugr b/qis-compiler/python/tests/resources/check.hugr index 9fc09aae3a62657c1f70c535ac4d0abb9920c84a..64b6d05426a52364002ae906681c20cc77962d4d 100644 GIT binary patch literal 2855 zcmV+?3)u8XRYy{3NJ@4BK`6B^{Qy{{SOA)VOd3+47;)Ob3yA!M$V&_S#v#|&GFgMM zAL7Et_{50Z#dsZjJ4T_EEO*eB6t!lyjg(S_FB%m9JA9qIN5s&D*Zs+7TCR3ux zSSU4{5&CO4?T`VI0gC}#+uO)S1BS$XUH|=VNFCdB2vh##zD=HnpCHWj*e2^= zr!%SR+{!qPD!zT_I`7WKziYfR!cPzeq23+{+3ol_QokLywH*?Ef-t=zVZJpHF8B$; z{#pEpoc}oXUX73_@V2Y%O#+gQhFcmbW|_{H%d#C=GDk}05uX`-MP#H_8j4!M3II< zDDn`>mslur6hiqB#+R6kJzf-jyoe{z3*rwT6vFtCfat>oLJu}VEP+Dk!9)=S3gQ1q zWPw5$v5!c=6z~KLFar=x5&)))(2U>W{~`Q{OcDTQsKp$42xmAjTUMs%>5DnBDI%u_ zG(SIC#JK{4a6~g@FEu+8=0P524IF!t~aQuqnNdQN>eCXj?x--da&6PU-|Y#m{5yQ`~n%GS~A zg|c;odfAtc#c%#@ZubF9O)XhlM^*z{OSZdIJ7w$0<1W7)=3l>>l|5TWFH}t}eH^zn z&C6Vux#r=Vn3tTG7pqfC*5kO_wvJvpwNyuzMW^N;f(Pd7Eei{Yr3Gb$)Z#)~*^%OH zS99ETPC2P8eK%LveJop9?C{+$#}z=0Sq->M)U$ZFb9GX`ds~sT+%ebcnctOd@6<}) z+}2VZy(|laq8+#QA!Zb#)|7ETGrZ*$clDO}r_whC>%D0zAZ*^Lcskp# zRJ%pOEWR;I#pBq^p`xNvDp?obUBf)9Y#rI2^_Sr-cih%&9YBRNZRUY?2Xj}GjD9|Z zG9Jb&5GRDM2xiE@5crp~@7h;XbeStiO6sYR@?9 zvr%t`Z7%2PdAr|DjT?M}J&iGsj#Cwb8#L;6wanTb=&SFxcdG8HY3$DN4!vJ?N7-)I zn9Ce@IQXP;-0GOMd-XPtUR5d@s>^L1d0N&NhYIU2Yv6&NbzY_Dt*e)7#jRdfxnjL< zR2)-DD4xDqb$QjfZh)h%cJ=Vq<-UDf#i^>=zRlyLrf{3DYS%vAJ-uI6+ihjs<}3SR zwY+sWHEb=}l-1Gv>vgr=R$cANaf1z# z+ueaHPE~!i+Hb2@y|d?G-r?Zt>NuBIZ^e9f)5g*_)AF`coXb0%PA3`~8X6rlGc!77 zW@b<$R1J^KHE?m6yzSL$%gD&c$edUzmdbQ8nM^r3IWCtA2d85X$H2g7d)sKhV4gus zEm@qCy&SfdtY`8r_P~Y>8>iFhL_ny@nY-frRi^#@qy8( zK{ZllMnptJL?lU)bg=}4Fs7V@vOE%?U{Ma`7zjcbh(VA-gb+iB01+Y}gb-pBBqCJu zib&o1=xB`Q=L3xEBR*NKHw{eQOQRx-K2n(+jFIjz?uy%ovBTms>ZIyI$c4nex6XYpO*GY$7q5wkCJx>N9a$W#RvyDFsNjC{6?)TWRRzhWLV5LG1 z$gh5Tq$LLZ8wVA;B?5=bMg%;Gew9i#5iJN2{PZ-cUG!t*$K~Kl%1RbWu#PK~JUFbl zgMsxmC)t2%amFNcmPRI^Nw~BMLwzA6yT(WzQ7k2$l#)S|t~(JIflh9zW*_sKQcajr zQT#|Nu{hSt(D?Y7r!JS*jlG*vdz1qf1OA|&e&ApKZaDm$uy?z{GLpF~`UpV;7g(Nt zpi~uX3eeu;S0vbk!XK?g%fM$_$sk)0^ZmNV(^O_xNRunX{R`l~j|W(V%LxvnRb>1U z(L`gh_$uN>^H2|hsD~3#CnkOXbHXZR0yL)e0-}%bSxK%5l9lmAk5Q>8m_DSp8V|Qg zjMZPq3q;tfUXvT_-}0Z9EX8;|5_O3ftx~W1f0ywQcoGq!;#0keAv%*pEEr!}i zv3bXEIz9ExIPk#HeX#nipk5B0K35kPJ1~p=8e|m^n2<2vM8SzC7lblNQ;H3hazSPf zV**|f0W=I@NW5(^{(?AGe(?xvU~WX1siPYt&?YB14E*cd#DXIvP#}7&2ZCwCuZ6$| zJT(KJiAu!1SZYfElP_L}al;OH6IzT~?=%G`Dq?>|TUq_nZA98UmjVB+SZVSoizoy|5mI{^5e!WAyN1rGUN zIfh#S%9Ch6(~~r`*}?$hVH)0nU{VC$RTnI=d=rCV!mST5s(lC!Hol!F=FW^PVN0S6 zesQNz%)ltBAwux_hg-K=s-2cuMplSf)A6FC8+<5<2d3aBAofT$?U`R?4@P&|Jo=@q zuwE%WmL@+srbiJ*nRvd|b(FfBCz|;LWX1_NERHAVb*w!^Cn^QhBOF3o$!8DEsn3&& z>(sJ+p-t8qTjpfho)MhOBA3M^8YQ=24n%@9N;u)!h@WBL&@>K(5&-%0V9&md<w8lAKae?hI8L?`Wv8=iRyPhEsdgT$Z0YU5IC)X7ERT z>U6iqOtC%Mve(+#TZ)C4n}xc{Pn`~bDc|0P?d)mWE&QEv8X7-!I`^za7_qzYgROmS zpq8bv@l&VEv=$DvY=(%RI^Dm`*U0(r0w|V}IMW7aBEXsdGxaWHCw~W(--F5rLgfe1 z0fh1hLVpmU@{Q0TNN5oyR6Y}`dL~qU6Z-#4UJG8n6DmInRecmHUkd$yD6a*tdMQ*| zp{ln+|9{FW!mHkj>akGyTCThtynHTHz85P03zZ*cix<^@q5t3I#q;vRQ2Ar1d@}zJ z=H)J*jO3pFznGW1>c>!(87dzQ_mX>B=INiQp_0R)G60p_q^be5d$~*Q0F|7Ao|k(M zcYvxm2vl+nsN^8ff9~exUh_smGKm~BJV_y;QUVT;d+Mdo-)Nu`Y9V#04Sf)GoFfA3lO!rjR^JTgZ z_;=Z<&`kH$uf9h00S-`i`m1jMK|T<5=Xuq4kWYfT&tLtDofkTy?y6t?UA>nRWpe`u z2mmG2J?D3xiRztDcbs3n6zUGZ-R8U1f1&OG-d(=zRF8(b*StITvQu%By34oRflhJ| zsC(*HoDX&9o`>5Yg7ZM#Q{9RqLEZmtxE0i$>z;!mgy0Vpm;>nScBX&;lY5>2cgLxj z0s>4OoO$!^K;N=32k=Y)H8VA*>L(62C7r9BY16s0j^=|GQ?;OTmpngzX+FSHg{SnU z1Si+MZT5h(hR~ERraYS5*L)|mXE%l!IMW5g|7;@>X1XgL2Tp}0a{Sckwx={UG4K|i zjUNteX+oL)Y`zdeEpXiV@7UDZm}$FDc=_%T{(*yM@TqqXK{3p9!Q1w}J2sJM!cEv# zR+KD{v{;B`=+9Ob7QaiYE_(}a_LP!rWhDjKT6kw(W!V-;)n#pESrfLp?7q!#IPRNk zo@gs83aYxSO!PooS+*rsEo0Y=v5bwC>IfDg>UU*cO{!-C+#beX8>6$~>>auyEOvEz_Rb3XUx+=^5 zKq3AAT$t`rwnGaD1BIW~Plnb{3?K2kImA1AJ`-v!-|uF#jWt_u(u8{75P$HDYd)-* z^gtrE-F9nV{n1)7Z)0$2d*S`GR{F`>+jr~GR##<3S)dk%){m_&o3$r~IEJk(3ywS6 z>gur=yxBq_r4h6CcEpUg6OPRui(>@})5cOB%iaZJF`EX1H}6RJ?%f-_fp5^&e>qp* z(hpuHtMKVs=AYS)$C#*9B&h;U!rfV;VSYFMBkftaBB;TJh4ZG_T^USyVh!TNK26 zz1aq+ZL+M@V?`BW8jLFYQD0%@6xVWd!mR#n-i`#8+a4z ztvJ;C_0{r?$-GZ1fj1EbgTaoDj*g6qii(Viii(n0Nk~Z5Wkne}ydlom#4RN9K24)( zA|fIpB3Nx!o4sJK*X!x&>2|vrIXPhw4+#m$^!J4j!eI&V;uR-OoPfb#u%n}+q$F!( zD+>szvXU&!R@M)ak&#i5kkAN%T4tYyf}VzgfTE0?oGuQBT7){(x6*X2VHR8Gtuuz| zviQjp^9x&DR($1K_0C?U0FGkaULNb6PjVJ1@JH#=v4uPnsaXCUpMnptJBuSD& z2f+k{IEI*n&^i*J5J?W?7z#rWhG8I%F@zXG2qHv42qDBMNJOmU0lXUsNs9?56CN83 zW2jt*@EYBsk^?of3-w0BF!q0u6-=Vi>9-Awgb{h3R#YNk)3srj#e&b8(9Scr1rU zPYPZt@x_!?#~Ih%kaJv4r*DQgAEX)|O|U{pkFs7k8A;036S*NCSGyetnn1zQ0_~!- zDZx@%i#EZy_sXET6&8gUB+y})Vw8)VHJo8Yn6IoX9>ej=~AVNI1PU& zI)SK9h$tcnA4a{enV3-9sV}(jkz|#e!~+T1aEB_SSLgt&l9)ig&&xhmdf4R9v4gO% z%6P&%P-!#GT`nzcAbuE?#_Yel(Eg?J(yVyt=3ls;4EI`WNubHjcek#%%&T0@Kt*j1 zSvYY&W%rdzO1gQvkaZ`a$fS6bbJR;j6(VG(cxqUX!M&%Z!zexUDUfK6*;TT2wg&DQ z;?JMm+Q+8S`>=}u0EJ)9AA!()ubXa zsJZ8q7$ulzxnc*dX#c@`NZ6K`X#GeL}`Yh)X(Y?5}~1zZLz2NqG}N3gcI+#;-Q5k77aOSg!lJ2+}<%q=2!i!g5y zHMfnKyJ=LK)@>u^w()Y?_;A}qxpSk^@Z2^{ZW|=GjgZ^M$9rI8FC zylbP<%(!i8ZX4EpBXi%p{0LT>^S=3T-=^HRC-)7>g|KhH`zGW{GvvNG-8UJ}!Ag_l zN~7ey8C_|Z+&A+-_O0eh!^3@J-6wP3%V}WWhbs-1`%~^exsT*O>kua$eB z`~y~(4p$eGt80g=%gMb~7e#gTaCJ$!*T>aW}dV!FO|*VlP{@$TAdczsn}Usu;xkh@moW#sxga(yMazLeax*ACa0le;G4t{L4m z^B=HlHP=^_yT-a{WNw<5L$PT-Twh&o+LW920aH|gajt(*i_SdyEJa+6JN63I+V`i*}YfQ>D zM&%l-a>K~PvRq?Yt}!mxSeF|%B?iPb7UmiobBzUY!;r+zTxGt>T2~qDhRJNMvYe}o z=PLWTVJI$&hUr{oxEmI`UuNzXm><9@gK?F`xL;eYvZVVp2?|2F0*wdVYe%G)0nww!0=qj zpPOdOO=IPzd2*hWTyZ6fu4IcV>EfmlGUG}n-88@}spF{T;}SQe0=a zTTxsTb=KlKb8(%)xXxnSI=gY5>A23AuCv`eTDd6dOzJwLy3U5zS=Bu*xhU#v$aO~K zIx}*e9l6J)i=xhSxXzf|qm1j!$vx)&V~^%_CgmP$uCppP%gldlmYC~I%XP-(W_h_; zR-S{+YI3up+$hF4nEm3DQd1-Z?-C@Rg! zO=b;dy=6URZ>8;Ur8&9Mpj>G@+(=dwl}6=Ct8%4Xxze!QPAiH&S}U!7xlt_3LR@KO zZqtfTLll*E<}@VK5JkJDB#K&tU2BM<)@Ik*)@-%e$y&~}W^=9OD51>BTI*W#wbuFp z5GQFtTxnyjv>7;EcW7Ep(tfzox?E{L+@^t`hA6ho64qd`)<0s-0|bT>#nGB% zqNAT^Evp4r5So}ySw8`L^AbgQg^~0UJ@I_IDc}zXJRLLy+|7I9guMY^w2@9YVYHD< z5CQ7p*_+opBMEf^ajBDWG9o6pW+c5ow$VoFiH$ar50B5kppPbD(D(Dx2)9NXX-9;P zPR`!EH#+Mf{M@`bI72Y$#kmn_5pnrN0}EmZd-K9nn2;fZgbWlY_U7H4(l(;RvE9T* z5wbVk*9E+{i693WwP+kh;81w_09j9k!8ZT6^>2FzH>}YP;j5c_w0aVm2G;h6o$Bx%o9WzlJ>Bn;P0Uf9z%$ z$=RE74Q>2*+D-XxxVIAqeZSh1pNK*qPbhd!RSAWJKAzAMk0m^%dI)*I-4H$qgTCKW z6O?zqo{$~THJZi=c}_zrA5rLp8um`$)DS=s>TK%uc1=J|pAZnZYXb5E0)I|ILEle# z!l$#>`#lZeBjbqJMjB$$8FdWM}8cA*H5?2G=KVGiJ-9J`ZT97+qOT?j96(kIvo0 zIux6S%#~H;<^gl_Y`J-++&4z^Jh`&E+&oKeo+397@Ib7rF;`X)H_y_|Bje`DT?Omd zx{k1$$GmxJ?j18?uH(sWN}Ah~yh+&ezbvv*|NJ4^SD(Y=G> z-l@51j5?mzk#`-Xt|QewV!XPJL9XMF>qz7tVdbLe5mBzAlIy6$J)+4yqR2fo>ImgJ z@^Fu^x{gxr5l%M%MjfwQM=bXUrR%8W9%1w!djyK>_~jm&@WUk|x zTW8CyGvy{4RcBY-tJ+*O=hgvU6je)H73kJ+x+?D0k?|i}$LOjqZXFa?jdAPL{KwW| zT~)_bneH4icaE3mU{$HBQr$T|T(#=XiE_I})gf0Ua_2O;bCBFQR;Phgb+{^%tL|`B zCwGpFi=t`|SCw+-7+tl>onzjvQ8mj|wcI&1SM74+n0X7V3dB{z+&E%x94|MHm4Cph zXKtJ*H%^lq2g!|Nb(5oUd|X>OH_pY_q-8WPIV{I{ATf6(_$+gA1Z;<@Q+8SP4Rrih6edFW4QMwBD&C#`WF{a*K#^i)ixa)bA;1mO;6q(#ZVznob|DXO=-k zrIC5|cs$H9$duXvqkh0Cr(w`6jZ7#X?}v$l_~YT@HAM|!PA8No+IAzCr6d!=N>+w+ zZHa83$o8_FSxqcSr(-F`gd%ocDn?Zm3lbwz6&rFa4>68jp>=^3Kkg_nHE`>i=qO2lYObl zfRK%m3Bj_Gb&&yaQA~huvN19tWM`h1M+v7Q7cR&cWD*VJ$wXG|FhXAGhFlb{d?Sq{ zxgnG2umcn?q!S*bkX1-57eycjLtZ(Vh0H>7A%E~8yO3YVFfYh6F!rcKiWRe>8Lr61 zk{NDRlww7T6q1Zi6sl%dvmrAhvn05glNB>6L{=L)(_%EkqJ@QGCZ!4%Emf{$p>m}M zDo|!UP`Q$Y%B%{O8J3xr+pNo%84x?OFtZ?LWojgCb_R!UwAr4Z!Pc;$*_qZ2tu;F> z=c0(@8||kA?xIM;N^5aZl)*O|j2KBSVq6qw_(n@QL5o34q9y5II%{Z5=ZqOQV34#K z7sVEQqupRSPbnHz)kP5nJ4d6^(W+>>lcY(}hO{f%kRr4pt%^3}qB#0SGjgLPIilo- zri95wk%ezGCo~>zG%2(mXjCqWD}19}!J;%S7ey6T+Lw!>&No^Z+8CM;v@^6ZN-J|w z%=uRHPOWvT&1yC^o?3}o3Lspq=%+RVsJ1JIwOZ9q?dqav!lG!a?N&Q-Q#+!h#-!$C zrv{}a<)X-Ptw!a_m0AspmRgO=O^wSBKD92jFE_O>wI6Cg)W(dk`DU}xu>sv`BW*2U z%(y6)zS(XtT@-zMvz??($~HWAY`lwNkJUE3DB3k!Rgju(h>tA@5hF=1iX(ip>2Oix zu|>6!HXbgDJHFYZP`N0wbbPaAF%laUo$bm+5yxuNa#75&D8{U|n+=GXEsQOQiz3Z8 zTbbKBXHx^@YEes~IWLN&Ysam|<_|*c>=^h8yeCP&zxg2Au_50SauA32c&Q#IOTES{jyN z#>Oy!m4IUyh8I=W1~{SsvRk z+?^47MhR;M2`daPkZNswBVuiC`JJt3Iq9s6T4&+){$d> zT>5Me&(7c*Hga%kSSjf>F?awnHUNH&t#k(Bq0UDE zn*bC0a&3;TY{ufCurziS2-517tPm$jNcYUE;`fOu}OFo!h9xz2oFNG2e*_;^Y{_cg8WljbpxK z6UCr$%+3hJcWk1lV*K(LMlB~tE!UCDe{7qwa1!H}ljE1`2*h;^bC%6x5KdwY zbK4k|=ycTKIx;!SEn^_bg~K=k=s3?2D1aqCPDu8Rq}N6c{@JIyd25*LjXi24Dbe8d zP?8~rN$(350F2$qG1^EjnDo9lS{E%W2^`}X%`0T2!WOZx zK`g8QWrY?khW6$SK#ILNX|$1yG?Lx`nDn9$RKZ3?DWrhH-n=YKMzP?nP!UX5S3hC- z6ZUpO-zmido>MoRCzQamhwzO03Ckc9lnbaGF!;pt?U2qNPiK!O->^vqi&Mz+@pz>0 z{d{GRSC(fFVabD6p1z+9Wl*UU0t)(eJg6P8^zq6VNF|S789aMaJYjDrRh~{IRB!kL zazdFx>IdXe3ZI5RVUR~}*P}`52jmg-0f)kpM{n1oedh^8csi9X$l#*v?Vfm1zZjr=yPf&MeB$+{Zh&EyMy8XA!&H^9?EQXD z<*)R)Ai9e3@qoe_W@%(j2~8Y?O5d*h2}`I`xEuC%Hk{?@RQh&LrEu3nSo(gvVDJP^ z-EfvwQ&LsIa#xHYGuwlc-QWR7aRE?z?HELK{Syfe4-Ef2O44z6!Nl(9C&qb2c2^2uC zG%`;sUhsxl8kxZw!QD9n1{h#iT3TAtp+g6gnZqoDa68H%CUeOwgNSzI$nnA~gRY)@ zLmo}Q6UeV;mO*E*x8t$%@tn*u=<15eEQ6S?%ooEb;Eq=YnKY7ilt!jm2AMCIrI9JD zg8Dg`Wl&IR2i#4az@e}Vx?~WI@usAHPiCnTI;b<7M$sJNl-l`fL@?D&!)RS9 zdpBAthqDhW>C7k=?g}>+=}g1@qjzr7xoI?$iF9Oa8b-g?1dx|>K)$VS4B?hM zWTT_7i)^Ix4HxOGLJceFmgiGkIuFM)vDHeV;YAA!e@*MVdHk3wFJ0K9> zP{{Y=38!e7M&=o{3kFXqGYDs7_IAD~UeLq=_yYoA2!p;C4g1GFI{%FJF^|qXqisg( znADkY&y8(#z8P)f>-^En!d*F6q*HNXJtG3n`Sk>Mb&f-zkOs~J zHtQ3d$0xX}GwAB=co>;Bm_cUm_d5~>eXQRL)5v@>aTvlTO7au?wPm~nGHb#~W@3|@ zgfg21mpQ^7!9*a!jv=!|;K7oybxjz^w*7&Hz}l;#F$JA&%!xGtB<2Sz#y{x6_Q1=7 zJz?wOz&gOe>cBX-!QQ}LOoSs*wF9yM+(`|EzTJ?j2CTg*Nas02%8XsPtDCa`r& zU{RE!V=)4v?ZH;tHUukhJPbW?kA2$@JYa`BWWTlp9#{`_V4v8!9k^O1w(br(7C9A7 za!hR7YQPr#+6+8km26!MxXDez8%|$Slh7IE+bJz!kz-*2TrNe5O+rMZyO99x&o=@# zoO|roK43Rz>pH+hI1;Cn4^KEH^?PbMqkKDHlMwI}@`Rv-L7}M8x9e3+O%0=lD8kw+ zqM{UVE)-si;t7wi0$3}GS1M8v;uFsC!pb;6($xapRzSP-J#oXD7TSbOuKBaW6f3lK zscfdLTZ4T?I2v+`!Z{e0MhqK+W1z7ySjH)XO|DZ7>*N{;umms-wiveVl3}on9Dc0} zR?2M)u3@FzCfT}3reRU^Yh|!?XE+917iS>*wK86aVUr7kUkhXt#@XZ^xv(y@ut#oT zgJWlk%w$uAOji5CO3r*$kqh_(4zR>Cu}BcUGry2 zu=dJ29j-JoeNw~T@5wBKOy7?u+&%qzX4x9T{8=AckFC4D8L=aBHpgafZ1cT$R}`%) z^Gvog%U}yLO>2o<1>6aFzTp8z)?VqxqSDAbeY{>%gzBi{BlU@p<2a*`GQ~4HUqOX}gq-1JM)0J* zypjvZL0I&;il77*`wC?*9#$~AK~a4!o-o(*)2&RN`nZ|z36+6}5t4RD7jq)!x(7hY5g8oAym1@^A$-CssZ#qG3a z&w!d=cA9lXBYGnz9a9?k^2%LlD8b7XC465fO*au8RyVVZ^JvQ6b)Yfe!31jlwEh5@^Af{n^CJWKN7iMSNZKP-`1Ri4P*GTnQKDk3yX%(22?m zW%J0}D+!B%^xgO(%9qpKZ?UF#oj-_Bi81#>|ApYKJDDao9RHSc6L3q1zg~CVB_g>s zO7U{L-V2W}PjgQ8&$`wn0+oBtil6?Rne{&h?$M3VgC>%et9f3AOcrF!DG<0 zh0y_s%SB)9@if5pdxU++I+`HN2^R4CWG*%gpgUni3fBkdR$S>F@@Ai?bqDYIReT}{`a8f=B}WpQ zAuxU=^)V@wT?xRE%>!YfUD4BI*2Nr>uL1Di;B({JsJ95y03Et1WT6FO^Zt-wq(x$@M^3Ey@SlMBe6v{PaWOO#d@}_m!?6mD zDINr|pe`zTo1$QKLd?tHu0`H(o#aA#Sljs zJ+$$P2*nd&+_PNf8psi4M?0gA_&C9$ZCsxP^&e7LbGS8fQTw zzy1)w+EJ#MUHqgv-+C#uKP7)-2!b~qel1`&Eb#GjUk6oEZ_h}^?tk&-O>Wb${j36G z;Z91;GG0Xfq%)DsY@`cF)O&a|$Cm@{aG!ty5E}H%`cLXd5Zqp}Ms!UqATOm$R7n}3 zmj0sFZv7rfbxXQNLK9DT#o3#oNe+XcoT z?tLi@nm>1p{5p9{(LoyICUy?8fk6ht%0Y=Hmq&4ifyY#%=7s3b%WYct1$XmlrT=jA zO-?*>gAg9uz6!7QmTIQ`k0#LNP3yRSfJ;8DjyQ4pmjQ;18K)DE&l7HOV}EPH$@D*~ zdR+HK3$sOA{q@gQ?^DTlND;LJWKuNFHz7BD2b$;(IByIckO4pv{<`bl%mzCD&mqt_ zY#6eIJ&{Qc9}+j-Dlgy8eu$Wnd>9AMKS!77)#h;I&>$worGB;xnTS2QHg-E*qOE<~ z54|-qJkX{$w)Z9E7=~BEqlqYeE$(f+4w#So?wsrUn8P&i&`P7FY0rJ-xunrK1Vzs) zf6Kw_90DKo4;Bn;Yl7%{JrIm?#v9H&;ZHQw;kVlIY(kri-jE?2@T-MdgeCb$tY#Sm zgO5jr>fLieAvs`izJ|azb|y;GV|#Cf=}qGzH+4^q!b zHRNJAF}%PG03CFo>yRn2@m8AvN-pv#QQWqH?Gegauu@Ix{V&ERvkUH)g=i^>j6;^x zR!qTb*x)l2Zi>gh`(+^z{4{h4fW1x=x}4)u%GD*pklaT|cv)(Tk&6#+TkZ36Q&#Oy zH(TZdGP8-X$i1YQnTvZpRaqaoBym(CNb^9p%i)jaF;sK-O#Z22DMb! zMjApU97dPKK(|v{g>D`m=ugd*lj0NBbUv>*^X!43BzTQ)$MqnKDkBEMdWEX8zLA&f z7`wM86iO!&U6uHyWL1?}xchryzywmvMjJ%~uwvvq_fQ4U;lYy>33n2lL=UepNyT0g z_A8f;7RJ5C<|uP3DQFY!M=#>p=Nj2lY|L%owAa7t3FTN*2c%56k6xwG_h@H*Sr8!c zW=5A3#W5!)5AHBO>M9iegaqoL8vW!hNuCGJrt)Y-blk@KU~>IP=8jpz3xHYj0z8}D zE-!GbFu0I9S>hAlg)rpEDuvzaSBsMg@_`(%unLE{LiYFNB%gT?nH4bXG;5jEYs_2%BE(Nb literal 9138 zcmV;jBTd{$RYy{3NJ@4BK`6B^{Qy|~904l$1!Ykex+F8=!HhYrg0C|7B zns_zwbCkSo+#JQs&edUu)oqUYFM7ncwiRZ&bQKKRY1x1q=MbJdsmwT&?jPGkL$0Dw zTlmn7I-*2!6T(H;WG$l84(|or1zrXrmEN#Q6IOb|E6ob6G!3ovA38yv@C~h8=|6;m z^uRZ~f~Eg33X%ig5Q~_l|4<521K%)e(4RtG!4P@hGF^-uOP>7D5f_Y(=;5@tWZq<;R{F}-*8NCNTz8> zrZ+6pe|Q7Z^$n+bX=tYZum@xj-w;hN4b$`=o*|!nLp8niP3wE>P5)I05#OrntzXmn z^;V|L(|@hx0lt-o))&3C$AwRCrO_i${{;2cSG$OM>yM!xy|t)mEo!kA^sya{D^k;n)U0~ce}#d}eJfHgtx5e?8%U_rnnbHoZ(ZuY4k2mZ zD(j`SEJ7an)>&_@wODISYwbvq-nwgAcP-Xk{}qaS`qrpkR*lk0^;Ra$s!~m>loBSr zwMmP$Nz>Y-{~848^sP>M>ysXWoO7eB(rJy-Vw7f8DE(IjkV{T0l-??Z)+j>0RZ1_b zN-<(ev+9(lbxQyB2=at)Wuld!(tlloobyU=#p1-3h5}1Rk)@{~=UgesIk#%*-O^jR zjHlI0Z~c-2ay+eHdMOa66^vNJG^>K~;j9|w3X;cnOtY$(rY|5*IIUu69n)LM^j~Q} z?)cU+y;Hr_jO(8)z|uS6hgeEGe6)61$}{`zMjb1vUdR`t(I?tJ;{Wp2vT%P+W+ zb5iD}FM7Gh=F2|q!lzj@dKsvHf_nMYE}|YH=Und5%SFBXqnC|TC~9id%R%~Qk(^Ux zo~Av$?9+p(rf7O=8Y{ju4bxl2^j||j&MDR{O}q3~Fa6gh$T?Y+iKf*`Z>`c>t@K|R zK+bt{n<_{j6#n`%fC07w1^bLV<4;s!CoI4fpu$a1U;^*&oQd=6B@h9gq68;_1WP#r z0)IdhexU?5!U1mp6lTC{4i^D*pufj?z<$Daz!X3P+xUmP=Xen8CL9Qs04F>I0{8$; zxb?rd3)o4x2rB>+p7Ga*uz%Nq1#utD}AWH?n%*0y)1nsT$<%=Y0=x#)Z5Z0GBoE> z&r5&EU-zu&r5>0*Ii{C-Wcnq-&ehNc#y1c30;gM;UH>RmKrmtgY&L59ViyoO? zuS`>~Oh1N)rq@f;>#6D8x6Mtn=)S)*H0RR&dY8rRX}Udqo1r;ZT%g_!>LR@QN8F$e zLY-4wqOL)YW-U>(_SJM>eMM34SfZvVIDdKc&k{9VqTcP%bbB-iTwB!Q7By>o^c3P6 z^=^=sBB?2Bk=lwC@n>ZXg==Na+NEw{)-2X4brW??*Dm$XDm7iDhCtan=q|Mb&fg*} zBuT5VWs5`9IrjkPuaaK6QoYNhchot5wn^)-Nt(s9Yr4B;ZITu@Nhj4gU7MtTw$`kj zHEYX$q0YHu%bsDAnr>3>D)m_BT)K1q9_gPgn{L^=v)-+>P5nYOYioTWmSMX*z5AkV ze)A}hY-~8^g`3xHcuwz&bQ}}3jT^QJ0FDqG0l+QNgL5ilG@2~dLunJj;bgHMZaCbH zNhoK#?M&BH(rCA)HD}>3ooe$rgShK+0&%IYKIaeL^SI86_nwO9R8`fSCp_mkEcoVg z?zoQMe9qU``<$)MIdx957|uG?`~T@x+9yueB&0-w^9h`Fs?EdCX;Y(0Pq(|-z~HP? zaitUPHscyN>(r>1NMgDjlx-%Yv(1jgaHWkC?#6<%PAzHP)Xj86bhgvLzH`G& zzN6v?@%|hn9z-#m^7^7+{}c%1i}04F>7{C#QZ+47HT_c}kbmOs_ulWO>37rOchmnTG!qx zef@tqq>}H)y&q50kEi#0A@=l&pHKfEi@XzWKN`LC1M2_#A)&rsP%r&n{eLdi-J>c_6&~g7nhwsQ(WJa*6MU)Jwml z{y!VY2z)=K-fyYtx76ad)c-exMB@9&dg)j8{}myN_HiCY{1M)MO`P=q2|*r;x1SU7d(!lK z(*HLEc>{R+J)s{I1&~ML?H8r@lhX8)()&$0f{EUbO4E-@iyxK#za_});O$qX_p{RU zv(o!r>HmX*bbY@o^uyBs7X|qt-hNoDCZF9ziJ{mArwWtx6vdcUdu zKOKnx-F`{y!j)hr!z~P4B0s#ZOJsPfhd^}pH3f@$!5{sDDv;wTSkxkD)C(Fl1&#U#132y`FjgS^@37OL8)GlN&nyvq?#|- zq?dwD`Uiy|m-vECMDR&d@JavR5ae?_3O?xtqfiiv0?0I9FiI~dr70+-MNo@k?P)q;d6l4s( zpcV>l=^vzmd=PKJEnNBsLqPt9w;-1;{exAIJ72Ji2zqG>dg&iD0r{1;pqDTGgDD_w z@CCn65KRA|737#x@XLZ>nu1~a2d^MO@CC*6f@7M3V|qa{{ev_h$1hl>mx5FMgE}BP z@CD8Ef@qq8Xj%l(^bZ1oeENcEdO_=Y{bp-a|QN9&Xp`gax0Tt!(;p|ZNtb3VDa%Cg$B>hdMbYRsz4%FHTF16E;Rt1+uGD>J#9 zD4iF$Afh52qaT!RIyERACN`ZYI#QUZqEkiZicXfEQ;3T?TXeYSc+ml4vqUEgOovO) zX@HA5UUb0dh%usLW`~=n7t{xczKT#I8C8mXt4M3Kwv%cC1Ion7lPFUt6>6pDT=E*w zD)b7)LbYh&LcP#0G)&KV^N@<6Watz{L(xz*RLytQ_wjr^E_^Q;J|iQgPxj4fwcRK6 zHTj-=P{dD4&$$o3DIb-u%2(yejPJwpY2opGDf-BW->2pV{6L-;2t))H4Sg#Gk#JxV zxCF|;+2=hLL8&HAph#hYij@|i6)YmCg$vk)1$qI&fMP;$3|Iy%v-A*DV*^A3s>uPG z0n@Yq)BNi>akv=rgfBuGJ!jH4eD$0+Tnu}JVUbbKNnQ+(Y=lPPQFxT3BwG@eVQtrQ zx^OX+>d;BgX>>7!BBkeS;h#T?p_LY)l@LpqCEQYgkW2Wb=k#$_2!@7YLNei0XeLb4 zb9xu+#j3jbTGWrH=j?H@_EZ{T4FY=goIEbp9z|P&^qeSsYf{%GS)Fa&^_)Z(s}!p; z5v!95rAnzx)GC!qwNkP8)Gk0(%vjBY6%DJV={bQu=f4*G@$}FDS|;i_Z60!uA3s7i zItm%71tTfV;3QsZ!Aq>fGM>d?DUqSTU@HBsl(X=bEJf;MdFT8&)IWv=cwn5@!e7C zIa!}`RSS2LMD?6}afgYx<3z`lohvvyT*93&EWTCTnd&*ihdXBIPMV$*yx6C$>N)AF z*gZX`&ga}$&$;@XHs4CysOMB2M;~n~^_)2uTh?>pe5YqDbdsLat71p>oGgyhOnOe6 zdK(r(kTz!gBkzX>n_vQt1Mz%Dz7DU(TTL^Y3<`I{;mWtX86(emA8-7em*L6qkahR7z7V~ zzk|P_zgf1?`E#+GF1A~t179-B?P@pN)6QQyHRdF{(GoCc5Z|kwbEC>R&gXn`93sx* zb2|Br>NZ}@`KL{l*_@nYII{`hcDix~&L#+FomwuL<#spSOekl&&2qSs2ivVlsA=Zi z<}aPvbfe+Wejo|eb~@W-yCg!o5{YicO(HO*`?8%iWi<&h@aF1F(Y-OM(7 z3bNg7V{SH%>(8E&-A#vnF~Pq#5w(x7HK+O9U1OrsNR zckAKC7*xCAo;RBn`wCGMsp zX+~_aSksJlW2!~vh!7z{L`g|WX$THD;4lOS9B^22E#=U|4JX5uw(^B2+zm6@?dj=u z!womwa03w|PDY$aA|y#JS+XQ5Dr$%lC1tJ@f`rs`qtSjKl{go2vhoN97+@emga{EO zC8edM){xfddgU;>mRdwwqiZOKAwz}$K|(t6Vb6*^*kLk5-Pf$;O+`HXDIzyWFUo*>x>`cH@z#TGw3THKx{_&Z zfrcL=P1ZCsa+|@)CX?lGCDg4ox}>C}T0mN}rWp-NiBW6x(PDD4?QTr1(Y2Jr=%baZ z$#60#s3_e?yWN<^+i3gI8hx~8xTaj`)EZs1+l{H^!{}pl`H;gU@Cd->lxp=5dg%Zf z5*mUD4e=0^qseTzQfHe5-58D7WV9$KsGX74n6n0V)5&n<3e#2^QQ}F!mZZGaOX#J; zcAM#Bx*P5#yV0I>&~&z0ZKt!nUair`=#pv;3F#0TYK=ZxtMSe%VVp}Z@>@p=;PI(Uzr3HF$G+?ik>fcGR&9*)~ygMG$?#EZo|os!ZPiwWUg>Vibc zaJV09K06caM~rxX@?JW5Z<2Xmk`?hD8^F?afF0>Hz)pkrA;;lKup=FjUMz+yb+Z*_ zEGD$(NI!zzh8n!n;C+S}WOxj)8N5dC@C$i6nBpCL>I_d!@ziJZiM*+L6&?fj6dnU6 zb*WYnBevNQ-HirSJqjm+9R=@1hrtf>j>BWY8NTa6unQdr>@M#(egpO!UVV)|^Dm$I zOYnN|$MBxR=kccg8AFfZefd3)0Xyq4U{X@8B4urb8(Cz`&Bk&^lkqV6fRf>Qu`Z<)cND*^JC`Egx_<9L`9Wv*k?vEzSdb3-3H{*xNhxWSrrH zr?7+G=~u9?yywi|b>?UO98PnFf0M-Po5V}1^maJi6eoSk2b^Y#m8eHZg4HC!Qe_T@ zCVTSH;-Teg(QY>ubUB;N4M@vJtEuI~nlshLeeg8(2T$V9;WI8^GDq_>E?^J%@DKiF z7hJ(t90)StAKZvPhkfv=9{kHZ_zwQ%7To90;T(|R9Gr{|*an}$444Hn;2Csb8T`vs zT;T$~;x5p_UjBl+Knr`ohg$&VS5WciFblLW6|eE0pYjU4@Cxn)1&o5%F0AEW9>KYc zfVq4GTX@Ss@F*D$Cz~&6 z-HF?{%L#tM#ZNTBRsLlsKBtRH5I6DfD^I|c#Cv{`mk@$ocl|khgc7X85uC)od;||{ z#J{}rC^?MyD?8wy&tWJ+@X^0q#A7j?lG3)qjKzdXBQ}|kH8^na&T-h-R)_cjs?dA> z92TN-j(@oTpJi>PgR0%$6f2F`WVqNG8?T@9=P>TWe?FdMfsK^RzysIVd9DU0?eI?$ z_Id3k{FHr0w&CE~zq~{B`ImFJ0CKR6=K#VnyudH~g&6pS8x;xiQ(nq}m!5+XD_sD! zg?~BeKyE}nhgbMf4o=}T{3r*{@Gr~o7(VB7ILN;Y!(aH9ga*fw`jh_aD{-}c! zWV#OJFo-Fm7$RdMG#fXQ6d-}PTqc+ei?|*W00q&?l^}#s2r&j3We6dL5Ml@sh=_=c ziAYTzyo*mr%6`JhDE8Qp3k#Lx5WZI3qShU3LhV>zT3*ft*mwahql%n@6Z)Irf*H|*mjVIw8}?}cli8mrlTpB z8!gxIPinQvUWG0f@w)PyXT{@kUg7IV2zSK|(SwF5`S!YzG2gkXnaH)acP;+QsGPZg^=C z!A|q+q$CEN+(KdDTUueOt!`+xj4L&v1w$B?DB_LCD&~>OE7R<352CCCLBE1@$8z6kLfd}+*v~tfQ_fA zsiAKUeBZ_FN)>w^mbOTgvK`OBGn13n14`}Zsk%IRi5Q)sKA=PSXslUo zyKi8=2x(qq`Fg1l8H{Llk8yf3`!N1nd?tIOf;B#5N#Fe+{QBxZisHK{@Og1NsxQ>0 z(*Gc&-Ulu~7Cz^eJ`vvOKeUXHB7t{G|3n>$gMSXRg~!7(Tf9bh?Pp2bYUXRNafy}M zBWwXwz?R<4^rK6ft61 zveT0VvuH?eX5p?^a5m5=Pim@0n-?pp0Fh$nh}&UDPjV7N!dV__&`IG->~La#2>XT) zo>Vt$ssna3U@yOU1M>m*RR(cSGOeS-^i(#4p-)bIZm`j`&=x8epIpxB-&&-82!z>T zg-TmEmLJAWEs8yMoyft zHC#foIC&r>U9=0Nth$+1@eC^P@bQ<2#o7PFl@du|F-PrD&p6{mCNHXkz@HG_7cL{s zFO*>~1JiDJ6e6^fxz6Fj`X@FOqjxymD9EvB(@dw`b+qS-r$bCmG>V>8_7=gn*=Oip zsVUB$+N`w{L+7L+?3>y)8^>_65VcfnHWmbrA(|x~jp1OXzZ558Oq4o!9W*Ji?`%z+ zM|F@dvWx7+ut7jGKxrV7|6!SZ`WQAmY_ZCscgZM4T%wpuj>{=QAON~UV{|BSFsUo^ zWLt|?@H^+avB4RI+Ul~K>NPq;V?)W?(X2YscbU5c%$L-BJXgP7~P z@^k>k!!;YYjM@RW7?*^1A@^0+ql*R)2V>wqFSDh>;<<}ZCflI*Jnsg_^Oh#|-v?Q0 zF(taQD}5;89{@wC&>V4^wjd5ur8u}Q-~r_D0Y(r-?LZLd1E*H}-n03dPF~|qj`9qP z9<(FF95>0$fYKWqAQm?IAClX4LC)EY<~t4e4-FtuaQos&2Wfq-S_wcT{I~Qn7GV+B*>)_ZG^VyM};ye$vOLeCHW zW9D0`#c5dk@do-KJNaW*xdW@p;i~8iq@#s-;F-&Ey#j2<<2{>Y9jaZZ)eHBr$8`rs$x-eXHV-vTZR(YS0Gov# zhRXw~*pHljGe!TfqFZ^*#GTNskk zvCvW;V6^h6k8x^uskA9g5svlK24KvZzP`w+PrD z7mkWn$9#2p8Fl-$<$8^y=A&o0MnvS~$JN_q14^dS3oIFcD(QH>hr22fb52%UGKcN| zn8nJL19sO)^}c#+Ql4-7Set$Ejs06v(>@Gic3Bnhn_gc;jY;=wv?HxY+Tw|u?H?m^ zZu$Xzw~;Q&k!*5k%dm#Fqtn!pG!OHl2vP4qdv7s3r|A8a0`%5O#ifM2`l4J7_0HWZ zRccw?nY}pbsNp9XZmt9zt&6z|j`XH?^OWa(hCIS}3KJEda+@KQRF51l(|`eJJF)Bx zLN1WkzJyunXr5woKZTurs`5S~MM&;uV*J1$DyYsnGPBj-5`(xDKDp2*(u$fX;9Bzq zV8mpOXQ(ll9B5?{-hUOjAYrR3uQ-ZnwXNYB#rS3)htT^I!qkNw8~Z^9X`qmLwGBhKK^tb zZ3=)`%w9C7V9@T4&nME+(bllw#X@R!=h?;T_W%*7qFF%KqR9h+@V0ko$~a?}d-xMJ z<6Qrig84R6f1C?repTBVh@^|&3bl~(V>_*8*ss?IHA#izQ2I=_EU*CadFsCTJ|-!!KGw~|l_lPLO+e8MCD{ot0rTB7!(8_kf=!~g&Q diff --git a/qis-compiler/python/tests/resources/entry_args.hugr b/qis-compiler/python/tests/resources/entry_args.hugr index 8a4977b3d2b6da57f84d479c8efc1f2e840f0792..46f32988d4e3932f1f0ced057be92eed8c314654 100644 GIT binary patch literal 1929 zcmV;42X^>KRYy{3NJ@4BK`6B^{Qy|CI{+$ZC>2Gp@TLQN;WzSod|M4=MyXCBA`%bG zF0~q}{gK!p+OqU}Ww$QhTBx~Q7ZBzGumek?9TA}w0V7k@iI!IGk{JDONp_L}LjgSj zK>=_7=f=@;sh8r`=Ie>$8OFs1Pvz^0qkTU5dO2?0^{tIQo;Mg5(e$mwk;cF8oWx^` zWQ`B(`Da}R$C>y_0`m35&Dpo^$UM?|*SGFodh2;+)HMf_#(X_-JJw|`zIKfGdgA_1 zAE2lHx0q8DW8DWb1YcsYjE~`N%TPNIZ!`IZ^+Gei@7UGNz}0#)dg#$*8gP z+1NC0?3$rD>A$h`l3Q^CKnsHbD;&$0CB*#F-$G^goP2vIrozy&ZR8Mbu9r!{Bk zsn7$EVkMaB7Gh(u0{@e8sn4jN**WW@zN~$bpIs>JoZJI_?R)(E4)TbWFlAgEX z^I}qe#?Bewe_qYA`8Re>pHKZ9)Yq|d_B@x`OmIEt-?ORs*@Wzz8;9Ct*g3bKljkY-n;9Vm3F?6Y z_2&l&sPs#JI`LGXT7Lvo0RQs>s|H!98&IuWl;-FxuSBVx}tP7aUWI)x^|&TVN@!kZf|-{sKdZ7H<(A@jDJ0G`NOe%k&i$X-(^@C zW@X0;*ArLz z?f>U2ap6ziUoP@d&olXY;AX3{{xq3e8m_`xUzZ~k=4BVmSC2WI1d5hs|RYTk*TXr~F?>~c26CCm$D)$N*Tb-_k1)~{V_Sc+(x)iHN?U#I|7o2wwF%ftKc z=T1+T7XsylSR*_xo`Z;=@g*v}3I#7@=L8BwwOVVJWvRi1uZK18EX#fC3(H%k$-Z^p z8j}c;ZH*yA3`2&Psz&tMW$fb_hZy3k%47(}z^#k$Rn=-lG_HrS2wZbr4`&^kgn_Sz z$#STVv=^@o`(WAV1-|fAwXTPAz%;%p&A}M>dKje1IH*e-;K%}B596!CCh+xer@@G7 zVOZ``ECN@+GHjRP2-()W58>g*^)SivDB`QCAzkmPFspMR(fD_@YVC2W z)wNs{Se@%a$GQLjXR7AS_X77gSa z?8q(Z{>ot}zFMvxmiT&CRl}^V)v@sP@D?@6^9_6hfa9n!sbYwT$jpd{NYW&Y0bl|V zA|k2|5+Ff}n8XB%5Q2yyL_i23fry9%A`*y5AjUB1SJTr%nCv1Zm5ceRGwY9?TqZO& zN$>C*GFc@ZK$(fM4@;S#WK)?763U+mSgqH6QsE9F84(dbE+Rthh*Y>li|J%N8%Pod zQsBwVu9;jY?*}6-t%D{AKfBk5rRb{3(2Yo**3z>9tQ_Ez z$pr$EdA|kka^4tqTu7S!ySBfJPJ+3nTFg?O`p-pul<}BwT6=PzUKSk#|1 zkz(noSo$lLK1&oTs9&-Fr@RQ9K8vO2VzGSrzvb19Iv08|7IiVD(~q%U#@H}sEIk@q zW{st9W7W8^Y+l{;Z!CQrIInJ?zp<##vGj5*{T%!M%&WU}6GW7xtqNT_n(eyqw7R=f zqMOcG2&Kw#cpX;n=1x7-&DieJ@7K`3vEB5k%lXggc;IfkJ1@oY*zVuNRUdAE?dCib zr@(e|@7_7}&RHQ!fS?*6P`&#IsPx@Yr=428Dgae^{$8Czglf^0wrF%qK2Es6dMgnQ& z#oCDiBY`8n!m?AuWi3g_>&eSw2+QJzQ#^0ta+NVsPO9>H^60xAy!7t-2Jhbey}Ppv z6!CiUx^w@#J5PL+KGp5A zR;?B5ey%%`p;_V>_fy^bxfWbZ1IJsVMUpv^p^rJ@JOjgI$L0y)LA|i9VPgo=V6dBn zY2fG+^e$BubhUedGdOq!Tm|}RP5nTDdf)}T?v$G++H;?t>hqpcJ)P$yd1Trt zRn~1Kn8WeB(Q)%CN8=qrn6#j2b$1>UG_}oHxS0^Ac6T0-oZ4;w zre5kL)O&3A&ru(sz;@UF+`)x>-pXLRd!BlS5T+s?7^&NA_vt>r9mjjv?f_3c2z2+hXO!i6IX7mif7 zqS$yI!AdNH6z`|PrU)K=u4^m7F*LfL>UJw?@wx8paBoAO>tY(A8ICFL=ep+oRF`(X za?OS!hGj4rb`b+(_fxe#*PS5?MI$gQK^6CNUC=fw!7B?-7+|f${ap8cste+NuA6PL zqMIn5|j*Kh<5C z-w0xnB#pi!^7}^c%OzRECvq(;VR7(%89jwQ}xC=}tFji6|&)y~-sfY7K>En-AOWM)Q0 zk|aq7fC3RB8mbNw0HJyqqy&l(f`}nRKnRgQBoGNiBoL86jA7CNSJTr%xW6M_l8gCX zXR4pATqbmEBJS`vY_dr@K-d$t9+sj|$+#jHB-Eb?yxLy+WWpaL*&>oYTqFhCk*st{ z7Sm}v8%UB5BmtAL?p|}DZ~~09v;dl6erDlw=J34?43G4R^MwiniXOeuQs!(M0Lqdf zyBezs4_hhLj%j=qBgaMN4yJsCd#83qq<;(g)38h%e)pURjqZtKpdPDz5=S+ z3>S}Qc;u0v7Jidp+G|qZjAn;%_mj3+ZRwi>nE}OTp2&PA!GY+W#SD7m@T}i{v4lN~ zUs2l^u&ff*6QEKih?%B`P<}S4s0l zQfuWEjt30UY`@YD4_9N9U6L)~sm}z;8|9 zv^SXye08So=Kv*J%Pd!&mH^YGKGs_W%i~}E->xP$p8F_@{7f=yf}H(yf&4SfsB+|Z bj8tgWD6&q*T!@;GITNEWZ80$paz%7C%MCny diff --git a/qis-compiler/python/tests/resources/flip_some.hugr b/qis-compiler/python/tests/resources/flip_some.hugr index 7527103e48c2b6260a0d49c6212b11be9b21d847..0c901229b09ccf89e1b9b4d4f7bf0f448d47bbda 100644 GIT binary patch literal 4286 zcmV;v5JB%qRYy{3NJ@4BK`6B^{Qy{9g#dcLKqpmzmKAm4(V*~iJpnV{sgp4xJfbHv z!>l?X!1yzH03y$8u0Oo`!M2=yB9cSgAe0h!28H4aFq|>BTo}}#1|ML6=|`_I8P_Ir z^hlRy%+3d~Y40QhQvzH9X#zWzbAwcz1)ru9=O>qvJKb)#$IK<+({$2Trt=N2!KdkT z^BeTqqYZJLQQ_(@9F4#U-zAU$3e5XRGDdln;EGPI#ue zI>#~);?s0;UvZV6?n$J?;8#;AAckKohX|-{EsHN37|vAP>xIFu_Igcum#N}1ou#zm ze0HAXPv3Pwzk@nmL3~>bgZV9hL!U!b1 zZVCDw6G|{a9}4PqP*C@-iB<*fbx_dnsPMWesC)NB%jKwU3i{m@UPlFW@1$t8-0P_D zx+~~+SWx%QidK!IIxOfr_1>v_r-jr1lJ_I({y8p3{fPdzcwhRG_bv2)Qup^-HIDj8 z--UYbLfs$Ls=&Q>q5m)5+o0|*qvdkc+o1nBynmtYU!&D>?_a#nLH}WJz|jAd_c1$S zykF7(A2UDbe*)ecK;7R*i->z~fcFW|e;exl2()V4dmH+1#QP!C{TXNxanuj--U$6a zQsjvDIP`xf$&U9u^#6ytKTnJ0sQ>Z)qyN`}7R&!Z`d_2}LiB$Gs(CLIwy6J)^#4Zx zi|GFbyXYT^_c!WoK>s`7{2vO{01D+G1o}S$1)&5gLQBg36X?GRDYT@l@h4F4U7-If z(0>=G`wz9G9Qh77o&+VAnjcnLXi25ClCty1aTZN=j3&o`C+Xf_0`A?CE{AehP$^UH zosf=(s{)2f*~6Wa!U73g4kv_4$-|wap`4XMyAr6BFz#MNlqVWS-BN!+oug5_1{D5t zP$_q~e=wz7aVMHma_+1tWq11Dp;GE_=P{*p_ZM?YX>!zWfO;q|D%_yKh7UB5aQP`> zI1CsR#!JA2!*W$_r4UFfP$^69V&sB1l7ULO;;4}g-be>3CCN{y5fN0%kxTjhCvW5g zmGWIm&j0kIEgVG}y&$zvAtV?!sFa*@Gf1NvDZA4XQi)30olvAnrF2&zxlk#&lXINc zl5tgP^4Kv6z%gx|0@Ro@WXu3ilK{_wV-8^FOPx0am^Nxm8Z)Mgj2R<<2?I6hi#boz z1pu?fo1C+_yOcd#rV9Y3$1+u1$|o7j3y7wS_t-H68T8e3 zm^19P!%@6iwZoAUuZ|-7t`2jCslo+h&aiv616PmYcaLyE_%xlahqh7Y27O1I1fQl8 z&jOOjr|Gmo*eG;Es;+DdueMFmu^g&|HaM!9YKBRS7=Bpajlq~5m4?6YX0wenTUVxV zIlj_)fBG&U@ud;@#GvS>$jR&CE^V3*bT!R zn+a`Y)l`vPsc2L)wz4eFpr|jCabsIqGS-RD6p!3FULf{ih3` z(>XD?EvDJx zrqV1qX*6g2roRp1F@uhqML#+qm1Qpm!`HRtm}qOt2aw9L8NV(DLt9fbm1S=T&TLKD z+NWt*+hC(;E6d6-7-XHuJj39NHkM#lCZ(U81;)ZsMM=tvi?zZdM@5JVj~OZ)l~TrC z{>e#INFfzLib8rq(j*wkl3tLwDx|PL!jq8@nvos77;#Z*VBujo|1?xemHXR&kwp|# zN|SpRM2AC1^xP3t%9uYzMS0h}!*AnT1NF5H-5ph5pnYk1S5YRjk$qwe#9xvd6uUq% zJia!F!C4H>xQbxCK)cSsdT~ZlZ%$Rgi1-6#pRO3JMv~N7uHp@C;10)Hy|5|^$J}H` zjj3flt2;L8E#iDL3qPP&E$f+x^|SLoWB5^HXLwayZal%kIAhUR`D0B z`vck)XHXQcwhi5Sv(;{5{p!_uw?Z2JUNJDtu-Z*@xm>QEo}L~aB}$a=C{d#1C-vjg zBx@o!tpkR6Hp@CXIyyQonv5oExmv9j5fRbtb{iVnSG+kmII$dtHaJ&1KvP-v5`p55 ztt>0HiWDj0a=BbRJv~2`$JW%!r>1_a%huG44-e0ct*N3I9%nCoo8-{e)D^>T_F)ia zYpST|$JW$Ok-Zsd`U6Ly&n5wmPi0wKQ#QPX*OfpR)WVyXc#L0r!ErjRN8TkTjseDXaoOVC3e{tU?`BR zjyp~bGhCq`E!`;x;$m-n1tpA%E0jGjte}H2Hvsp=26r@goFGgP77NW$f%A?E#(kxZ zscB<0z(FZZ(Q*!cn*`^6T%XO5N~#BMWNp-s4JeB+Zr;;%g%^!iC2FaQ9Yv%~IMT>> zFl%kIj$c%@`ce(Yr92@7Z68yng7A`8)1w_>)kN%uT%6=O|Mu`kF2^f2`|9u+VY0D1 zfW#6t4VJTkioo82XbtfuD#5W}1s+*U0?tmQB=6rw?23e}=REG*@VDEln%*?kh3 zuylaYKL8tAw2j|zFCI`?yK7xK`U%vTq#Br!8_-dISfDktIiC^4&xBxBAdjt_%*zy- z1A%Jba4mP73fJlE)8>uv2y*FCWk%{t!Czooo4gYsiSjZziHb-`%TZ_9aN=c8(1 z$^C&ew#gz`YE1{Te0PSc?)D+ewfKw_Qmqv0og8guv>lbz4k^YCLW4H1RKEB-_uz^$ zNG&>YMu+&IxTT|>?gi$Xy=7oDy}POkfQNttSsE9wPg`xZo^48^MUsdPU0wli?V?Lj zW*K0&N&cH0G5y$Lpa}}}evG@olH?XCBV|;`7Ig=a8-x-MC-N9NVp8g$(^@wG>gL&L zSc!<;!K+=pz}<@qMAt|mV3ArHLxD2E))nq>Ev6KFmb(o8Gh&ACdvu1%MjbLT3Ssqy zf!XgVu!?;N4sMjCWnvl|YtOYJ&a@w@G9hYtL{zE-VPxkc$O$yd;00J8(M2Un5Re3j zFAEI|KG#f@-Y$612Z^EGzw`n_%jVVO68^W~P7#(~Lp_b?5=XQ~CR{Fv9hrDd^si?R z!G*@YD<2XoF7$j8>-2`Zf_B2tgqqIsdbu$-Rn5ex+O8W{;11*NWS4}s_$g`OaFkjc zpq?CEXeG82QH7y$98aSvNL21Adtubc(#HvS(nDq(U@yY!L-Yjl?5W>}-)dd=#*|u% zd}&r2PsmbH-&HXj3w&K6`C&BMoan%04^HBxQx}$6E4EHm`d28> z>YryzcWVv{EEvNZBL;6VJRt>g+2t}GQr}G4JODdCz*+l8y@1Z{8-2Sx90)>~P!Nd1 zt55oXa+6c?2<71dQBlpoRS>~pP@PBBZIM+D;%4_30UrbmxJj5w(jA0P$RzgEt5R*0H)6i0oy?afXI-itM=5Z(-_}iz6a;46-dq zz6l;RfB6gxmaN^ZfgIzSu-Sh!E5Q#VbLu>m8lAC^YNGR1kYDBU3wV3kZ*e23+O87h zjJPDv?r`pnoil}+XLKUDsxaehjn-$e>;q%4mpxjSwu$mS#+1?rRCU zms82v+hfX*_bHy892-m%ypp2GY@THdJ{;Onrjw?GG3JVkk9s7{s)g`-Mu%Li7kcKL zz)W=yFc8H-5jR|ol05J-N|eJZi`+i0Br9TS51I>OS7T+hn69|ESnv_&#weR<4Vz8j}!FF&}%5&y>^1HWVy+!)C3spKE|GDfmuL4YBX$AJcD`7%>t89LmVuvmjN5cZYKUb=I(RKE*5gh zy2DS4_oF1@pp%*0?N1r;OaWb_0&*C36*|mTk%w(t(r`-CL(6cWxe{mr06iti>n>uM zALpnESXiI9z=H#QvR;1IbEGwVBJr{RBxQlfqwJ>93|B7kR3-eZdc7Qmuy zh^Dvi8lkJ4kzudW!HA3>Sln_KwJrCc#YRF6(Gd;2;3tLxc8>BJ>oK{}K@jB5S*G+p z7fV(dBi5tlQIb2!0s;*J4+7g~>kf>`Lf<-XvB2qwlTw4C1S`C=f2NINAK2QGfzuJE zU#1*_EeeJ>9dYh2?()=KNzH1$h`xyE3lVjv)0I5;6G{DvQyExNmGsn~s>*}w&s-zu zs_UyigQ_>ypR&4VRVXFpPbl?gl)B9*^{12zQa1i`gZgty-R6|~lL`k^epad5tnz`C z`r9NS1QO~`EZe*?0+#wSOWkIc`V$2cQ24n*-R24@v`~MWFt7ka{Yk?%Wq5&x`cq5Y zrk48ih8k}8$wS>H57m9*kXpch`cQwHKvehHL#l{x6Nvg#h;0T@-RBRfA^uZ{`jd#d zO(N>gBC7iwB4y*-EaGPpb(=|4_i03G0sr^<+q+cv&ne>DyVU;^+lxLm#Q#s!e_FSv z^ii$7e2Ke?wwm(w;kr+X;Jx={!qGZYTJ@sEz-Jd7b!?#y$kL!PqAl1YFyZZmt|DgIm z0)5*Dd8risKh}R){h!r;D0}uVrMkaRO3LkJb%Rp>qiFswrB)!NUa&#^pHelTQvX4y z9#p9xq@?_}QvXR9Atfb@w^FyqQva{ie=ODgIY>$A;xFKcdcYj9BZe0ts;GykM#|}r z<1sr_0bHmSWFm12PSSE9X+F@?36GgcZ0}N~6glZnY_Fn9`QjYuXR4GXT+07ZrF3yAHGghAxza<|%$0^0O-Cv>H>V7f#9vrqCT!bW_pC)P|GtQ#kb)t?|+AqaQ?n zq#EZ!6vjwLz@fi{eh<~$#W|eq!mB((GQnTyfgo$Oy;01eX?vq4=FkNf&Y=f_ERzRB zf*>pBFo7J7BF;#(8QhDFI++PZ;vG00aXdiekkb*jJJuL9Lz=Q{^l}*661G6^#S?;K z`o^stk3puLnQSR}yv2^Qa4DBK3ty4)6+Tjt<0O|7$4Oor@am!zNu0WrNSr#ifOGya zM;wJqX~a?Z372w+AK)ka#ijh=+sI3p5V;GCOKE_=pxlR-D8OBM`0w!PQrftba=Wks zPDk8ycbAj%T!y=qlbO7@2u??w<}og%#>w*BBdF=%bi{?(6@oMT1g9fT=9$TAk1^eu zw(fvdVb)wBXoJ%cm%S->7uS}qNwlDoZFSC0c4k=wk_fRLZgnt_0hh*D408;;wltf~ z?#=C5ofi`#axLnzTzUjq*OpX27InoBhd36KZR>#`%jPi%$3UxvT#JfzVN1-eYfByo zvhEX$vZZ@^^5Y)Cib^@VK1?+;C(~(%>C}Wq^so-|)*X$Eg=y@`VzCi+EzFh>+&IiY zq|Pwa15~PPG}vvt!BBT6F~?-vv@z(tOs#I`4`_EGu94v|#3oUL-EL*i16wEWT9hr# zZjH&tbh;LGHQ0$^ZgOque&g2HqIBH+VSS(cY!Nls#fUm@p}cZ=7RMfXS5vNZhriY8 zZpk0kF%CHACD-vCt%<{BT#4JX<_)jm40ugzUMJ$#i}|CzpkIcY35iO6N#gji!L6Vn}nL z(bzQqc1St768!Vg$7MJi3Ji}@r98RI=Qany%9SiCv>=0)9NY&FVsj$=h)r`*l~RYl z(5U7jh7A^)jhZT@$w``zA4jT`G`?v#sw!p4H!W8wb2v%+UXxWRarmY|k+Nx1G!Ux1 zcBM)=+(j>iHxQB!0=^vYYexj!JC(dfmR&hC|iCcGDclU+{rn>&aF6VDqpPU6ZgJ%U55#`y(W84kl8g0Y;lTAg6J3wP>T)Q#=?#JcjvqlcSh zn^{)lmfaX=TMc%in8TP*wzAkK6D_tm1b51VX}oH69?1G+qK}V{Pft%z56{ld4$scc zj;f^k`LU=gIsro*W}S=3LY>Y7UoTKcM@L7;2j+sgQa-6vYG`OkCX?|931u(VQeB>FOEo{Xq`E%WmQFuBJUllzIOF$$tvi%+Gn8{vGvg5w z!a2-oAOu4Y+ZSkIImrg~2DObv-8|HZddan@E2cEI;MSd;`9{(1PLCGL*u4s2qY;bk z4s#O?-mEec{KRpjIx-3v zhGaPsr!{p45&%(2n4=g7Vh{!~NEt$mA%qx02qA+tF?Jh)wA0em^>K3`>W%9V|+vK3i z!7JID5l}*Rxn0!x;5EVr1+fnQoUZBaE;o*JJk{$V- zAJS+|SsUUL$R%Y`t3t3_~XQyBAUbL86gtho0)gzdCr-Xcgw^@OP4I(4;^;ARU z8zC(B{9kxM;Lp|cXc1m|#0SsCGp=)qr(G_aU2GC|_>3}{K|cU3iNXm>&3MT=;R3?x z(=x19vwdO}2ccy|>>L-lQ9F{!E(w)R%x(h#^gx;DUv)6vMBT5>g#g;YNJ9g(O8Z$3 z=j^Dx%1!#bsy(1*^aLRhtnmzFsPkA=_^_3lSoJ<%CTd~-O^&)d$Rexe8}Gnjo7t~&A@1+u<iSa-P$)FB?uQBNW&A-TTe3B7_q zbx(CNqfSE~fkX>zq7rYj?PC}N05WnV)W6nHwPt58rWPa<#`IBV2`|Rlu_&xt#kzL1E#XR;1VJ!fe^TCjM~S#>AE_)z{Ju zRxb2xR$Lx%y@0*F=52J=d#5&jXQ9bw13?HJ^h*>Xbka_gqDc9ORZk1;a3SV`ZiqLC z;G=_WftM|uQ{JB(+zOn(`t=Jm!Jr#fSBRtJh_vr$;0=SYMTMG!*A6+483*pUHFpyx z04JrX$^Grf@0*;JpkgCfrj*DLOfrxcCyguVL$M%}!DJOVMWmwT=;@3W{sEHsQJpOJ z=mzE-(o87}E~zUFM(A!a7bN$g*|+!%w4{1czLKSnzk{EK4y5t1Xmg7Yc z38>+~iH4XSe+755)YEj9zzB^$yBMyw`S!FJhm@XK95q<6GIoC zup@=&Xc!sI-}{JDpH@nnKe||jVcA{-yPukqpuLpQ-~V-07pfc4WprLJdm69(>Z?~` z^(4@gEbw?jKxtdS7-H7kv_<7$7Di8+r~dy{tfK;Lheyq)rXe16JQ@muf z9I%0-F*TYugoI2$nO*u$|9Hc7;@uAd|i*)584RVqG zS%{eAl$n~sn2AVJQ?50Po4Rt-QmrYE4f5EP$NqT+(RRwVraaY1L@8;n0|4?BjH~+R zo5ym87_4P&dWY}G&WL=;Z>s%v11x7P5H?V zPP&ID{lgF~gec|DK!{ROhSHRyG-a%=jMYCMAzI*+r8MQNuAJ4Br}WPg5P1&rl%`yz zGL`<>0%F!HQ>k2~DO=Him8OiPD_?2K17j>8z|xepRL;UgmZrR=vX&BPY06wc-hzTH zO}R^DF8%WgL?x%(r73&q%3hlCm;PA>;?OI9sSKtmhq*zRraY!Ai)qRO<1zj74#Xv| zJfu=U%Ty-QKLbJh;g!iWWiud`>7R!n_VCJOntrcrrhhKNn|?H1 zKbofB4ZW$KtLev;n|?Z7znrE#uulinY5MWhZ%4&W)6b`VJTRW7-w*itgg#Bbp!)sv z1U3C+T|ZgV&xpvVen(Be8#Zn<{d#o$lA7|sz8?L5I>aTfUyr6=kgh-a|9FT>UcVnr zKc)Hw>HqT~{_y$*Y5ElbKcyaCnW_*`$?3<`^lR!`|DO!v(CgS>4zI8quTA}bOCkyf zzoz=tnttQa=~UNms_9qN|92CIUcajP^_qTGKc`HZempe&n%uyIhyFhTh<*As8KQ?L z^o!E}_k$>9{hV|iqUi^vb^1kVA)<50&NZbJp;3!8h1B_rOMeqWM;P5V5@Xlc@ zc!=v<#R}F@!4H}Tx{TRl{KZTN1#l2gxc@QV+ZX@N+q-7R`OOT7CjbHL04}5}# z>6?7M^(7$wd~5b3@bqAS7k~%eK?jx*@z8~WI0q&SbOICLGXC=zFc^owxX*h`-~n7Q z&u#b;D;*V_;w9v84Oc=#f4WyuaSq2QZrG-VPkideNd&+)Bs||bl@UvgQ2gY?wHcUB zroHw5yWs#_N~kBU(OCQtB^L4myAXtd0DxQg!7konhhb;2f?2qVr&!@VRN$l>yh0D= zp#t--<=0)6cVN6i1(yKw(QVXV8b&;0#zitF8e*X!20DRd{BR5y{KAKOOyC#~hc39q z4#QaR3LRFFf=kF@u=!(d-Ts#{iW1uwR}@??<)u7{*&XmGv!r9~*ar%}X<`&kunUQ0 zIKnu3T!e{@;BeFpOvHv$(7`cWu32I%Jif7mb1cCyyqJdaZ1HcC?x{iW04EQ99qN2y zmBNhD;B{FIt5ZrJciHCz8V8Y-6r5GM&MN&VA}MK|So%%{6ek(Bf{mwhVHJ#|j$EGrE( zsWdpLG;B_3AAr+J(|M(LP^XrL%`6QD%#{-CnO*t@K(kB3CYOG}mxjUSmVUvN5@>Si zp1Gy#+|nlS(lhGh(jz#3zMyHHUOI*_J!5`paDHhz!L$ahlyr&nClH#}Nv7#6(??gz zo@u6Km|_|xHKywv)37O~!6~MVTq%L3nC_Wj8aBZ+Y<_7VSIQalOCQK|GON=`)A^)% zu9UR)`4frmnNhmVC`~6;(Go|!pm`XD`i!_}~-8#*IP=Xqj)X;9X8VyQU zd)nEcgmk(ZO-W9t%Q*?{a5-w@J&m_p?&-{(F2lLM5EofRghWi9AB33o+~PHe`3uR( zax&|=gdf0%9hlAwJ-}F~cx?VcUVvH8EMCtmn!&S_H~bf};`J=04gZCFhgr`$Di}Pc z02w^DT72RJug%_KDd(xuZI&7a4YzdIJiw-?wW1{p=kXm^K?f06;W&!;jwccEBpsXs z1tOl~IB;A_As)nUqyWTG_|cJS0CA)n1@WWX0HO$p)3}k*r9{Ae_>9@5{NXyh=tP$Z zv6M=#!(~34=tGyXhwJbmAr3;pQtoga9<)0U{f*UXKcA6XM})NNBpT1*OZmfQPf?sH}A7;l?vLoN=y{xZF+v zv>I>xln}2*HI;ihlqgH+scin>DBPFNDU? zT{L(kyv7JK8xufr5xnL~5ezlQz-y-PFQiCDtD!esbHlM4zK!4JHI#oL5@)MT3E|k? zYEQXa3PM&jovuc6s-lg$-mW%I2~ipiXRA%oXlJMn*XZzf+{jwzc_H*tmzJikElpiq zn!37lYl$f(b%AN>3e&A5CUuSJmJgHXttFGX%ydftlfG!WHDun1+1fGbE2mpUlfHJk zwPNzTg<{fIP}7&JZ-jXq%o8!`E2-(LN8bgLzJl~UFnN9oO!{i-8!_+0yly@L^G=h# zdi^2uJLYA~E6uN%^yQ?FVjAH%_tJBo(sNiX8eHyerU9C^(^V7fW5zl~0?N3nu zHiq~oliDEA%DP%v{}xC*lS!?tS|cLyI3~46P3?`Y_C`~iltNNd`=hJv(V*?2<402) zq^k|m)G7f{s)%3&L#KACsjcd2s~Tpf`nO2LADPrvHLbSSzoinD9JIZr_NrQ|{w+`Z(xmpPX|+sl z5HC(@d1z{zG-#W2wM}+#($qfbYM(S{pZp+RX;M2xQwyc5h0>sfB1Dv?7OO#v)zxAh zA*HF!YS3nNwOJ4l|H7nHng?jDG|W=VfN>gj4 ztF6+Ytpf3HW|jA!PY&fsiyT-^?z?-3tn$k(`!|4k4j|0>+LnYS6#1F zgV%~Ds^IiqHN8x_UM5X14+Ln^^g3zSZPN8N>HqE^qHubfIO+fPAeK43PM-9Ce-Ou< z-Y4J?{a+wN9h}}Fpa=maO8>VA(aY(L0$!}H7pwn!gy@3Pi&d|b{x1?@45v4%Auy%s zrPB3MY0C3@t5|8+t2w+Qg0R}L=T)^Eluy1 zu6Ik*%Vh;!nqDtmua~CxOaE5};?U{+0;d04196Gd3#Q&MO|O{#Zw|zx(>tc=ZK8WX zrs*xy{~dxTCB0^v^83F?plQlCO z=4l#~fBy5IzjDz1`6-|9!!nxtFz$<=a*T(2T6|SBXR;6}hMVf$a!;`kD2B_~c(te8 zEf&(8iSe+D+v2CpPr-s&=&()>r+7|tpP8jRWt_Wk*may6zWE6nCc2fb#pd2o#&D>7;TxDyQBq z79z!KL$^sbgvrWyCZAMvNCQT&kDqrGiOO!BjCRs+c;alBs1* z^xm-EbjElzQx?z{gmE+p+aRs?{Tt6)( z)fs9FD&lH#F}Z3kThDcM<$A(%NpWSlrnsuOs<^JWvbeUmxVXNwlr*<4 zFfK7JF|IK#GOjYNGOxSLyl7rDuitRa2gwoc6-26LdsV%xUQAw1UQb?7n!H|6T1tBR zit>{3%A)eJ^2&Nq0bf>LR$f?MTB1&GeSJCdYT}8;h|Z4Xu|HO3kBXdL&<0tmwUjsX zR@+0eQ#0GMP2*H=v{lt?Of@B@nyt##>^L>m1ML+Lwh7ESu|q_$^(<-EN= zS4NKo!FWYJrtv9y#$4qh#H%k6T%+%5EaX(@>uykKBA40y*} zGS>{#u=PV{IgU$_0Ewo*&!I@nCLYb_RhR zYcAz`mhkyj&QB*15ia|TOF4uK;WIu9YT~mCeW>UMFS<|=4|Z@Fml6k3f;rz<>^nQ! zcvC@x>wE6CO8fX8$QvWXYqX=W)EY*uh(CvuD?!GPeZwd^Y3Um9<7(d z10OiO&1-0EI`Ene{KTcKa+;gB=C%1{>yEc6c{ZLAs+GEr-nI zoR)IPB`%zxplUU?By>IA=t9>D!Wrj|OKiJdj%O3v;c~W}ZlnR1dlGuG&9^SYxlg%U z%`HhuXsXA9^ zSxVb|dTv6Dd3ZuzaVe$FgR0R+7cxn0O6O7@`3V}1;U%z?C~grNT*7lMC6Uv34*34K zj=xd$h>S^UK_0{z=Z-h3njVoPPc6^(9WG~|P5~ayCbS!=taw5^oK5J-*5Zv* zNO(3~?Mw=GxZD#B>b2a>s-~-%vCD8S&*s#tav_CAsNQYVQJv92jY^b^xE+__Tp^c| z0&iW)tVs-}yDK)WX!t|nwm@-!lO z!u4n~Xz*+}TT~D(hYNSMFv=E=xSR{&Zb&Hfv%}SFP&HkMvxPr|gi*P0H{PghyjyQ7 z9Gya_TQ8?1Mi?}e(?x~6r=E_t!{tPDxj9xmL~ zLa5P}M8xWb%Z0lUXN!ueg<*~tjyI>;lkG-Dl@tn%I-8O(9Fg!ss+^7oRZa)BR6`B5 zQ8(lTT~3#)g;BXsYIK2@!{u-|Tlh28+l4$Et{2u~gglx~s^=rDg*+9kc(z-uSJk6x ztQun>&@Rj=;f1(yRKgpbLLM$8g}2(1O)3Wj3RkPeRERyic#@mHVB2dTA1U7P$RF_yVYnI!_g_k)t*9L4GAyA3R)O18i zPRD|kj)?7+i;Bt-Awq-*5hGGiQc$81Q52UfSz={nRYMKDaW@W8QhLhWZb?d`ZiS){ zDK;*#?TW-gq}WdM;lqa!BSwrcF)=m8mSQ20>_`aI6f+VFfrySQEvXO-fv%o#y(pS) zRFb>JLZESXt3}mtHm6t!bamAf3xS%hVk-2cbTwND6njDGNQe}Rg+MVDVj)tDX9bmW ziiJSCshX}vHR^i28cxc#i-kZ}O-Dkc-qcj?>1k)1qO$3pcH@#EDl8eILd=E`DYny% zRJm9PbY(+`6avL$HXJzw{(#xlV=|eLtmubGsAwicL_^T-R>SE=9?ljNBaDSMXLLDU zO*iI{xKRr0NX(k9Vlp9F4qi?ttL1J{MK>PKHr3H}Yy2X;2?`y*HpGlk%!5W<^D#@oYF7jW#p{#oG-@4eds$T9T(4 zRnW+@?S_bCLNh1ZZHNZkNQ2N&2o$rT658pcdPry^ucjMuqtwujw;OpwxEvCm71fX~ zXlJV$D&mbvc(Ef+H6Cre*`lUuxSLJagTmEhiXi9mViS?_Pul%2%F#8FIG5gOvjQh;)Gyj^` zS&}V%={mi16!Wkev#*%ffg!t!dCE^Qmww7g+=DIIRnfFDlgW_a;WG>w*6Uxhzm8(| zI*;Nuv)jy{IL$1HpE8V}@|piCPS4B2vmdM7e zhzTMd@&c1F@)v|~5QvI^P~-y|HfA~)VkVe}Tro6cT*!5Bm1+8zCrJTWxMhu7;20#7f7Z}N0FoeWg{2;eL2_E{;Z^K$vz$?(gNc@zw zTrmlL$|so7D4J1%A`<+UNASzrFcV7fke_l0PCJcP!-%8NghnY`Z3qZx6w&a2tSBgm zInd&(6CDxF`WpCQp5`U4>@9v9R)V?cr+k4E$$G{q7d9T%RPKp3O5ticnvibf*@U2Y zJ0YowtKF=qsCrUoEYRXBqIq;=LspZ-u`c8MBw#R$OR4dICjo=8e#%Jja06%@(c&u_ zM*J|8<^>oH(c&v31^lq9`N@m~wD@X}{TU-H97nqkzyvGe}ouN>pyUJ&zs%2hY^Q=Z|tBbf|EEaOE!_yr&gZrpr1e%ZqIfx;Jm@&vmXxel`6##*lP$-$odTBiqKt+*h^dy8)5CTC4 zDMJV`gb+grA;^dfl}MXB#)C*mIz??~#$)4kKUBUfJi!{$+`%5yo?>ZffBSPwROkQZ zin*NU{}n6ix7W2^)_??5hfdX!uqtI9>%YrsRSw*evYt4UNcUW!h|XcHOWcx|0LR>DK@ie)!(=|s# z_!(T<^}*0hL?vq1*fL<@xHRK^G6ajH@DilOK?FX#E;E>fA|{vn9!-?W(+as$3PE-Y zICN7miOLW)KZ&S06J6k~3B-JY4#)CBryhBQN-QTJ zrH(J$SeGe?a7}to{|6Q(G3N3Be$h$} zzO}Sf>yGX#qmGb<{OVFf$mLci%!&~|WDWPq(`Wem;I^N!T=2Eg$xkh2`z6Yqw3=xtNAO&6hjQBaMWwYeK1F-l9lGs44 z=SiRRH(rAdjRC<~NQkS6f{LDeZIsEJ@^c}*zTh2N`G6cj1YgqnHW!AZ(CynIFT?Q*c3F;s94YS7f?9dobyTV}P}R#iz_!oHN@$Nt?vTK-Dq<0Ga|K$EEj+ zk9QA{wquxxh)CFuhmA69mme$G{afARfE4OjY)R+4yxLMipqxT;#|kjPFYa-!J39cNac;6%i+@%6e%H##fJqt&la$WzqUhT%+3k zF$|x3>p#O;eun#C;ZQH^aC3SmJdJ$z3A7+2n~4U^^AcT`cyN2`<8?JomrBraNGcn| z-Xixky3?KdgJ}-U41eDJdjnt4Da9+nH$WCR;Rd>+Dc~iEETHd6L3nzKgL(y~WXk}V zE1Ycbo_R9%y=@6W?%6+IkrcQ?L(?@#`n2;1R`+y6xD4<5ryJ8OYH)pa1CDg?ZtN$= zHnk?2Jjy)mAOB1a1InNZ4d!egW-A*`)YPPZrXUE3mQAbX1uVZ04+bE4JnJ*_4oDU= z`^k@O8sK3Wr+_?%mQ*SJY)8i=PyXT8=4sovV6~zB5+LcRePCegNo3V|G4c*nbB{*^B=n0G`~3H!VN9b*6U)TM02eKY zE{bmSD%L!H09&$A7xP?_gir5?lr~o4W%!E%g1=ZXO|xqUh465|zQa2-IQfov*!?0l zxTv7o{t8w*fWjZfOE`L$R%iBba4NIjcKX^@!(I`H^P8vZ`OOD+CFx~sB(L^VHW-%FkBb?lZP~o6GdYhzmLaHTA7s! zhwq+g-kWCMEIO+UyV$5!3rv+p-s}@=Z)2@>*%nGeM@MdCjQ_8fo(GVh>GK@1oj`D$ zsHm$pEg)MF%z+g*3fCgSrm4~;xUyx2`ZeaeFgFTPUW8rjx>WHLvX+ z34a9p-J{_?yU7-cc91Ku`H*gzo?QbBz^220P^F9Dd-%S+!v6|xMht|fBrgNwS zZqO%R5xy7NsnGp2;qgr_+FNuIrB!}TbR8$ig1?WpLZ&uho;Mcw>Aw?jB8+Gv9*8=Mjj7zZXCke1h`!}Njn{dl38Abn;32m9FD zG~e)OBi*}BNaRc1;Rp0DPh%e6FKzv}8^Zh|(P5ME>w}>S%vr6+B+r4l{m-{1qG7!t zvZkX`M3b9>ngzgoi+Bj@|Ctq9@OL2QfJS>^5$eHdiC33EB9h0Zn`!Ci=2o`%Qz6M1 zv<>fZ+lJMdk1A}5>(*byi%K9Y`bJZ9`u{Sdw@QnNN|AH{^VVOrggmd{ zpX&JBh{hIU77Go8!mEueO14qozAsaOioO`=d-_54vjZUYu}Dja;M%|}Qny^#cHo35 z12Uniyz@0!<7OfZu8DBpIKMlX?y?ZW1gd|6E<@?H7`y1dt;`tg6nml=8$g#KXwE?- zE@e{Xn}_FzSA3F}`Ndqdf|w#kl@oheA=GTj@19irB%jhrhlv$M78QSiBv_XsRs8O+ z4{NQpXIN_P*-*Y8C2aB~{v`GF<6-R@64p>Bgga zOePh;iG2Mg`QeBmBr|byel7cQ!Wx5gTGH%H+sr=&k9LuPPhVAwDEK!;EUGH1{G7}+ zu$1Kg$U90QoJ9$YS`X*9%@U-tl$J?h>fgUA!`*1;tV)RDMZ;ez2KuE?Gya#dA%)|K zu`#5naALeM&X~nl2~U&?Tt>5YKX+8%yZt2Tp54>U7O9eWe0`BTMrAiEZh zyXT+kzJo9K54w@q(d|FQQ-rKwD;7mV?CRTsU`JbjZR~Gnu4At4>KT~uUE{yn+C}s< z0TJ(=!>_J4TpuhYTWDf4roUTJpMgCg(O3K_VEl}bcumo2dA-Z9sW`_frXb}7yM%nTm)r&)C4kMOc!iM3S0BY|Z6FAUcv%pmsFL_g#feXnLB1Pc~Mb zPCwi_$E@NkB;=PnY)!;IuuB0m=f!s7Qy2$O=y$ErzHHG385-5&P36&LA-@x&GIU;x zN=WaIdUP#O$v)WE-SQx;bWoo)Vm)UAIqW-eo+a4@I|9{g#MjEX-#P&5ies{UuBD&# z5Y(mTbv#8a+A~709e#Eg5Ciy3Go$eIt5uX)hS;nr)5TI*Jtr}5206cxFn-KarpNKD F7XkbvTZaGu literal 9324 zcmV-yB$L}nRYy{3NJ@4BK`6B^{Qy|aA^{2lCTCY5RAo&%!93WAa9FX?9v=9nh@L$7 zrYJ8S?P1_s2j67!sONr#(aSGKlTD}EE$bwt@O_q5QlvEO7DxW^v@a)b$l61zZgqX#?n7`KxE;| zSsDadS_E5qnM*Hs>18h{=+Z`b=@xwH8HiH;3BfFILk(H}PKj4T<`GtX}%LR@@7II^K$2`t7LT>HT_|em%V(4H!PXUr^I8sQ1eO zw4?Xy(e&%l`wh83)cX}R{fhea5xr2x;4gDZTWYG6a=g`c)yqN-y|b z>HpJ!_`~HWB%K#YCAF1??Zrk|JI?+XmT^nPKQeqnk)G2xd? z(~nHQkPxN5ADLeIl>vg8UizKs|0{y%iDwy)i+Ih2n(luLz~sxuKs%^;`lcA>h$)C*lF|hc26kA_%@B+ z_UY}Q-p(<@hjvi^9TUHA=jiPnjiX0z59tu4q`jl*P;V32e7mS$C~6=^y^Yi~B=xpZ z6ItpaqLkaR-X42<*4t1{V^gT!UgAQJrbNA6)PIAblwj*L-RW(fCek#0Z{PI)EkTqL z{LnP5>iwAL|2smI^7Vmf`i<%R#Poh+`u~g&rM&qJ#U2Gb=%>LKo`DP=11}7N7qAPu za0^(lg7?33Ip4bqQovhKz$Y*PYbgNf2RDi>~Sb=x`YQa>#;wt|6D)3N23QPnAcmh+n|1o>79V_8UKmr?~ z2rPj|00Jy!2!4PA_{0tGqkP`xMPeKTGW>%v+yDk#2q?S&1^mZ{6Yzv%0N@~A<1{`) z1|#4x-g6i)7ziiK^Uwvau){yx08~ez!v(kxP5R^EIUGyfIETe696s?SQEaO*6piO? z9+iW4Nb;wVothYljCV2tZu1|^VWvyTGyu-Q2ot$DgprQeh8oz22A)9(yZ8z_{CW!( zEW=ei#R^uDf`|Ts0N4c{93%!N0>XT+a(5TyR|{T|f_0jCe1{GW01KQ02MgWcARxB! z!#*(vKn|&?z9`l+vfsS%u1gOe_sfEKMht{*f*HqEkyBhX;M4pg#mi z$_1yFrqfG*2uRAMGfdydgFcbyonxAw2auF7CYjD*e(BeFfTY|Brs)LJuj_ni7}HC? zjsqlRY;tKAW|jtLmZmdHGr^N`iE#dGLBpVvOYh)I$7YuXXP16WE)52pUwS8){zB)N zeoZm$0vC8vf-t6;?h>13`Zde+7Bu~OO)|a3lQK5TG>l26=_J!w&NL1>%k-7=XAyeo zJkvv}+J$+h!Fi^4qUj2FQZ5na&n9~5RMWd}9G;Xg_NH@~RsBN3MAOMczh+f~v#OIk zDPyy$VN50ZHPQ5Ip6MW-lsM*@J`Hn<5S>$cCzTF8DVKidPY^VWd8O&R(mS#A&Ma-? zeU_kKGfTe!6G>=iQtwo1o8Np0B&V?l93~n~#^iL9HA&5!er`7zQxCS=&4%Phs%G06 zu4$yvY)xy9s6%3wL=rBl||B(ui_W!6)&)?};$~VpbNXpCRe8l2`j2pIj;Y1TwH*93s1O;C0>1Vvz zntp)c-12sQ5h#eM)?o3E)GYoMHYn&o|86(}|5$vW`LB>z*ujLeJS^io8axk#bco6M z25#J7!dVvMAmMzvGcTdeSx< znCpttHbPM8byewgS!tUl(+0`B4|82wdR<%EX2@Jum$uT5dSo{A!=4NP=$%rnd{zvNHq&`mdh&A9L%9-n!GY z?(|lk7Z0sH{nt>ukGZvnRvP_R7~*-%tvZ@HELRo`c;eiuRz56%&kVfv?BFiX%M4MD^hP&qBW`idL+Ka+^W<|>r(%< zhWBRX1h&%XJGQG7-(^{st zn(4m|K@7k3OfRiy`mab3aqz85^wz4TwW`5d)qhPweEL=b4xw5n;as_DNrAu{=T@AYn)dN;iuYhAq_H}$yJ)A7U_e7zOD-cD0*r`O|oiC*^Q zg0I)pphu&rN26hQJ^g#37=y1zqnCOrK&e9W~YKJ;71+QqM{M zUI9ccU++mT^`HbHlHlt_>Gh;E^`tcDNojy6g0DBF*Q3(ZqtfeDA;Lwsv3uZIQ9(!U1+Q3hWxixv@R+0wsP0?~-Cw*~aL zH1)Xj@1a0E!PnzLy)Hw(o){y%bPGf&*Zb1zfobZ2>Gi_&@7X{Mzn++0Z%k8fOusxa z{d-480M8{=FiIR=ysZUg{~)zqbT217EMI*JGlo z$3(A}rhg9#VwJC_rkCH8-^(}s^N`q=Z&>~FibQ;wMcLKM+&@zh$Cq__c}0Uez0A|E zo?fQWFnoGBsAD-AXh$#iXdOenY~%t_FBdiCq6WFBe+D8l`La#GX;o=mX=Q0?0b5*J%6)BhX?bA_KO}w9K^7w5pzNj;v_% zF)~DnXc0xCN>r9ab44f=B43ZvDmQ9{Vxd{KRLX^Vx%_01jwxe?qM=nZ4OMe<;{she zJ1(A=tHgBxNp(Sy z(o*(t&_zXtONxt%i;ByN>xwH&6PFej7cVWP4hLOeTw_|w*+Ews*O``5$uEBfU1?lt z-rcx>=(yWyDF<+{>+xwRm;UO4x*gq6N7Na$l=HPi>Xfz{Tgn^`c2GGfSzizAph)Sc zSfL%3PRn*(TFN5_yDuraFJW3rBL}-NU{|Ii({&x1mQv|pSJkBf>pL|!EoG5|)x}$P zT1p(gl}1Z>!@(Mqqen~GNttx8BE4!7SeNQpp=z#Dxu{ds39V3gY84t)OZcUNdDSp2 zWznVl*8{7W6xB>cQ>$v4s%AY_OKJ1!xpZ`@w}Pi9h1cWb!lMzC!VB`r;q_?YA%Wh= z!kg-^N4+TClqxOdkAvQoEG;Dr2fZ!S>+1%3>)$ zfJxtKJtyZ*seCIPJjmx-{moZm(&zvEHW5jq54@>zMv*$2gz<9wh7!S9&l;@c& zF6DLR3Kjfsrnom#9L1%4ohYsY>VVwcq<9l|o#54RD19r3rHsN`In270Q1}zhs`~0u z(qO_-eBMUqLI4T^a~v1)5&F+<+_>={pCP`y#-)6LlrA`XFxYpbm`0k46=%WXDRfv$ zBmVV4@LZi_<890>kwv+%F^xOOpnhn#*^rn(ifK$zXE=9VN)p_4dMQP4`WB0&#PU|o zicj?CTYR5?)xTPB*S-6?-u;IDX4$6oOEKASOgSGbc$1k_4$5|W`X1Esn4Dxbnh<-| zS2wKHaV}*Bj#K3)E~N#2!@AA%R=>3IWHlLOyE*+#MLjB)1PGeVhUAClL)vUeiujOC zTp)3BlHqLNmcxxMZZ=Oix4f~*Oe$x?&3>e6wwcsz~J) zs2r|#S#HS>ZrlOq;sAI7;8Nng!fCuliyD8;PUBK4`Oart%BRne!7*aICuAv|-UH(= zV9di4GK))zlgj>ry8vZz|pX)>Ht%~qRmwb_r<7&V2nxq(#8*2Ls=nT<9jyWvdOgIXSLh9tMd zh5Q+vag9N#h3wR7fKn}xyyzt`!fZ;U<2(Yu<2iO*hmHU+ z3pZGJjvSW~0mmV9DV_Yrfgbe3Qbs)p=r%6p54Z8dJ~=F<5BH%xw%74i4(}(6rDS<5 zDOvdHI4Ah#QsVfH-(1R|@1>;ic`0F+QsSIsLe4F3{=b|a?ed0e8Zz#H^9`I^p3Uo} zwDG3KiObn+f^cqmx6$clb8!=#Ti(>i9hh*rsM_oYSDPtex{WqYH`@-*EpMbviJRe! z;A%5l)YR>`+PDUYbIX&mW|Pu^NroE_^@Ec|LD`zt2yt!&OH@=gTxi3=!Wd14tBp{z z+Ze@UoDtqeCAcw(4Hrr|ISo0a9DMkP(P91{)}aI@O%$){$kg;KNd zX%>z(TMePqkno3wR82N>lHJ1EEG#+-pKPJjNQ;``XgR2GL=rmDa<(33gg#KV+f#^Z z%H42MHQSFTnoJ23l#D)64qo*Ax@?Q7uIYuDXH-m#bgYpqM)XvLRmQ8Y&emYq$Xo(n$c`Xpr)jZ7%^f* zNl8hm$PG8#P~?UiZdi&f9qGY#likMJ7-Z^3WJa?+J=us5AwqS~uqYhNhbdak7D|n^+0&CO3~jh@q#=iNlZ-XsY&D#%b|d5g z8=K6eYDut=2TV$=$wC{hHVbJ$<)lK~tdP!{5TOyOoUS#Al@l5xoh z3u9DGwcHcaZS28DgN3nCiY9vsdBCP_vf2#E5-f}@{eUI8$(&|k3}(ZTkOvGF#$Z8U zArBaC%4xjiaI#vGnG`IHQTY(^fHg_YpkQGP_9GSAdccLXaqIy%A_;-iFci{cO|v96 z8k}k}*=>xn!NM376&36UY}PcRMKK|Qg*;$LoN7565?B~pIui1LNkPeOvZ$yjTu8Io zkc76dHUtZKM9pqZQlk?rjL~d1BrqRB9L;6Vt>o8EZ^TKevy#qAA(!HniqP zFA};9HOw2)FvGkM8Rmh=5M(|EA|U@EbREwj^c?d(c6!_eq3giGV=^(_M%--8bsUG# z1Hi(3j(MT^6<_GagM{9<5&F%2gksE7M&bZyD2KWZe#%ge;4C`uSZ1J3r@d-YZ`7yOs!=!r#rimIyk6hfiDcIrFUf z<*(*(=9imro`1!^xs6ba>)_vc%AZrpC3Ns6{FK$K;WblWHJ?HnPV+NgA_-37Ni4xh ze2E;enLFW2}B+lev&gP-~FL0qfuh4s!%^z=w^5aMFd$z%qz22Rt_NWPFCp zz@vdn3YY~SU>0~u=W-d3abXt3m<3yS1^+UaOBqXn4{!PR9-klvc@;Pj-p_ab6;Hrp8~?HdE=Q;tE(*%_CZ;h-O?G2i!+;BM8TVMc0cQXV4ll&N z3?*a*#NY&c97GJJ9|IACS078MgAPnp0Oo<>30Z`JiI~v91IPF-6@!yLhOvZs4)qs5 zWuB00H5lq&*1_ZXmya9=8!Y2Cez1@r9OOZSaF7!bpy;Q(bcC0FM2VG-g9qeaPWq1% ziC?jg8`R`Kzv7~QS%wGsmwz7PUojC3Kz_5F zd+{&xgv=B23f|7Y>>ULQW}$*rfQ;hc$KO4VrTlWvX%5rpta$Ykugzpob=ok{r*1Ob ztd{#h%6lNo$VLb&s0k|vtA{6r)efN|Ry&4_tcYr?j8;iXvJooRQr6($ifZ*_1x3n~ zDp#_swye6Wx~#gazO2Hm!mP%mSdCecS(yoiIH-dI1lk-2Viac(a>gKshDO{RV--Mg zs8}MEb-lD6695KLYNa5xA!H08h7e*12}DFhs6<4Q2fRy&kaQG;lWF(Z7&?c_ zeG%rTHs=H!_{3VVth8KC3$RlMT>hnf$!Y;qOj-K$j@so&G zApl%mV$S6w@v@(-q;->8lxujIvOb_?R6RD>8uRMc&ZVL0X{Hnj=?{)ElJ)bA|cI z65>0o*-R8{T6#KJ+qv`Sy-DyvoY}sCH!ge~dimjn>@)XfHKhn?VyRyKvL?9T;9Ec`S z7}}F=7Uc>*#PgwCzHm?pEQL^k2)t;*sU{eg53~G+N{6T23jK)#Z%1?LRh)oiVC6UUiep`aZJ={(>m2^s3neZ0rf8M#)ULoasv)n?gGeGv7$Jl8(cEQWKj} zf&QaOzkItsf=v4GwHK_2G`c=Ic1FG84+x?^vZpK;7B(sr9-K{G?=H^?Z+{K z>_dlc@fq!sn&*hOY=|Y1~C$wc$ zTz5cD|LIDJ2X8ZQ%h;mMv3Ombwa@QtPxP;8jbBS@*rV&xoh>MjD>0XZYh`b|btJ|J ztB@lvrb5{ikogdDoH_EypOFCYL^*WW404%|ZWhlHi7R}%pa z$cfw%ySR`G5i8IN2IJv(}7)4A>4iVDjj-)VMb1DD)d5H424Yau$Y!Fh4aqK;Q~RR}T|m zsyJD4C8ml9z*0yB$Yb#X^^4dSkO*MY5A}J8E8PY0xS~;)S*a(s(&V{HTgv4wx&UUa zA;yNCXXe4gtf)Rde!_oUT3 z?XzX8Y+=(2)ZqU(I5=#7r7vV zfkPLSy6912cNLKMp>`(q8sUO(ihx7`VGP57u_=Kes5lZ_$5fQIs>`K9V{a2=_4fIm z9j|xC?}0d@uhDP()A8bd{P;%@BD$Mu%X5IP@Fc^XH?(=G=st-DL@@*^h#Y`&*gmou zt-+mDR+Uw2PJV&N6$XuCE@i4Plo+`fHgy-jJ=B{5Yh}>WrfE<ZK3$pE7Pw-_B?O3$dtS>Cjgod31Yq~v~MYpqkt9~K?A7B8f zOOSK9h4^HaE6`Vb1-U^)EGN0Jd&f55406JsrJWBLj%3 zZ&-cocY+F~r0H1^AJ$IJS`33h_t zSQKw~pB?R1Ji8Q%aGdRmLt0lT!HchWt$t^q)$7FA%TvsKQkx*at zI;P0-CIr={ivQrr3W4`VB4Jc=K~+yNj7jmOvjuZ_MmNaC+sG1H5IbO)g?hHUZ19KR z&L|mJJKCH9LdPY80@2^h$DkY?grZr5qZpQkCa&}p3Er9pFB!0y;1m9MaJ=pmDH@R; z+lew2uZHo3=;KJqa8o&hhH(U|`R=qNQs?T&1XU0id}v@&C(S=p*<0m)6eS{>}t25OeTE4{vnF7Jyeb z|3UQqsGKx8$1IPVrAq$45&(gf)v%vPENl^f>*1o86j`;IbN-};D6kt=7D`anTWih) zN=4}F$ggnKth`fnV*z30;uC>u7s2ijiJDdZ_d{T%4ZlI)HnvltHOgS%6FZt0me@oZ z(>i&J$Hkx{voAGUB=a0AMW%{yMrrKvg4Fe)T3oKJkJnVw1y-v? zK~2kK8dWZ*P~`lMn((SWn^Zp5E&bha0pfQ7DWrdM{AfycTj3QQi1jqUNNeM`&pqqf z;s}l?0t~4dTR{xAs*zi}cv9#U0uA?m!Jt-ioG8}+b(Zb`C1~T~!mPoIwLjY*@mVhW z;hV$qED_i8{vBXZO(Pi_wU{t_4bZ82a=G_gH;ARd_P3mx$$%XP)le2U`md)0YK*K{ aR{GP)Z?c1(h2W&33`F2Co*D(x2ozo5(%9$# diff --git a/qis-compiler/python/tests/resources/no_results.hugr b/qis-compiler/python/tests/resources/no_results.hugr index 43bc9e234e467d3bd5258b99b3abfe20eab0ff65..707da08289cc075bc505712eecf9d68be50bc28a 100644 GIT binary patch literal 2959 zcmV;A3vl#ERYy{3NJ@4BK`6B^{Qy|yTL5~8d>d8364kT;@K6ponv1s~f9Xs4w&Ai3 zKAm#%brp&S(0v2P4a3e`c@PgL6DZ#R6ZN=|5B4=h3h7$*SA{z3`Hs3fy%flnU z%G#~tZ`#U)FLu)oo&l)=odI3{{c=bh<8%mHo|G~{UOt2eJj#DOgf1TC<$oT+0^YKi zpNG)oA%wkkBlro*KL7vllWh-q*JdzI$dm9Bl*P{;!kEGEr++)v@Dr4A+~V8hQTPeU zV2^QD{p)llb)9ck9LE;lGIX7H2jky0?!n+ED1%UM&w|zM_&HL)9k;a}4t|0%?IK~m zwF?^f3CjLQe2AR?IUwYhMOwhyuC_M?NM7GQ5A)U5q|a)l^W|2n9$7L&O6HRgDaD_k z&mlAUH&FRFP#bih@_C>+^gwq2g31qq{{Igr2;~n!NV&$HEJTRP)d z9=KgPuU?-B3%4NrOcZa-#8S&nbeRz{^D&t4F;E&nW-ltLTKVcKg2%> z4}|<8D1`Gx@na;4ObQ|BMX^K_S%h3dY>22pawvo%KN7!Cj8OZ6_{lJcG*AdXnJD5w zA^Z=CJWvQ@_K^q~0X~2f^Mq(-KLWrk5t{Ky{6B=DkU0Xt43U^258(m{%os2xiYGBK zKji$(3HmuAPI_XBL?%cE;pom0YKBl#s-{T>p`<^5n#nc~#JL>b_GXbb8gOqG#{2=yKkwoj@r9qD4FA@BG#KaJco2SqvKSh0 z=O-xZnf2wEKoV|!8|GaP*Y*~&y~vQbFC$gV!hA1&^OtkG31n=l$=W)y5ZG$69oE_` zTSp#u`Ry?O`qi)O**c1;Y^v$wxUFek=DN%^5AV#t?99Meo@%ll$KAGd6yvF;I+tn0p)ts{E)?w4a4P~(?L##DXD z!yT-X`rVt0q~(seo1Xby>6@=?wwmfFW=kX%(u%Dnt9SM|=J9oHt4W3BvFY*j&Lf`2 zT?emPkG&6pIAgD}u#V*M*LSnR{c^1FOU3IR?kalUbXcdtQ@os`!qPELw>GTXS9r@V z?&>Y`ucdDa)_c=bEZDqL@pQ&{we}4Ozxc*46^~<2hl+}d$z)-CcMbF0vUOy8*53+m zx#PBGYYLYa)2=?y_F(Sn5tg67axzu^ zHCfGl+tzFyS-o?=+TLva=vk4e_?L4&ijrAEGEqDUo%H9N5WbwCF9Dh*9wahF9^_-L zJdEF-^>@K1&X~&wMm1Ti^R~j>*1W1%Z1=kRcDu%0=D5?rD3#-zj$gZ1uhn{KUG8aF z-y9f6!#A4#Rxe=So^^Jm=&h@lYsELcx^l&OD; zxQbb|wSBt>N=@N5ch#x-$kc8+=I4YR^HmxJ}Z-7lv`4$i^0j=Z{i z^r|uL(J`w!fa9fZSIe(0K}+9jVXT(7PN#;gCd;xs9jw=FZ&uw^zpTVwI`e+A)nvPF zc}P{?x_fQme!uPVz!kHqzFO_~rdPeQ=V9LI;0o(Fm{)JbeD~A#(s!lhZL>I-mrA8l zC=?2{qo$^2M@>zQYNWF1u{i`VPLsFoa%~zK8XB6^tMzJ~Qm4~tXJ-cngX!pW?BN+1 z8EtRdiwx!uuvC-9JK57=tI2w&n3$MUDwRT^P%68_)=|l(j#M^f>uAMh#|{`NXw-C zLo!uQv?s`ZUME)*R7xRQUPf&L6$#I8^>+_2(~3>5Xz znm~u~DR?FzlLnS5m52*&xr%OjFF#Dgq~_s zD#~hLJ>%m_KnB>{nbV);wX3VeoZ85PQBLngNTsl^H0P8^_@&{e3BsLh$A9%$Cc#z_ zskS(3Iz~r)0Lp&EN0waEN>i~cYot0km^!*`IUZ~u_6v*8xFvNL+b#a1%`m;A_F5s8 zn}bjht1EFUZjT+@KMhiSK+ccE*T*g0W%{r+-y)R(vh-N$fq|0+2^t(1udO}pk&EsA zqcuN7kH`zht+{sb*esH8o0#7Sg6Z2B1~;J?0SW1#A&DuH4h0aIi|QDWtC2Fyq2cS+ zRZ6ottr-ibNo}Y35s}PBUAqzt4T0)e*L)bTT9+oog-Ni^g~LLN#)8iR4TEe&O!eR% zLsOX@Aq}Mvz%N+jW)@%-q6yO~U{bFoJTS;)wJ73$@S$iHq6j9UP$x_ijcjGOgjx=I z!DNr*QpsWsQXTk`wXQNKSPs$)&4;s=m~9WBmnmA=qsg`PZ@`(ZElsi>y}Kk?YsBy6 z%xiGPPo;tbdzG%ylwCRDtT<@qQCtTJ?g_S4Lc>%}xAhv!Tm)*SNot$9xdL|rc27b{ zUWuRjg`>I#JK*HWQEn?YC87{+APsmTRgj6jr;yJmX!O+$c+yj5MA`Il&Jgd4JQ{Ue zLtm}mZBx_?rRZSwc0x`}Jxz+CU0D;lD}Kh(2Xvp2Q1I1N`RP7`gJ|0nX(vr|YPnKN z4((KL)&;y)**#mftLY08H)e_j-di>bk<$5&A#{2JH(MbOZ1)G%XwlVcrM%x&c3>MI zKzu?zL?MNqbQtBDDN`15=mME@e}Ks#f}eMJ5EE^2f(zn?`c*=R2HTK?HFF&iiFp%JE*n6iDoR1Kd z8I@&iZDV@>4Xt!$tBup7xj}(1dMKG3O;3A*=3%0#V6kRHxQ{HEP8aPefXF;;vapbJ z9prpNs^J-d{x@b*OtRu&Hf-}hdki-VlxN+3ha@4_5dP?geZrWNVF2GiKPdvBYElk4 ze&gV-4-H$4ieO$qj?QlUq?-*VXHxpLyTFVWSvIa~2_s%=ZrPLvjPieTfR`T*bz{Df znunV)l3D{GQK}mRl&}XkaZ`&|9FcDUzs~HzoN()R0>Fd<<_b~BN3tB}GL5%QRy0fx zH0Xad&R??a(%SU|#622};C&NuC&D38ztBW6WXQGs F{sE}Ko-hCa literal 2669 zcmV-z3X=6mRYy{3NJ@4BK`6B^{Qy|iQUFSNkQhnO7^wpgMNxDl$+9e)5ofX52^PZ# z>LH0HIZ}S&}(?ov-||sT>LPlE{<- zZ~X?iWPf6Ur%d<@S&*J7anlIGlg(7&N|8(>$CO5xGoqwbf zQBvnKsY#mDB~R*nDAkFSI-g37Vx|6+mHYfFb;_?L`E^Q``Y(4Fd`Ys@DFu||OZ}H~ zRpF-;P^YA|Bx#+JK>e58ios8Lpw5z9Q2(XO3c{Dc8Z$axcjawS-fr93g*7oeDyyibzqXR8XfX?W-+Dqp3UwcG3aC(bnSY<0>0bmKsO|>7^fNWp zy}*}VLv<(cruQ&kr@EWo^r{x~adod>`fmPM-DBSLH<+JMqq>*g^fyeeqtwIYfxLW? zmYr0_ZD}T=S=cIb#Hn1SySCv-d+CWN)o5K&%aWKo3cf9 zAH7Mss=NFcnM260x{o-M9IN}ki@a5L$-Ok9LhuI+Py&_G=V0gn0aQNe|J_S2bbtU# zdZ7T`UBh3nKxGQh+Co`IG^RxVg~~}y1}K35)P-|DVR~ZG5{ph3Wx%=5n5Xa22OTYS zbbfRSQOW(L3WR756`d{UWKsDn&#ATyzj6Z)!e8iV4MTY!Tx(d)A&DH0BF-tKkoRgM zPY%K<9>-G>XX1ksJtc9wgN;HB9F=9Gm&0077}K7MhoeG$;|3p(La3dCw)^QNe9O;w zkMJz-4&kSR4`GI(y=zZd^zh84t}Vo12XkF}a^+lFh-IBU-4#DJb+0|$64$2gw#jlh zZVb{o@!HcZhE3g=*nQWYE=sf-#X$<5a-%dtqWsfmR)=Dw1(Xn zHf2xOCdSWy1`O2wb~~VME=;gN*a942F4wT@8(;f!MRvY9sAh07aqRILsd$ z%(NRD>iQco*K8ZLvG!)DShw>Bw7U?4y4!f`(8jwqWly(zgSvpSxi)n{-HBm-aqa1T z;|8xyDY*H=;EnN9B!aqw5y8BN@=Nwv98op&zDE86JN&&~wU{QTLxTz?TBh(gy%Q0es7c80IpP)aGp= z-W@o~aDUG9EP3KRU~nICM2}NHuG>v-tM|1h4{tDkU6^Y_nZ|}0XlI(XPwQUR$=pwMNJSv+{tig!OrTiurqDN z?A5yMji1dhEAvJTgT~f;I-J=Z8^bMvI%no#px39vnFxmCwlfa{*_pOshJ7PwMQml+ zh6Z-wUR|5IwS8k)S>AZ`@QZ9S%z`*(HwM}k)SW2iur`#ft@hbOi){||UU@VSzha%I zVV_NGwOTC}i^cNk>FM$5>FIHuTt7cHbwwCD#9;<=30uh1d3rX}JUl!+JT01xCR?>u zs}&IukE_3tT(@=Y$>zt$$0tXn z8oy7+F40a7(N50I&1Yx`=Wu65s6&nIOj}x3u{F3gc)_M_ChA16#kHv`u0U+{20J_9 z8%4W2aI~1l?pH_~O;~Jqm|uW8=aqx-XWN~JN1+iyStwt7y2Ze8_6mWqs9`xmL`Fnp zL`0G#Ne9scgfNGggs?giz#u`A0~v}!5C&l&j4^~5LI@&6KnNkkC`d%C@J2uXzv zCy*W+8rD#WK4GhMOK}c}p*}s3mQgRj_6e6#+qd`qir-}f6`(|i=BOO0!IajwFYzD; z^C)ZQP{Pk#p^Ro&$-9k|1g!2Gkg@;`vY0>*;o?3FbtEAfLde4ZI-p7hb>F6nH{Wo1 zOGEIOON5>(kyPq9BvvUtuAU)(csEX!37#iiH9ob%wnlmidr8VjwrAVOTqths?H(wl z1^YMJ9XgW)8$~Vh1mpHs2I0N16l#$0H`19BLPc=ZQ1L>)cDDdNIF(qtbX@G0@Gw$Z zwZ9^+2Olb(Ac{yL>aoNJsmHq_5^5ve3%q#5UnRs%kR6b%Gx;EMsrtMcdwPSZ}X&sbsyx&QZUXrvXh7cVu+!5T3nF9c~5o6DBq=TERm

Gyh7-(kzAwn)hy%@cyHSMc0bujWPrtmjQ_<%KfL;>59fU^E~3v#cbAEVwVGKmzqqR~n&KAZ|4gd&l z?WivV{Q^f|jf4?p2~l#0XeTtVD1#8kGM9tn?iss`b@U(1UB4s%y{joNa9?Ndb3AoS zMTxNNKM{8k&Onqo*#m#gIi{JMYF2bnM5-+w^@h?xP-;Sh zL9)B)8rFRP=q^6PjZ|RASDEz@bnxRnkOa4jDn?%FO_i%)C(t0I<~_JzxzwVTp4@f1 zGnJu1dULgC-~mm71;@o}wAV%vY$N2a5gW@bwF|5Daj=!dd~>afOk2r5-2NnDJhb?^ z!J=JjQn>RupK}dA0$I|}TsXxSMaIaX{59%#k|+zE>!KJB5Co5BPlf?s$G-U?)W8u0 z*Ac*3Oib?wetIzzQU^oZG*41zm5z9y<&phB?^#5aQxO)YwX0;ss?ct^roD^dQ#X`{ zrGA*m(X&K<008#{s{LE4Hz(JZ_d#-LYQQwpvkyP0w}z`$;oFpomH(}N<2x% zr(%?Z?)cM=Y`Le@vOaUvLOySv+S$S&ZPYKLCc^KJoT(|svIp+xGKR!E4o{jk^jbNw bjKrD*){j1F&yH@9^pDfZY(CmRt|&tdm&_JF diff --git a/qis-compiler/python/tests/resources/postselect_exit.hugr b/qis-compiler/python/tests/resources/postselect_exit.hugr index 4049b6d7ee6948cb92003e79ad16ee082d4ec036..735feb1c1b6755b7df714eb4d09253a5f3e23512 100644 GIT binary patch literal 4489 zcmV;45q9oKRYy{3NJ@4BK`6B^{Qy|CivViUm?~9(*41<(g8A+VU`#iiXvUh(79g}W zGEQdxR!uN{sQ{x(z%Uz;K=EVC?QbG`{6=fZ&DM$UUt4F74IP+IrhM_KrRDlGLM|G% zd=^>Ce#66PlH^V@d;*;UlLFJ{MqN%6=rY`14=zgKD>!{YZH{s&H&hMJJ?d=;r!S}w z!$K{?WpMg}syQxt?U9zh)y^N$E5sWt)IjX~X<9AxopI9!PG3+`W-VIq>NfV-YIn4m z_L@F$`hv=_6%MtB0Rv87Q0^_B;;H*i{<_&pfgU2*c^XV$wZ9|$+8ze6xJ6A{&DSe` z-R$*h`Wc#HhI-3|wK<)>^QfOsstrr^CzQ%fDD@{(b)P)AZk(G;+>BCxN~!Mi2iJ|K zrj+_rDmSTA_bG(S$hk?S{^}t8&k( z{|4L`!2OQ;&!f8k0j?WQJ&*q&HT6NN`!C>n`Tqm;pGf7NNd4!j?mxr@fpgDO|9>j? zM{4SiRQKO;1^NF^{THg-3)TOwx<3UjB+h+T|3B_=b^i)nJO2OG|5@dJR{xEv`-3hB z{C}+fwYrt+kp}gjgPMT{^*@B#!3dQJ2qx6$eo1xz5?nhx^-Jo%3fwcP?tg+ShjY(_ zdll+`3)THoaNRifE!6)e+`CZSp9Po7Q||)zP3nIP)%{^`+3VFM&1}F9ZN&R1{ z|4?jrvQ*t42UqC-OHg!x!c^U#2bbsnOsS7jxsT$53jzO^Qvavae=7CAN)S~3uW&!5 za#iZTmCgUJ)FQ4_Ba*29SSk`sR3%(e{%5KGPdMR{62@n#-04*RRd>i$Bwq&)c# zJibw%pv8q8mmOSKQciy!SD~r|oanZ|hBP-3oD~uPPrU{lgkS;(BUCA8JoQVMd<)z+ zsZzf1)YFi9CnS868mg2sp86*+zZ9iP>B706@>Lv#kMd8YN*Uv+w<7aa{;^akVVq;( zGM^=N^3=(Ni;;rm5(LFhmD0swPD0!XS1DUOb((Rfu}X=;QK^#$Rmzh~`Ti*G#H333 zF6HKr`V$SFIyq@^TB;13n50xGH{Woaoa9J3Q5&3|R4FGab%Ii*bWd@LQl;EbzWEZa zmm8er{t?j_jN-89jSY?Ql&`!+r7hgY0#tzn=$%2W3@Shj3L^lj;)Sa4033i9)J2M> zytbeeMNdyxaP&n5b(hlS1%+WjITbX8OL;+!CfT&cRRz!)7xeUW#!wbcTQ+J#hTedo zG&Lvy15g|co9-%7-^+FtGat-NpBct*6puxsi; z%-Vawywl)|OId*raZ14uih`k1203bo!#Il-R7xby!liWi5MKd-b1tO=4(o7;ao7M3 zN3p|1wjP|mps<6q(FiW;h&TyOUr<7N$Zj;+-_U3zL#{Av1aU}f3Z1^7JPoD*eekSi zW5Dy}S5yDJLr1!yu?VoDGgF)@E5hxRyWtS?zOEP zHz}w|%=&{7Gu}t|1#>Kp<3^QS=+98T`T#mb)69HR#z`phKFCn7<+!OcSlJEYw(LBZgQ!Vq;^|YTa6> zw}-Qx|d|?&ID*o1{J{l>5Q{Bs-!bnD^!j9Q|eOIs6lURRLOG=sDYy4{xrt# zMwM_T4$HP~o{gaPu2tQvzukEny!O;210{gRaBrb7+@-frnHf40LuEXs((05_DgEh- zuXv#={KbX3IEoX!@mkpJFOL|^jVj^fuwZQK;{1UxOw*ott%{YyvaPH03+E5KR&`@r z7lU8yTGgF(p-hLgp;5fHbz%7{x=B*U^7oRBE<+e5rK3{sThFwDG_PP;k;9zv!kkg( z4HP{aQ_dy@Xq$p#t5UZssSOLaW#Oh*DRaEVbg6WD&UBe{&fHl;GkwgMN9GTVDO9Db zahH!uO(U6UG;33XDy7O((}NI}R4EH^nYpBeDkTn2%_cF_aKjyG(vTzNl+uQ$CX~ta zb4rzx08h;-Gs>h=rL5tpX=PrSSgMo*cxq;;QqpiKajd9P(s=4)Vq!cE)bE&iA~4^{ zeD~k1R%Jp;N_tzp!ER?f`$9}R!ZvJ(i8hw$ZABQ&2doplFLyh*$iqZl9$)**U#uqU zY{k!FqHSZJ#aS1zxW}$;h`IYyz738ui-#->9JLY~wq~ZonBCqO zZZYd0F|Z?g&2$(Ob2x4r13Mxc(>BCIvoTw-voOrc<2dTTxwdt6gjj}m{wxe<*(dJ& z?fl&zHM0Eaq?1pBU4ePM^>+ScuA`zC?ln7bk{ z49lZtz~&Cew5@evxI<0DJ+IfzwXI9rH_5{A?nbanf-N4hx%2Gqh_=o86Ga@-jPwsl1%I&`2G8u>sS zi)kZ9j2JNjB!kIdE+Ci7g@lAutJQptj|-x>hCh< zt|xx8YgKn8TCHT;jIol9hb)jHJ}lUIpG*&d<*pM$Ow-q@l$4b2kL!IP?I_5#tvhs+ zMm=<`N+`&-t~l$$jz+6(3u--N@o3c1w9P)QZPC8a6EW;2+15?6EvrfjNmOHRUqm8m_Tbe?>yAbz~8Ox58P${%^r@+nGiEM_9F*(ul>EWq+Nf%oT}Yx2&B5=)e4`PEvKjhPO(gwRDr)T2Y}|2UPWMVr zz(p;>&0hrZ2sU=%kZ^!yyO+>`{x} z50>ytnK^zTNi&DYNsCD46LeibYSMZh@6;ntyfjheMZwZOPCz-Dg*BK@@$kcHXm=XV z{*za}Cn8qd;a}z4wvagEMwg}OKTqX|}?v=|)5 z?Pv_bb79e|XO;z3njoD!2pWy622&PVVINlD1FsVuGCNzNi9%=M;4Bq!O8ZdEf+&$D zqUuR>P(Sh&gamXU`+_WwG^UbK2_WUU3|ed>Ea??v0QyKww?E?r;dbbw$tk>p;AIt} z@D4w0Gx1g~k;b?3{}NrE2dXpTfwLQpc1C+rJ?zIzH1j2Z)dIwT@w{#24En-B*y z0Kt$`N8R4rtM&P9g}QHfEvC|$mOvEi5k#T1r7v02ekZh7UmrZR-2(SId^J~oxMMsJ z)tOl2NnD{r2@6Y!v?7pJb7srX)g%s0Sd0Q}!BE^UuyS#HGwgUks z_gP7=8VIVN10X~pg`GSdrH7O|?5fm44qXWLlu3aeh~VR$kxP_pL2vndUvTTWzkc-# zOu>{Ab~?MJoXqt#_pmJd+OkF?2hT{kc#Od8y>sFPZuV06$;@0|KR zIIb3-fg*KA<|}OaSUULicpy=LF3N+v{+wzCXXmAhkm}0nhxizujT zI^C-oz=x9r+L#xwtBW=VYrAE%-rroWj5U>7uz221*wW9a&+Q^=HPdtCjI|_@$IzZD z&ysfAYzOmlC}(prI$?h5Nycy`sVty8`WO){K)(oa`pAT~&;?8`obW~dk#|?)Xno;z zDkG3Ta5CS&G8&oU+d@03zQ2a?BPjA?R6}*J@oqMurxmcloT%2>Z;;|&c5H)r(amas zxIa_GjmGr@32gYLNTehgsX2oEDB5LX>cHkw^ch3p;}%1V#^Hd9y2X+W5MVWfW~e=m z#x7y9m07epJ1xUBJR6R0J{K%4qd?*@pTjPvoYQ&|Cbwpnok|Bvzo%|hxTqlx#LX{{@g{;* z8V~t#(nffmD{x@0#=xsI7v8@c<6?yt5#dHEYso_8zUH(0?kDrn7;PK1xN9$jkBQnX z14AKx-4R?c?g-(~>)*D? literal 4240 zcmV;B5O42DRYy{3NJ@4BK`6B^{Qy|)g8*8@U?)|8meHmIqK)QxGBfYm9wpBEbxQ2o zJW0&|W=$|+jOhV@$O3O2!`>T}#;DCXG1~sq4Qve`W#DT2x)1Qe58i{+pHC;|lJ^wl z<0(Uej1hp2m-f>RNCH~|PXbv96G=;)XST7jMv;KyaGu#>uT)ee>=k~eGW>>AV5qRU-?sppZJQ6FT>i!gY(QbXDE_WR9;!{I+fnbC9b-RaGu%1)~Sx-Y6A$) zGu!|2((>;FN0n_1zr=6=G5m9OC%bJXL%T3TZ)QVlnGLKmd%b@%Z~cben_>xS(aWc)6#!7L@MW-ZRyRBXe~pcH&dej?1)s5Z`MR__Czxg zMQ1s5;7IQ(X>FA>w@Uh7BdMP6 zGU;8O)|RJtE9ifnq?mj+O0Tv+{jX07$#=cpt*veC-LL;;rFOpS>fI_0!ul2KU85%I zpm#xN4n*h_J}9AA+Y|a<5>h$W_JrP5LE9AiUlURWd{>3uZK1Vop?6>Ce_2Qc`K}DT z+Ro7b#*pf9ZD-KdhTgrQ|E(d#fEYXz!!VyyJovGY02s!JOD48C$I#%d!5a?-A^`UY!Y>)mpkdMv-eH3a@WC?M zoI8$qhXw=(ZF4TCg*7cZwy=>S=8jl9Vj|m|rXx0CVGau~5KOl@S4++LMevR+tYzWV z!n=h@+mGNITR009cw69ofk`j@2G0aVF-TQ{FtU!P5`>Y+ItC$w2J16E=jt=gb;Co5WX@Xjkub6RPGl&4#pw#`Da!62TWxhv(#imEk>Dm3`@R8gSD~fBBq24)ZyC{DsGJ9LDFQ z2SqXH1Qwa17<4Ktm9k6GELq-?^UMb0e@y8yC+%aNea>vlo{{)7+rZDUT=i5cFNfhg zvyo2oIZ0cr21eZiC!8NQr<(&#HyYTGpcjs{3_lwmR4DYo*y{xo>L^SX(vsthV(E>w z$PBAc(V5B==FSr+CltTZD@9KPTR1Uq9K90>imRLwgyG=0U}fmRs!)?rcXP@)-E9Yqc4s>=(zD^j||2;w+oD1J0#SWBX+V!e_u8qPyP%$++`HdW#0xm2pI%g?#G zypRUSdGlfJd~@!6!L@VHwe#vV=N~o~Fn7k_+WCSX=FUIY&OSaiP`>@f`N=65a_y{h z?(C!qb7u;W+=v7lcSfQl2@>YcMjfkyUlFfGL-8wD6|7`QicUIIr$J}xQY9I#xYMD! zRd=P!i;i0N6#7LCjlYVkVshcoIw8fK>B*lAOC4Up-Cn5oIbuJ6?)Dd|2>%UpPqBa z|0O+V0iP4dcl%L2Cy)O?`ZC?cr{L|oeF?Vl-A)A4e7E<&bISZHj4*O0LeD9{AGCx~ zobk|e2Ji#nIsex%&q;GFi=yYWaW1Q3GcG*?Kt@JlNyQTM%CNe=vA&3^4?5PNvI>bM zC0Q&TmPf9>&~s9$tm@DzgsI9e{8~1l7*g`1b*QARkJeCZLTe8_{UAf{V|gPDKdQtD zZHbhu;Oi?vn2XjR$^v1c6(7{bC5|mxu3%$HhT={O^oCR}acq&{2rFp|^oD3lq+<Rx4cg|cet!9Y)gN^1}ey%jCJp^}E;N0N1X5mg#{xnd;sXdT5e1qy|pYW0C)kSj+1 z{QUexi4rA>4-_a+e4s#q0%QV`B88$l(uz2GV+|{k*!biF#a2sv^5n^rCqF_gAy(=q zl}Z&A6~$sPA0nbk)*haf2!c91b&McMk|aMrKR;2TL;(Wod^&2vkwQ&C-A_kNH&T3j ze0F$vU@n)q>WX@Hih6c%jC_cQygK$!Fp8t-(UwSsYLik7OEJu$sIC@$WLQB*Q5~5I zJt~&rM}N3rBrU%XMm-<2REN;xbkaQH)l`&QwVWk%eePl;XMpr1R zTalluqo(deQqf9D!&UO$s^?@&lG_0D2hR}!m4;Lk%l@QMZLapMOIdKg`&DE6h%!}r2OAP z*9?Ncs8ZX`8KaCbGcyv*NR*@lk_i}yW@!cIAsu!D@&ZGLGvXn$T$&CYAs441gB z^AhbZ#FwSEL4{Bkky}9~&qM#Iw1ONYg1sRLO3=nvC|8<} zoxa2d8t8%e=zn!Eevi7T&V?GCjT?(9=P(u0Aa0bobRP8jJCG17y@)&CJ=e!k_XL!I6(@DH1HdNO zPiqlMVce`>@Y97QxOx&O1L|(+yciLOTr~)^fF#?P0w0{1nARDE`AVWRH5g7Uia4cx zD9%8Xuo6)b5~O9eOT_C02fXP8!92p%N|GRew2nWc{q(X;08dLysz3O}VV3sO$4dR zb}E8t0MJ9O1og?%tk&SJ1?t9fshFgjEkP*OLx@7tl7D5LYJqT@$Uh)x`v`n~@HImD zX_e<75;~95NnW7CgoWk3v_ej+rDn^kYY+uPGDd-Ikq)$YXNijTD3K( zhfg8(Jy?(B0s;{@XarG+@JUlp3MA$4SG8COhZkhp`4)@>5ro#$ttrVCCzP9%gIn|d zQi)&G2IfJS!)K9_)2sbS15X-+P*r;l`Yz=F7^l?dBzLAE03mBCCOdc7_p#+}tH>6X zX%P%FZw6Y&Nf2F~wyb9ofX$Jkh%~i4dR<0q`GDd4h?^|;bpvC{8YUsrnxm)RLaj(kr-6&k1FK z31q_Q_0>%SS1A$*c`jaCzqVm$+e&}EWo)C=wj^M!!Is3*a$_!AY_>T1%{7yao+T zSG{gF#q+|IbBi5$M-oKtO!F%2GH18$J#qbTqnZ2+u#aTUy^~Ll#0X zAX^&Bzb&iD?j&g<#MNzwYv!qtVo&wu2zC>pdKHI_843TiywG;B*Rv;YK=f&WbTRi@ zfiA+Uq+58xEojbRA_VBTD+IzU{?Vk}I8WlDVfZiyI~DA~ zSQ1BiM4ANtBGDLEq^&WOYYT>>Hq-j{JBC&w_$on>DA+JAXM*(lsWHCbr7G#~Sh#}+2Nt!& zpPB(QWzX4GJ6M63>=+ z)=67yqKti&QZ9jkrmQoq7|o4Ut2hTB{2qG2L=sq2sJ7aJ^^=mkDH$`X1V;-oycTZ+ m$_+UT`H6ANQBe-X5lPk5FiEXj$OL6Ka;g;*4G}7+Myd^~i2cz3 diff --git a/qis-compiler/python/tests/resources/postselect_panic.hugr b/qis-compiler/python/tests/resources/postselect_panic.hugr index 8fffdc09639ead4797e8628669ebd9bc97d19167..12863fc070b1c0d432c0e6f802eea63c56c47144 100644 GIT binary patch literal 4550 zcmV;%5jpNiRYy{3NJ@4BK`6B^{Qy{Q9A!%p1z~ zer(cR^tasoY?Qk}|LUt^EE7VCZHa-Lu=Tc0)uC{*Dn680&)B8YFRa9=)YoyZRB8+F=$9S+BQU1WJNpveI6GnvfyCsj%G9zdlQS#x z&y+yfT+6Iz8J5XemicE)plm+MvP{-8wM@(WvnNonYnhhGnH5?_#r(4=Fd1N5w07)<6IjX9V_{dgm=DYIYII!8n} z@Gzwe{h^jJ+foo6F{RA5k*La)@_!LwnNo(fhb{)H$JKV#CY!D)_2~07Zyen>LP1Xu zLHjuE(FPRI1PstIG9B{)&O?9>VAP{e9Nk-sxNm4J6VtzxG&*_)fYxIAfap{{)${$$zhi0XtY*O+Fiq@d` zp`|0h(jzRbVd)AsDM?tGRHa8%nys{tO-hDhzW+r3$kJMtW+@ICWhagSse)R>q?=8 z#l({Mb){7o678!;>_Bdd6XADPDb~5`$z00RH~1F920e2rp?rhS9Do}wWs?JNDN*0x zH!`?(DK9vSv!J!01r{7b&Tp3~!lDNfF77KVqjEe|pH0WsRN% zVOzkr%(lATi)SRK^cuzQ-1x&6UCJS6;HE`?xs)~+avPVDbRmDa%cTVJ9|yF{rSx&{ zURB8}BJWj|MC&7N2`lS)cXcCrqsjCd#g7|*C@HAglx|8km7Z#)ry-RJlr1-|+!TJd zn+ZQFPO&N0Z8!q)7I|t6RtiDa*psp%2iniNYCOe`4-W+H^v>+Pj8& z^bTquyD`yI{a&MYSCx|LcRP_=U9VEnZMdn&HhLTI0#3lS_vLN0j<=2-J$moR(WAGH zYwsMhNAG#<-QA6g4+B*hg`5mU+qevu9>RGCr=`9)Dq#gsD0FWM0u z5#5ODloH6#UlcHcsxNtSEN_; zIPtTu4z#c-76=7xk7!+2q#=uCgvEuc?&FqNpOx)dePc@OzOF^{-H(PHwLKzjb<}>h z18Q|>DMe=Tu!k!KN@nBWli5Wjt<;Zda4e9)@8-7qb&Qmx={Q&@#`uQ8rRq1 z3~AvEX&I?OA`@?ASt*w7S#hgMNhW%#Q&?T4qz>eoRC=mhOsrHqZ~V9pSeEsT_Xzzs z+qyKyfuIOpnAJ(8Y$`ofm{_S$mKC|t<4Ca7s_4h9sL1t*^t)XcS`aqH(irR&3n@n} zctw=w`nc4p^RDU@3wL&QcAh+W^2AA#CQY0)Y0`v;!~+EiJ=IXk1uuw!OgitjT9*kE zCQO*@xL7V0Y6pcv0RaKUVlgLErr6Nxu8YI7*etOM#=%9VhVJPN+?G~Bq{5|y<%eLapO;tANyk~B?Ya% zv6TX?lL{st0EM1vrKEa6rKc*!SQZ>b?sIivrKBJ# z^i)@2_o|dsOCh~dMEY4PMYJkfK?g>t$E`Zo-GKFRTnJj&t&|iL6jYJaRp-H`B&qaN zRjhBks!B;bQ0S?KFAn5ju$V}_dsWnqKOF4R&q$>wSO=~`%c@l9sZyaQN}>Yg{{|GR zCR53D6U3%;!$8S~1e(y}KG2F^M+1bqKF*85V56&28(Ts;H-T5=KwCt9)&=yILIRI? zx$Ct|F%ASdF@o->V&j$}gUkqtj0BN1Njky_5C|qg7^tyz2NK{Qftte@ib9An#vnro zA%qY^2qAl}HI!=2(3@zz!OPq-BTw(R(Ua zULyruj%}S+xWCX_mU0#7OhJr8ND7GW*ENcjjR*_|ZcH9NM@z^!+Il%>XahiH{HM9C8DjphK=(LgzwD21ub7%UD|pk6vZsO zSp>>rA2vvI!_2(@xXPx9uoZ4atDIgJo^#xg%2F6WSGPk4v0{&^#@%yl9Cb;a9ay1L zM<4xNf)$Y#Rf2I_C4(qdSVGj3)^1qmOXm&5WO>y<-NJNivJChjb%HQwXDF-0G|c8u ztcrM}c_?OuD8Ug?DH4S9ZxKds;zO4ALIxkCJBeNGvg}9_-5v z+BkNTgODAhmsJgocj(w=_M39q^bYapbXLv2OIHs=sGNOSaX-&Byxt4k6Kc%~O*#S0 zdh*JAYBkfNwTWfnoV#SZf2gFco2Q|$?!Ki1pHgv-8X}_R;Mv}IB2kbcyr(9?DCX$< zkZ57cQK`Gw8U(iiz>1tm>JU3wt<$Y()C?s|F|{GJgzi}PB8s{#U&`81+m5}O_dwHa z#Nd&@SG?uN6^;fG^bF}v>H<1WP*{+l723AiBU=u=ruF~+~K_Fj`XIEa*)W9&{pY3>r30MtZNljCWQ5v}{ ztxAm}m>+a2IwJ2rsGP-TMo%il_%y6Oln;JzIFKM17p2X-q%>6yj-8ePLTbL`a6RcD zw{+qRr$bd4CM!i1>D|>c0xu#7ip&%-lLbSVSw)OWH8HS=K;+% zQ8C0oNvFPT2YThT6OAWnO1^XKDNo{lgKBvS1dB&f|2@+Pyt_I+%n???y{w`Tz=mE9 zAi|T8rAW$~O2V*UpZvoTQwJFhY<%Zxb$SF4d0=V5{bpe#zmke`y+FQUlGUU_Rm1

<J^`j<#p-^AL!BSKn*bicaWbR&h*B0TnS*c)XXqo z#fz6w0f1a8SoLcIEGXKl0b`+RlQ0RZjJ};54OAIFISsv?X@$&iq0WY>3zd}Cks?jD z4PR~CObE0?&>%};N$M%gW6@*yEx?6Lvr2GeA=Q828fG?DC|LGd9hSh;DP`Gi#=9b4 zA4Ne5^Px# literal 4194 zcmV-o5S{NxRYy{3NJ@4BK`6B^{Qy{ff&kjV=q6Txl+~sKD!Mx}O#ulB3E3Hy=&=8` z7z&gW1P=e(l|@WNOhrsZ1{LM|%?Mebu0z?9rIi)3Tb~W=HOGdn7IP$*8(Z*?b$8fXXCN1-niD1eU z!J!s;OD}Q^;vK`?P@^Vj`j{d(%4XzE@g{Zfj^QX3$C63wGw)+5^OMC!S5gS?7*2$x zE;+h381jzc{+64#eRMwEFL?}^NW1_O=L}e{Y5>C`5veYJ|sH{;@e=Q0YrL0*|S<9kU@v32A zs?0ByT~y|-8+T=X!Of`5HR{GSD)Wu{GYwXcZ+wH9rfy7Af6l?G;LNDXtg0KUYR9Vj z^NFQ%<^w9T0(D~rDszzfa{??RXTGVtF_HSS1FRxvj-WClsT(7y%sKVv30OF1uAnma z)E%J8^Ht_sGXN`dtPT;?qwuV}@vQ!AvTVNbtTJ=3@lpM`h-JW;IjGDZ)Qvx=%plaC zJz(`X^9YqUCZYZ;0!zm?CSl_fDl-c8XA@WioOy-H45g~@LS>FpnWa?bDK12jQh$bl z1v|5pDKbp4q5eDrtLMx%bbLeI_=Xx-Kh8|0GFPe0NR`=24oJ*c>d!i`DBZY9-KN{%QJIyfM=(*7U{T8KL}ktb1&dM|>_pv|ipnfSWu~J3OazNk z(}Bo=8DFIEaSL2H@bSXKi;7b1oO4qNRfnld4%Be|jhYgyWvP_Pc&AYzqgi39l*ahR zE|_7w;~0E{8C5CezR5fWAJB1-j)`nNEwL94TAWZRg}Dr)urZWM>B~EgvhkEkY0J5e zkt(GvPAL~rDK(wa(wW;hOQn?0gQ=*dS4y>ark6@-=`*GtVwzDY)ws@dqf+{}m}n}c zCGMr?z-nR87x=V|s%s4B?)9nnO!rp`Gy(^-_Zzlt4A3=bG)zpxJb=%L(JyMhcvpL- z+r$lki{4`TrxX>V0dUbVFYR(l#Wxx1Qvlrp)utZpKt2@{y0jxyVBd099WtGr0$S=P z{U17qmENp0UunkDCGJ8r4J)N1AzL*OXKN&facC&$CGRC6xa3)W7fH#7hq80$Hu;degm(;QLH$X zrS{=C2BktFbR2_H=51mo8Bz1~9eKxaE&jil{_+z4<=QFLIPF@gPc<$)B~6#kZPM}< z-Z5M$rzb!ExmZY#JOxrJnwnINk5r8Ys51OS@|q%u+F^ynFPzC_r;uk|l1fLeB1iKh zuMjF;A)_}Fu)8+}vJpqn{LJwiLzrszk>r;u!_j49hNnsuJ5BLBiR|gft4Z0UYCOC0 zJbUs&&#r)YH};9%lb<9PJ6u(YBPdgf*DSiN*Kc{o@D_q~_x4&EZHeF)Yqh*2pZAS@ zq708WXF+%Gns@J?Z}0Eh+x3|@4eF=6H_*5DPfvI6o^NjpEI?Io?lj&?-o1f*dsEuI zl_crzO+k@AAOY9Ci$q|gNO$ie?{z~^$Op6H2%4@N-qI{bCEm)@z&m*?vlMy6@m8M8 zdy;gctBBlm_kQ4p>)t_rZke}`AlcP{M_6r#et)7aNf_|eE_b;Y5XoNz)$beFl4lh zu3@~J>6vp}Q+jTgZ!ovLM2iuHnbC`H<$$+-*9>nY-6A+U%v)Mj%03p;9WqJMD!iQ!1q|lm_rl zL$ab_*|Z`mr8C|IKu1TTX-6~sO!3A*^2&(b&_T&jySOJ8*0Ty5>|@jXxQpYkp_=X>jcgvf}5m z<~L+oaRkfqlCq*}XR_F=w4c4?XtF{f@oTxja14sgN*^B|pPrtc9-bvjmhdcDvIOV^ z^z&m^Ug=~cKk|yV$c)?p!x07>cXoDmc6@|hLNAsNi^VcBGMde1JViyfygE6qF$`~V zE(w7VBSw6De0+L(dVqjD9?zasKlTLV`FQqJ^TWf#gOihU#$uz(Gt$8^(!o(3@e~z( zm(-zv9Le#su+a+LB<3iZqiADS-ZcVCu>#Moypkn;b~HuM(!|cvnxJ^vZ-+Hoq|j-^ ze%8ck-6mgbW`f~&5)mP~MAx&YBbRu>TI6*yhMqm$GW=k6<;}=X1cQJ)dji7ogvjp& z+LK4Yk6n45J$XeuyYkH0>yoGWi9%rM+0)SzyYgHm81wAOOOZ4uDqa^c#c7yJpujLl~=|-@{`GCrVYn2 z$ljCalZ{rq@$57oe`2xdW)sI_$m z65udl7Ni)8LJ)>ANEt$mA%qx02qA=!p^_P*>c%T^I&Uyrj<&PetCo3eP>7*YHesh6 zOSl7x)?|*f97KO!PR-6WY=X;Qt@9H07h=nVhCzi;x5zCalZRB_NK*V91j*iv3?*`> zE0l)~EAH6%ML4JuTuc0rua)5P-xF0#%&JL2>Zg?i(!*{QFVdlppvi#Yp>ol39QX|~ zX*7r`n<+u6g?FDdJ~h@#b|gI5(}o*QOsN*(mM?;41pB#+kuL~)4>ZUT9#dZz87kih zVY%~vP6dHwSJTuWTw)Q&C>Iw}=h%EUav81IjMm||Vlo?bfaD=+4J>s?$;OTgbTLhp zVKrra(p?8>o`^sL7YRr^GWJ|T9i6ab0}bRr{OCs&7{5o|ROLbq&0wUt4O+eZOrYoN z6?(~t?)OSDph9#aF$;vx{P}%bWoUC)RYcQ@^ZK9z_K*GWA`^5|ZiHjjA`l<^h6bpt zZd3T7=fq1ruw6JyAt0bG+QWxP(6av{It?u0moYOWLQ>ES5wDBzIw$C&fYfF^80*H~ ztcbqBn_`u?w8EZHceAi=1S-;gI8CTK8c+S_PPw0m-*9nR1SP8YNc}ET*-XGK{+`8HBXLqNJX1I6s9#IvWQ7BaH$ z|L}paiGUTmI3v+jGDDu*EE95qBl!A&Q( z^F*>BL~u_?v070ub7?LPh;N((K0+P}wL0Zs0#a6s@kTuX zxibd=2)3poxpOCaA0riqio9T%3DGd@W#Dz348hfh`E@20*-ZY5NU!}-(q$CO2RM$8 z)MUA>8kiB528%33N_{1m@4JUMN4XCz@x^DLky@pEzFD734t{nVND|}m{h50-==nx zElHvE=3TbjN}7a~keEfWJGJRwEm2bg=TTP9%6BwyNsBxV9i6cFyt}&h#P#QVGQ9&I z0DKF+fCG!gtNz)jD)!beguTO%dC>6wZIW{~k)-obt};73=9z`udSvIq@J-X{UB0cC zA;6;wguB-~o2^;+1$YDk^6Vx3)~xRW(@?knn2%`1;WTeoMS0v5A>6`UrSvdK^YqTX zYsED-O%l{FfiU)_%0VKG8A+FEH160IFStWF*+a&HSk5W281Ol7jX|DSwuPYzH)0Zs z+=Lo(oX}2`gk3r^5qUj|Nm(e&G8+il-N#zs^P$+`FP+~SbE$3%!o@i#KyYMJZUtao zVdguqY^P~*_dv(hFlo-|o#A{K@!sa%C9uwAv0Cmc=i5DBj;<#ZZpTJbk}ghmks8D? z0?Quv^8fn=M2Kdmo0_v4Wv$y%!c9$+NHFxNOA8P&zo#~QU4%5LjB-G%$@?N=s2D{2 z_1H`Kub5W&2Qv3><;xBdl_6Ws0$2qt{qC$i01Q?Vimu?ck3>tdx?+|c4KlQ$6;zaH8ap)^x66Nj#b`z z!#6JCh!EFLs^F-`MYgE*?WYiFE|63v#F~aQIL515LV9xrEPVR1bd`?aaw>voTD_D& zv=Y6=py)GA7Pn7T5##dFw@sh!6x(1oS@NO_zYDzx3IEQhYC87O*rarx3gr1UD=)Wz sAcka{a7MK5Tu1wru4oE9p!4E`_GEm~_sM1v>d_17KVf3jhEB diff --git a/qis-compiler/python/tests/resources/print_current_shot.hugr b/qis-compiler/python/tests/resources/print_current_shot.hugr index 31778e94595224862497a782e5db307b9d29b1ac..95ccc756add0c20fe35911de2e696bd52b099b9d 100644 GIT binary patch literal 2091 zcmV+`2-NpTRYy{3NJ@4BK`6B^{Qy|SKme+5fEGot-lh$RAABw77vQy~>p`0ask>>r zzU#Y+-EB7y-(>AYBpa@v;kJdKbtp!QS{w7y4Pv7vDHDm?iyMhw?`$1TOWU*qQUOr` zR{=S1irRJ&mpKU2G2$y~`w#FrwEnNyue}-fLHs-z z_<7(uXe4%hXU<1h*SF>&N4suoZ`O55l&9wK)E7Fn=GW4%pc{QBmOd0qe~P6~rO6a4 zR&466So&D(|5thOeCn~Jev75g#s0sR7tgDni=|*}>cQCm_wuUnsRxt# zF_u0VF)s*D-;AY?#?nt?>8~k+CiQ9T|DSo;r@zM1Z)54dvGn86e?zB<%}dJEx3Q^@ zW9i4SbpHH@W3ob0(s{CU4zK~LO}(U~bH~z|U?O-)$zbl-)O=v+Y^-C8g z*6fJc1BjJ!{cr~^`UzJULi z@?@$y1Zqk^&3P#`1l1p|)>qkDz*K3eqE7V#)Cr(&o0L5;YLAPW;@PC6_Ujwfo?KJ8 zQeEk+&h5k6GpjjRRO+Hq7; zG;1wGhnCKD;k@_vYF%;uH3$Gdc%u1>Hmvl@0 z4lAX7)%!?&kRKxCeFO!uQWkg%Kje!XQDUX6uX-mRL$zA#?r|J90Bzt|miyK>mbXlc zeQQj@N47Nv4Mi9<6s@p`8qjs&j6;hq@O5EveD#pl0+wT4EE~Z*7{064b>SN^jqgfx z??vtV#x2{L_ZPk{9CnN(-tFZN1c`1Dc<=UZ=U|wHJ`g18I-pu@2)4(fj%OR-hwmzj zpI78ZE;6tNuJBRB$I7xri!Bgwe8^+>}DRmiw5jPD9}S_~w@ zcQqvAy0AF&xEE$Vc5lnH2ov=T-xcO~CYp`=-rKVYd|jdDFfqsQU3H9fU0CEf1o2(f zkgn^lkYxO4z))+CTP>~yRN;pM3gUih_=umkdG1^LP`I+~eY7wfW%ve2;$Zi91|fHr z0k!H-4d?uL;8)b5d7OKkxIx`v`TIav3#fl%3t!h=)$k7&#Qosw!W+~g&o%H}VSHUZ z7)eHwxIwKW?%Z$WE*60Ss3EChiin8Fh=|BYlcWQ|1cW%}6oq>d;E<7)#2|_oqYOeu zKnxLyKx6`$2}DH17A756)6_yZ*%2$6i&a(UcFwKKNZ*{r)#1Z4nUdgiP@;~nXQE&eLjfpzMQYxvHCHed$ zK)M{6Dtt3r zu`5_Z6M&^^LMO{vmkP5c0k$M$4RwQCdY6B=0iR#tXc-`r)zM4vLJIxhLdr+57<%pwpjoq(jR?NP3{x$F%ogT^Z*4?`&xVK@v!ujRNWFtdlq4){8VP}+IRiLH zFcWg{sD1`XvinpvL?gZ%_^MHXSSln&j8$SMM2$#Hdo*-}5liHvd)h#O%1awz#H5N0 Vf-J09jum`2Rz(eDH=oz2_6Ot<6OsS` literal 1821 zcmV+&2jcihRYy{3NJ@4BK`6B^{Qy{1H~@NIG!sU^-lhXQ3wA$S6jyu*K_6LN+kM%) zie&#!aU?cMw|qrg*;`p_FWua|?pYoAgo{~;+kV<7lO>^T3BM%~>sfl*#+O^B6dnN> z0UZIkh_%O<_PDJ*B378CD+H;0Ez$gGzP-(2YY&Xc!rwX{)%aSX?iv(bu)3We#_cW! z16xNpzLuyS;&KSKXmt2mqW?8dGwZ*J6ib_=T0^P_NcF#JZ(`EOPzpUKnkD2oA|A$$*Z!gAf zW$gSj@~3=D=IxuIu~U-l3}C0McFVDJo|7)ZL>n`cbB|ilS)ErwWP8ATK$}j!DJBg+W2vAF;YV+b|q0?f}(Ihq_PG*C(nwxo){muTEH%^kY>AR&D&$2~_8bDxc=*&vtdJ ztiX#pSomLTM3IZS5zl4U_~kHmq(ghG{b?A*9CG^`U(8{Wtvyc6G1=y}_PCZOcZLyd zFYJz@d@a%aAkk{;9EPKZoj-8m=k1Y$S1&q_V8-5tLZImS~t=A*kSsd@WJg2U&yb z{E`r%2F-9yPX~TODOneW9Vcqg+pYY4U@PUbzcGcc>Y`@2hoivt;H$zK^u#d3z!!z_ zRqfym>ohiMaU^Qc!x44fGBV5cSsWiYsF-xcp3>_6v)=r6Q@6jdsWuPbwb#LLG+BFI7IxdyBMtYb zr+*Gp5kPk(yS_SJxO zw;$mbJOmyK*4^~;Iav4lrw@ViBY>>?_NNcZHL{x=0CrgSo5%Sc+Y7Poq(8lp?Uh*f zny06qV%-6}`|M)fY2ID_q}!LV?g2rwS?cO>95MJ{2=gm%?Oj*aFHhXs!yb5E+N*G3 zsKSLI6y`AVxhkAzc%r9)@Ks?EUlfLos~wY}Xk{16m5Ewi3tv>~s;~@~_X%}g*rk|# z->6^O3-=0N6^?CeBwpR+4+Mqo5O}Zd?he6NKJkH|5R2tAn+3J>IK&Eb4DiDjmBp_c zx+*LSJM9VKi<-@XX4r!sXBVyt>)nxXWtSeo4*05YC)?QQ6?WRgSA|{Ui!N58#Z_T^ zQTPMCD!gSbPzYaCP>ZX=BCHF$SPsYC>6a(AL=T293Ugr=f{prakVw3(yYq(~^TL*x zUHGClHo7X@g*gV|i<%i-)kPV#_~&@4`wVB`Qa%uRxE=~z4-6jh>vWj6_IMuLm+n4U zEH=LIwK)pG-Gu>w>ZpM&LS#flWF`>NBuP3@0wJVG$~qF@uz4E97-ft>1|cILh6o8E zGJ(hhA|i4NlMYwY*Fu=a5z~{4S*`Q;9J|XzZ_cUg@as)RVQ^}bsFql&oF(I37sS3= z562nE(-i{=?OCpI*t!F{ZlF{;-+8c5`G*Y1e@19+xUg-7jUyA!g%(l|HY0bo6>+qO5%Hc4rNG&VfzqFN>Fj5 zTI%Hq=9659i6BB&8~w9<4prv(66LXs>Q2$33?q_nq^jj(tXYUUXTzEu=&-^4Pow+(vB#kQhG2$Z zh=dmVC4I}4B7hbxS%TYa+5w6Khy%IBJHl}h`=7+OtMJl_{B$JV&$Rv}MsWxnFn28jh&Zyr| zSFEn7Yv<(aa!g`Ic0O4rxFE=sdHDqkn1 z|E>WsG5zj>A#CXj8ayorEABf zzivyjx-I>8G>DO}9ha`1m;O30UAr&+cRYyg@Y*@iwFA>lglQp&>DrCyBRtVcfTC*` zMgJWXVwBd7OjrB9e`6)(HWebcNENg@OPmpN-PhN@;+Uu2uT8Rru^#{In64Iz&py$=RYI)jpM9dMjiOl=ivBDV{o5wQdYomU=xWJ)Hj4f& z6k<1CEt#&~`}5w_o9W*>3VQWYUA+`tJ?`q+cqu-QzgWL|HeJ0HUA>#G9uDiKdOH1k zEW{}NycPZ7boFvhubxhWI{hL>X$z=(Vw6^IsHS9o3~zOH!ahV+AAiq7?ONbR8lZ#tffkmkI>i{&%L$Sd{ULa}FHLI`hBt>fd>% z#WG?r3@t94(?48mlG=aw?fhnykxZdzlOY~7j z^bvsQqkib4c<5?_!K^4fDyfh1(MQ4hC>h;lMQIiJC>DJbP5%^y)^h#{3H?)-{%MK+ z$%y_bh`u3(D;54}O8?};4*io3{gaRW309ThnuULo(Lb^1az*J+r~aML{}B4`(n>2z z|0(?;@Vjs&!><*k^{M_6d?WZlaG!q``akgZo36*{`kX$k{uuq@IsFsY?{xjEPoMdZ zQ5YVuSA?fdDG`32$vu}`AS(Q&TFrba{_^gY2e+@Mw99FZ`stLSR;gz>t!@oP&+*iO zCd#f0ibP~GJ79%j9EKP%erhOFu^CnwTnx;sOKQ&IVtldx&%bHRY#In|dsYLzsmuf|CGV;>KCF5xc zvWTg4K_kT@CosA8B+HqLsicvj>0-L)?bLKj;yN#qv&<0As+xG-$g*a3B2IF2-L9?a zbe-hrnvJLPG95WbQ!G=18(Gd|w2NiU2TG4P3f_|f6maX5n&4Q@V+0n)Ii(|b2<|E( z1Pq>1BL0EzeBd*zymc8?K0^lQgtlW0Jm)X0{Ka2*;gnk76?lllE+%mBE==GqT;LlC zM1XJJqQxnd@+fb?0a18`Q_6rR;4Bo709Kt+1l-A2_~3+TPH7Ksaux{CgzYJ9I_@e? z>5}7ab4qW|;VYb#!);hx^D(8i&s0Ww%~Lp~G^-q*0uE1cN@M@=PsOQI8i4ya%{?Da zdEDW+{md!taUAbvxSrA*w-EzZ*ionS=akZuCi*z5R;d4{s8#LMJZDE2iG2`f)#~)s zDLt*4F6zXUCnnCSl^H}#RAV6*@_TILL_>JUYDowy3E^BWH1E=ldy*q~j!8Q{G(Zu& zN#J?IF@ZD^S0;t9@GgnB+hqz{FIZR;$))iYHi3mo!d7UOrpe>HkzT1IgoU%PNg1Lc zoMeQPZe##FfUkHFAlBipOyoo#@_Q`guN>sWxuBsO%||abYPLa$gAU~PxP}wwY6KOX zI0sY%h=_Ikl{*LT5aOWg_&v_?8BU!00TKdYn*-p)IU1;+7YGYUCS0wYg&BS$1*6Iv>fqihM6O1d;k zzhc=Wrz0DL2TR0?G)U->AfiK}v!uFoFB(JFp|c^QTq3dN{7_lj;X`3 zx||N3lvpQ3S44-UJEA*6i4IGLL{l0&tIMLI%hGM>ya4IM7e`5$3aD>=+=d6E=(;gTqrciu>?pQt%2Krm>O z%}k1>^u}2!n;Y8eWuqyT;j9!7ARJApjk8ikLo`x2c>HKeV>l}nL`5nH5~VXq#F}Di zN&#?I3imISOFcOdDO`(GQ&T$hntIZd{xvBmHAST*`azn$nq5dU{<|RZ&w~&r%tw zpd!*aRN~l_qJEO0GNM5#YUP6}NK=Yhu~bM+>FHK=o6^(jCzK9iD;VJ~nt$gY0D+zO z0lzp0!GT$4@83BGIN%%9fM1-CZgc~;ICnG5I@f>aNV(h#+`-|3e1gVtN9m`A5{{e? z2n#O{<1NUE!|c*zw0mSG&X~}~5NwU6m_x0GBbUh0JYyjU3vFlE^3rmU@LTy zSIM{p-XkYSGsW3$++ki@8G@}`E*IhmXJgIAghvR%!X&VTR0M>DHzv^(ZMLQp1c`tg zfu?xLu?F5FID{Z99L?G7(n7FxGPx&N&cY@jECgHO%jMIg$p4iSp5WZW*URr)b_Al)Ot!SOO#E!dH#!)g+px=(>^Rc+PIER?d3P z8t&!t2|*ax%7s0ym#ZfPVIf(LH}fh9!B!Z8Fd1Q!B4uu5Io90BdosB)+V2gggcIkE z6gJs-cxdO1XNl)_mqa8p(YABX@y65ha?wZ{YdlKGtHi|vw!$Wx>t-(Dj>zsQnwPvw zJh$_9Pad*7ayHp`%$?hqgvaN+NY1cGl6cB)ZB$|s$=Yb*Xr#Dv$+9-%*`YLTJU4Pg zvP3J7xbBi!-X)%!d2c~@cz9s2u*odX*)>O62)4p=ByqA^8*NPGECgXdf*1~EC>oZz zOd?q$} zGk$^|pAxXobxwjI5!|N-7zcsS5bWcDpx2de;0kZxS2DmEc+M|y;#`d(AYNRhnF1%y z0R>Sxaqb7`g->}w;KdJU#(4vLeqc%|jZBiA5-eQhAAa3EAOLXAtUbD>t0BF$Sw`G`ORq@Qu+a|Yo&vI^Muil~t%jvFdMSXJy$ zD=i*HcRD&-DZMkpqV*WYY>755Mx1~haW+&RTz!#DM;yOnbBXD{fTP`5nCT`A^ zzTvNa(=XhEe~(3AF7hd043)mAId0*|l=>02z$K=z(N{SwF^ZD#io|7$s~X0yEHoMe zvhWgyY0*`&b3iSNNLpZhV{(H;K*eM3M2ipd3iZex(eY@41n=#5J0d65MtH12D4nr- z53;_owC~1qTgsiicqtb{ZcQ83*(;^jWoy#1P!c4+(Q0QBGJ?1)$5XsGci~3`i?4i`&PODyTT=`MHAu>qVo&4jF=4bT+fz zj#^W;K*Xylf{9IHas zfKVS$toBUy#x@4T8d7%xK)eII^XZ5r=sVg>Ay+U9PHQ=>czR^1pG-(2IGDet5n=c8 z4aE^}$lMSDK_NkCNCK1)n}gZ`Z|SW|H(BsVc@TdlL)`1Psu)>fp=soxmyEWQBIfDzq3 zBK;ciw?+ultc_e0?$7-W(TbSTh!qo%BvrE5zHHn2h<=7pWWiCN_skzCr}A)iOX&PkJlC^$}o!7KFg z=9~7x9DT*!w-{R_vC5p}lnh7hQ0lg9!(Yxt%_9yq>vyyTc(s*KZ%K_XI*DH{x+c6b zjf8@5cmpbT(GiS2ZNMYODmg(ogiEfD;I;qchqdf+ID)U;XG81D93vN{Yuv#i-OHA< zpYLn8NIpN&j*DvLyQ(J7!L(7b&u+dmAkCGbp*-vRl@4vK(*M9G%TT{_##I^S9%@vF z5gWh7F^kzzdozJO9^klNtFDc+OCtpKZZ}oPddWsWRdsfeo$@QiCD literal 4796 zcmV;t5<~4sRYy{3NJ@4BK`6B^{Qy`^l>qt&bv0i=QeAC2JR|?_E}U@7O=I6MmVDz; z5QLU2)no}#+ ztWQ@fh#oQOa4NuGU9$cBnl&)W6*Ulf7CWU2Rcwwy3K$ z>fg2ii@n;gs}&o_*fXWBmPpfVz0}mz-r5L^(rRJoYLzr+m2|Z-#4tlwyQDe0q^o5z z0VdTpY0fsmfDK*kljiJ`t`>(IaHtkaa~4YfwgfPySF1x;8>KlLrK{zkf4c)L=bYuC z+8>&;KlE>VfR(Qnh^|&jb5=@M8$|y$2e6!1D@0d2L{~edIXk6)%LAB@S4%`!&KA+X z1p>^*t2Lslmvqh=(VnHk*(3V5LV$^{mP%L7R_Wgo!5*QjwbGom()GT7n}k%?yK3*Q zn!Bq?qAPcqGtu?Jw0B{eyD%P1*E_>qnG`c!Z%uQzrt7t#!RdNk&0Sa58zU!1y)>G; zG-UjAy*HY>H@e;+8$tCBHFt-0z?fdIkFK|m}0v zrNMH}T_W{1HFul(zbCAGy|=CxhUP8|U9XbIVNo2CPE>EL4MU zT(&D--^ShW;r@$3RH`8+M^pU_H0?#^1zXQGu_$XlRMg60r^n6hN#N36teyDRgN-Otr z{(&^jjheer*N0s%_Nn`mI_6@(-UdcJPS?Bo^wf8TUT~EQzB;8X_<1AZ$t3c4xvQm1 zaV>m;+u!?oN=a~*qkcN2sBU!*oVs%s#zYo$NT_7Wa2Id!;>8Y6kTG`BYS?O`**a;q z*F>`gr!Cofh(ki5({Q?wWePZW5Q(Qq6K%}I8R=pxfle~$=B}1bHj?2I`LZS?cGk%9 zG8)b;9gy?87p64!ms4tVvouYS1#O8l8%;Equ9&qLQ)!wZIqvYBVM(hIBrIt`kPwzM z6_iTUPj|I+v=$@9*~m1WWIzTfl`LjtNK^zP;yuYy)>0~GWN5aO#Its4su5|O;*j%7 z5Y8>M@T`%gi|ivf$+1-vmzvJjNscYqcsfO;q;oXGD>$f;r7SjkSkjVET7l=#aMmeZ z@&HKSGp95HZ$aSSDSg0kOkn-Sgd45_uVolsa~hhLP{Juqz`+@2@qGo06)bbR%wu9s z=>ZOark^;aMy}#~%PFlLhR9h?>C#gu{hm_VQJhjCH*rdne&U`9k6k#XRD7y3(Oq8R zl(KXs25=ImRL8j%UY$}KXSr&nVtb!Dr9ZbRuBUXyU#~t#ol+R5l%BIt$GN3L{Xa!@ zv{Unx5s5?Yot#^`(_K#KscRBZr>#8o;M~%g;>;{r90li=uIb{C*lAlL$JR-XNikDA z&CGHK=ax>Sq3AiDE}Z08E;X4yN%2aOb4y1lS=NNa!c)9b>kOBaO4$_$oLf3FNJ}(J z*$Y7DmQHmG_z2*?PgVX|aK%t{#dpOjR{S&SEYyy(?`l_^P4#byVDM^JT`h^`EQzj` z`?nk{NM2wOkOi8hY2G+%q^e8-e1S3$$rT_WE`Sd%zm>jxJD22{Dfb{G~Tnr-etUJhk5?WJ6+CSSto~G zFZ}XWhx1qNe&U92Uhs<++=7N_Kn6elR`7}#j#0rXQg8~7PuzRqmvf^inc+E-wihUU=T#CX9VjYCP*tq33;|UHV+5$8@GhXl8OD`D%DCV zMZzaFQzI2aM$k~v4U}xDTaVX{OD(BEN2mUTq;Uas^hPe4=Esm&`Ax^DI!uv zq^LBdLBB~Ip(#aCn&X~bRcoRt#c|Kd$k;TcD%`U!pP!$gp{Df4JzErxO{tBaj#wcW z)`w?}tf;~^eRc+z*N(F`SR8B)RtFSTht9=D`JpNOxo4#`r6}C9Lf9#@*Uqz4EEQ{| zDXsB(S54^&_b!`|X-a9_yEQ0o4GyKL*RI|hP3eq#SLodJ5p#>0(%0)1o6_Iqj`iA_ zQUTn%HyFGtLsQyw?=ERdeNO4kYscLuO{t7~HwTvs8sHx2kDMQ@>f^)Rj+DTJNoX{;~=JS`9U&sLopzHKnKDRoIlCx}Q)qu$Ld)#d7Yv z0v%WdC}5hij~?uuRp-tk2mwF&0Mnd_KEwjYoNbD|b3J!n;oKQ@?tG$!-!<6)X8;3C zbLR1LXG(3(og2UaR-yo=Iqw(%duJCd`rNsw1tvfbra7ko#NL_Dop~N(hhgZjD~AKn zVjLEmaKkn)*hLGjq2Urhp81%?3YLjs0H|P?6pZ2ooA9__m^*eU!QXLLca{lkvX^jr4K$kcqR{OiYr6 zGVo)$z87d@Hqws5(F_SdquEF#ax_mE_`SfT6GT$`$WWw}<zTk>mG;pLnur zOX6AkfP^PaoB{cojy~}W&)N`KXr4o4;n8Q7pC}{4BC{W&n-R~rbvo4 z8!QFz#`C>EGUPE6XQZtJ0>2j+Hk}|6auj7``8CnV@|%e?S}6O(qmK+_AFH-hib-er zA(3Ov_K9X0L_GRtqB+`#h(sTgNPgi*nzmCkzZn^RICv0=A`JXkHyLRQ5;H}nk_LV( zu|^And@r!c49W2b{8&ae@CQUP!`Wyf5-zRq<9mUpZHXMgj|JiYzZZBm%|z37eykgk z?*+HKD9D65S&LQ`BS!H;#j-M}Akl#R3{BR9bB1s;7YqaWW3 ztSNFPu?8hYBpS?s zjc%aJrR8c0O*3rO$Z|YoB8^tca!#7f)zSgK*T=enIW1Q!2mD?jS&lVRECPNk5d2;@ zpr{m*Ad(+fYGgUO)JX9(BF1JHYc?NxU@(TFF>(x*VlnWFs1%YeJtp9u9_|t16uhU4 zvV(Wn!MEQ)AV}nxbe24Te6{ftZM3k+_gV@~Ceqd-%kf-VVb#+eNdX^u3ZO8Q-*6M` za1MXv61?Y>Ud1@zw3hvWVdeh=CXI7?N<3)BJ@TM!*Y$N0P%w zUikY96H`iON!2J`N6_=!i~S+gm9GtyQb zfiF-*3Trh{31qomAT1=3#u^xcdZHJlhNMvtYuE!4fT58l zqX;s@5Ml@s5P}3kL_|bHL_}n0l5|(op+R^uM-1d#+=6u$?SL+qhaMYb(cv@1WK|ib zYerOGVJQlftkCO%tGL>(^@+%SQAF}8sw5&^<02_|N1Q~96Axo2HFY-`j!Z7 z@4DtftRO`iw}_IiK(lc_+uJ$AupYgEPx4A9$(vOp+EJ-xw1} zY;HVEL45HbqEOe1h>i|2Nbtfgwj*>}p&0^dP0ql!$Hm^*PU;3ES~}=@ZH!#Tl{K(f zyO&tiCAVnV(Fso6XaemMGKgG)c$g#VA!~4W0|=USQh7e||JTbTpt)9STv8HE8%lzi zS)QRI`*a3~!ncf%()?p&C@OeK+D^o?KnS7}7FCZTg%jDYEDz}RUD))bShjdw#PPy$ z{fwC+Xj1B0tupobTvSDjcBu4l4M8>c%@nIb?Rs0n-Rn*PktgBYMD;rI(Q+!_1*n%z zInYun6}>g1`kZ(|M50)iJ)Waf1SOK7*5>`>Gh#y-M^M>D3J&&R>~gSJ1JD>FEbq}q zSv#qfX*J%%pPH;E{2H+~Qb^;~unYMb~ezo`PL-H_}aqT-Q$}D2@B51vc^$gC>;wAf+9jq)$?%&!oD$GH+1@MCd{fYGXqj+M*5p#uGX$mMc8@cTzYO92NIV?3p( z9L^8HfG@9|h<8LKOeJ@J;~JXa`G1{U z2fJTdQ4tiGSWdX!q+w1O2IzeT&_A4z5p$SXt}ao_4v60O#^> zA(MB>B4>6h%DVT<9|1vw9^;htwIl^l`P*Xr!h(_)k@a>sKOS>M?EcmW`7VUgm% z7(T4_lJrq!XVwOuywd>v$}xP9sFo6FUhexlM6@7`mgA5JS=UZ9&WFbLwj4c@opC`Z zm&U{qxFv?WWanBk8VCTy3IerYT)=S=sLXL@ks&u?pX+;=4E$?D?DkNi3WJ+G4pFFK znOKh$0tM$W-lKt$!F^rxEQ~KRvVh_PE%o*YB;XzNdJj~UAy^KLjUdA70FzYW$rfdg zKZ zZ1@|XFQNlBI(F4b$5q-Zp*$@}jl{!WO8plG>ln+XQcE$!>g3vZ1ct-4hT%d{C?}{m@@5j5HYf~Ey=$j_-<=$fOG0_|P;spBz zRYXJ!XLoey4Rxz2N@m5G=GoRS2@;)Nml0O-!)z4IPhbZQ8Iyjg37bm5?G|Zl3=ddWZ0)uX1hgq2O}Y^$>VE4iXM zt+Q5QL(|%%x7ws>%>joTw#q}(+C%?!hZT&UY7evm(OU(g|N6tKhtn!V(>g?Nb%>^w zi2kbuRxnO$5lyQR&4DADRui-ckmwSuplNl|DtOYA1*Uy zvQ;JeuQFKae5*=qHA>UEL=Bc`TAA3Y6dOp{Dicj>6FF$2X?@~Uo#?;rU`2p$)rqY> z(X>M011OqSDqEe>fBnIV=3AYzRVqzu6#dsAtYCbrQ8cxr&A$ISgcZ#<`^}P?S{BOE z)beIsO5D`G^vS;TW=$*DH~Z4mw&=~m^vS~XZ%?c6CkwOL7ESGo{w<4Dji2m`&B|zM zX~d9eYHND4HBIde4UVQ(M{ia~Q@hi@&9Q=UYIl0H(BlV>A14c>Hw&bH>tj{KsRh#0 zznx*_!>R505%P1gK)qR@{;kgnhf@nA)W0pVTAf;<)i*2Do4uR$`nLgC(VW`b)PC)H zHMK_#mJO3NwX;@YLsQ$N50FFSz(Z5pL+{{#rWT0)L5PmP5KS!+y;&lf+9LY58Cb#i zW{cRY5l!t8A2^~Z61`a@`nM%m@qDvLG__7PyMq2L3RXLQvMXq6pKR7i|5gPnop093 zW}h^*Q2MtnSi$(oLTPH1*lZI0TNtcpezHkyR*9xI$_!RDPVEv+t(2ygiKey*8%WtK z6F6A)scoXEb)u<#qN#;q2TxE-rGLwV)tsAkqBkg-+9}$9`-9b-)KY06tmgdf5LR>2 z5~=^vkU43IrD@5fw5{f3QDW(>^wPA%O-nER+aRpwWMQZDR(ew#Mbpyzw>DVKN&1DX zt_9KB23)4tNbv%enmJcad+tIAJ%hwr3-l}WF9N5t4mofFnsAJ>3*TvhS)5_S;L{mK z$EWj-Z)ffWpU&L3GfMy*fFLeHgm0X2=x`1W-`rpuHe5r)Gbxrqu?jU9hx7IkT$sgq z`*x=B?ObBv)4BBR97C#nI+MPgXQaR~Vla%3UvSLhyz=d=eLKHa;G1X&!ZXCcE?gW1 z7Hq-_F5$$dW)hf9DR=}I*52}eP7@2K7=bqtxb!(sKmry42pEO8fMFFSa3wK);Z0+f z6=tylo1lYF;NcZ34#EP9U^$11Z<>=1!Pjo+Yhzyp5zd`>o zXbFs<{~-F;q5mbl!}~wde^CE1^p9!IzeZmN{21_4z(Y0t4)BBE>+qw$gnxt|#6Mo& zhTri?;MMsW$DlFInd7hKaj&;~O@AAPX->NJ`6oNZk9zx2)0a&zYt8f%pkrLtKKM@4 z_h|Ybt(|n8o+3IPxXJ^^@tn_D#BqX_)c6ez5WzQYgMr(?z->-5#A}8)jS3u-s=#L| z@YGSCQ;1LCG7~uJH11s)U+8%d=N40p1zZLL7Qo%-+~F^LitrS-`Q3B7Y$N%)+wHwnz2GkoiOQwpB*dl3*?pLxy(tQljbQIreFD-Dm(=l zyz)6=e9lR_yco_crj`GnD<<%BBwIr+68j6BTTI$bpHnl*?h09o+6~Svrt!K)(Zxq_ zZZXMzk+8@T7Jex*{ES%R)m)=U12X(Xm~1>5-YPeoTTF9?V(bXZBkx}+(u2LkRuvu2 zEvAqtbw{yf02j_JCVC&Y0UYy~zr;U00~*h8ZZ42xfgB2GJhQQqBY_+nAdI-g5BPx} z@E?3&AKr6>V~&9Hpz#a`&dP`tfB;s&5r6~Z@EdyA=th5ug>C?iXE``#8qaWySf=sp zrUs2?H)0ykY>qUZ)vVwcfoycph>`r1kKE{|Z1fqQ@t4@huZ|4>KBV!CW(5bw0AhH? zXFSKhF^~`o8DS#;V4wrwhkw3`;Th-t68H3Q%uiW{1CfD&T!tU~<1jq-a_ph;Oy?%& z#`2u6<1N19J9OZ1j-T=h|9pvYTdXftP2xcv5rIC(5c~6ofxui z_<* zsoyjbkPeW5^iLf^sXT~8szGw;7ZUfJtDi_PFfVApykHm>zDv&;sq(bRA zTl|xnPE|^6VyjQ|oGh-YQ)(1vQDIq5mhaMYp74`>fsxU3n()oa+{mcuIbpt896jfX zpX|=S;9AaWMvP+e$|ZMRG3~`sq1IpHn+E z(bB8uq(7BP5=ygnq11$jo^$0|jZ$f2&K1)QC0Wn8Vmg&<=sC69QVu<*X1b=~V8t`9 z8S)+>%;I#;`F5t^+xZ5EPv@I&=LkT69nb)daRxF2%Mb(q@WC*=z&&`d&sl{Ud^*#J z;X<>SNOB?xdSrNC-*{n4ZVWeGBk~rBBo}kJc3fVp^@X00i==gpT4Bi|zwjfH3B{0$ zecUx7Iiiodp%{d_L%0-;Sm=E&Z{)&{`yqrQ61ms~VIK*WFYXR;F0d4n#Bee%aU|l% zRymTfP~;&3JtNjj9EoD#SdttO=oxWDA~)WlR~d3Kk8|Ccuq?|Qo1F0$T{8SQ*A0ul z7#V(K_;oxoMd5b?hv)_l(GKYYwyulix<)Op)p4jAPSq)KeI1ATMvq9xsX9+ac1%F9 z480((>k3QJ1upb1k;uusaU@3(c89Q7MU*JoQ5;2&BNDly8-x@?F$_PB#;c5R zTa33@eL?hbLG*WyUeh~z@?i^c8;Q*t>O>?MnF9(PBPT!BTQ$7+3`IP{Xmf`WpA zfPjF2iVz_}qzDlrM1)X6Mv{ml46@PZ14SYt(Z|Qf$0w-BRpeR)tyZfgOP0uFG9^mL z8@oe#dRig~?)2R81shJ)-6db_r{h#zY~{m;kD#ESARr(hp{_{Bp=yk9D4{N><4`n4 ziWK4LIMl2amPD-aCK17oL){qY5qaS^)N!cUOsL~fLbHyiEE>J9Jn~>P^cdk(UB{t1 z7&=bXkusM!)N!cT%Nsq|9ZS*+i@sRLp=LrxI92(2iLF-bd%?c36}wA@@GKd^(=p*x zU2MECvExuPCY*{xbu~5X^C3~$j9JcVW*4JnS{M-#g+8JQwI5hO~rKJvbd$Zzy&WZpP>saPm} zWb1;U*rEYDPQ{^ST}{d+MbmMrE)>7mcxx!hu;WxS9TOu}Vxjn@h=rF_a#^n5SQ!G1 zXBX;ZuvBa;Dvel|^u`>e9QlTb-9rEi?w zql56!e2=uuOaE0l)f}#2O7rM9Xv5=Pt!G(AXB0^8#vNJ-Gu)uxD}^Hm2AaL`7?fz| zU!mmCu)^VtRu8xzHZW%6aXyuxQMS;W5uDfT|7}g*S=2U0`*YBXFIsvyzk{5)AMeU0 zLXe8sYOM&j{TMYqu(U?=CR3S*0hNTRi8l3aSuZXG_Q~8 z)q-GxSJSQ);ZY;5(p-$UbyoOCNG^w9Y|^*G*WP5x@c@<>j2& zZm&8K$zBl#_n4^sXUT#;US|R+31=a3_X22a8M`OtBj-WGxj@=(n>pnrTxE zJ$28CqtyDf30oh5u*zXbJcRyOilc&#cd!(Vi!!~yQ1`pfgq019dIMOvb@Z4@dxfI1 z!EU)u`xBbMqx3c7ORPnm%L19T<~(J@PdQ))A@3udY}P64!vay^&>1`K71z(}@z1+c z(G=F@K!&6sy?239-6SNRNLNrMNl+0fYdiWZqjULyR`t=bu;cth^T&ka)P5pw!dd?at_T$z3> z&9`u6ltKC*>yiRDN(rcTEnZi9Z6dI3A&AxyAZ9XoMZ(s`UC3aTm-{v~-VO-Uw|5LL zgCZ_NZc|>8B#^FAYFBPieI;_~SJL<}`ORyW(k+`-qyf|t+v&oK2sYEIT~ULs0aa$# ztRi61zciWa6u}ZGTnuZGh~cyB$RN2OCfR(CSfVl-hD@PCAbA12d-oJp2{I8)Od?lF zcmPI`qoRoO!9&qPh(cRLRHKOw=`B~=C8R^#3le)oRh5{%K%zgskQ)qzsMThANBUuI ziAm=#`9;LmvDf4v>EEF`!?JV?>$TG^ai=w^O6BgXQN~xNF*59rxH`B_<+o$SpE6&O z^{T*~3ggPqXeR!@ej725v6=}EwW(l2=icSrgD8nF#7|F!12FU3U?Y>GK3GXcBFc)5 zW|OBJ3UYSuDG_88MCrpU@I+Q-MP~QJy@seY_si?Fr5T~f=>8TqA-;w-w0)pQ+gRv z`h}euV+$Jt5pcwa8_-BwyxKsV9lmtXGr+hlgvo%qo`VC53b=cYQBk72nm}s>NTAKV z4r$0;u8HBF^?MO2xB1nUDj9gqg4-3Ha;}z6hKvnr&g5ufCw#{s(qW;I0Lt8q6YLJT z%e+^^*q?|DvGD0i!-&NQ0%9Sb{wg9zwS!C=Uh%VLH98m6=P%_FoRdEOFL z=eQ7NnT#_4M0eMH;AKpxRV_dW>SVcLk{6`~y|sOZP^%oegV(`f8+J(!)pGRH@EQ6H z1h$wxi1P&==b zKC?Wv407)%9YE_~bv#zp6hAS55*-`6V(!U{oKBM5%0s^-#I}dhHvzi9-8|O(X&-Tc z0oUoOT_dP;rFUfc3RwXi7i5yMh8BXwcH+{5tQAz-D{6a!F24ZR^*YA zb(?cK|}OoORvfe9g?V-Sn;n;;ccNpF!bT3`p2k@2-1E!2kQ zS|SaiU&OTwSQ5>B%ERaYkY|1go`-!N=dlhK#**@?kMh9xsz7?x;a4dU+bD&e%mP5lsU>O8ik literal 5000 zcmV;36L;)LRYy{3NJ@4BK`6B^{Qy|4n*iGH&@fkUQqraanBA6?{$Du?VbArM63lS! zE_HDVVuxh+=XS#Arw8t&cl|$1%r^LH{9oK(XlwUiWt{qN$9ZuKodMUbk zU5oEU*DgkTU5u_B5ANyebv`pxozl^@^U+@CqiYAGM^M+UNPAt8uHBLTJ0dLbUU#H+ zMD2A%Nm%A<*Q9ILYOiZ`?U0^?UAx>2h+R8bM`7yN*|n>++0>N^i_+Rn(ADd%^xsLq z+HtSD(zVOtbyzH5sb0G*T{{oj>pbY%h0wtWUA@i(5wvvewzSu6>DsN30++5|*QEtk ze(k(;?Y^|ved*f80K*Jjy$*~FVY+r=+Uvx0?Z)81LszdOvjY%ayE5%{Wx94l^xp-+ z0$)2bUA^vz{yQRAHD0?Ux^`#!>&~>-o$0?rf)&1YOLXnfwAZ2OuS3&+rv%G&uS3(- za_!l7wM8=SSffeV z6uerMj{YqW>wL93eB|))Ss?9MApP4OEb-L>3F_beU=6+6prLyZqk|tektBsJl+OQYM&4Ad|$~p>DS9|uX)@D;zJ3)JPg0A+81T65?V(DtL zv}dz)wH|QbLA4{aXGiGYg1}n6S`)f@R!jf31lEpwR!djAf@in%Z%<&UUhN89EtmEz zm#(%;|F#7dc+Ym}YQK2aOaImdR*iesi)X)dwK2fJlJRP1=xV`qwPCtiF*1PhY?vBY zC|<3Yu69gU%R^U71_vIhEz`fvfkmlj$FxVLs|8|vwPm`8GX294U9FiG;)o@TIMcsH zf<R2=F*)v^j5?$??{%sE|O1Ym2>%Y;P z3OEzs$g#mjMd|64=-;YkaCZ~3VL8>u2;Jo_gMiDka|Zx#417=DE-T;?5xPM^E(`(w zB7oas#ZA#S#djOUy{MZ5z}@csrxay#0l>L8HrM8qZtx7QTmk;V#bvSL+U`~r7iYUC zPM0g-1_0#h2;CN}yTpKdQ*(c;?o;&dqW=?pCN2`6ei8RR+~07KpeX$d_Y~Zh_emE5 z6s1RUf8!p!M{$|X{&v6D+Iy{$peW7pT3c|W)_JSFw_1VkxxMEPNmCOUs)3^P$7N0A zVS5j|J~xP>w0bChf3tVa)ZUr8{_Of%Z>ax))_JXscu?0D>G~tRoqG?WCp}g^&f}C) z@Eu1qo+EPF!nmU%S_Dr}Tv4 zUSva=u+WuZP${9TjFDuL%Z#10T>hA`bED;w23VNO7)d7m#DY+gOsbM|X(X2?EzC-` z8y=gTMp;Uz6g;KWgoQ|cZ&0WIrzceGv@~BuS&BUhzc;Au zIj3|()$++a$<2q~8&sKLB?;p%{NA8y&r)3GIUB_va}=Yv%Dll!QitCgRF0jfDVj&- zD3Y^Ud2`HZDEPfWQ96>e23(<;FZ(gWnT&j;(ct$6H7fn&l6*xl>B_B;0++5_m-e_WT{$l< zeCg_OF~BfGR}M^j9GI?Lm>R@%<;FA)EJ`cKLsyR@(?1tEv@x4hvJ3W1J1wZ-g02&F zjbbQsxxh487LGX*K)F2U`D^Z!KhU~0w>IV0KIOdUjX=3Pm-3<3l}Wj>OA)X5B_p@> z)?agr-fG$zvLJYVD{Ksi$X;()*$92BrL2}r*IR1KX{PZ=~2G9NZ z>veHTd3Y|1%Qz3uROsJE=G)3_W_WC9dYtZ# z6(=5_laHp&Zczr@6>df;DjaTlqG}}rw~pi zoVJ{}z&NdN>T>#G<0J+=mBFVoF{%xW7c1(EukzHMs;WL}kXM_0RlKQ9V7;PKu{5Ou z{IsIJYC_%ORW42Gi?6De8bh6-hFMX=@X(a%{Hs9JGWCe2G=O{c%$rgd_c)uTw8cN} zdRz+~?nP6|;+5-ZO8<{j>8M;#Q@Y|FccgMnno<@2IHVjd6q{0BXjIIqKLN^6e#x)@EVJ*8DgQ`()ldHaaBOq#?SRh-5NBm zcK~p%_nz0-+?vlg7f4M_q=`v07Mf$0iDjNq$un@7qnLS#G%*bZ3xb8TmpFz@vXobj z@)}Q={1ciK-Mlr_@r5rnyg1{!z=#^nESdQ`vUm#AY@Cu{?6JtrC zScXnOyaL0T30jH8&M{m9%dqhzhu|^HN+hm@Woee=EEl<4Kue=onk*2nz?lhJ!LV$G zXDoCeF#px_h|cm(1U5R@lRo(K^UoiZ8u z0;?1WRVfluH9et1CCp_}0wr0JAyy*sQeI+`qe+f8@CwXTMB3N{#4C`-8beH)qlkNC zCk>n8c;avdHeKb?IfO%Omf3-k6mn%Lp{!<#vG8On!jzdZh*M3k@lDE3B)yNO41C=9E6T}34;qR zMY=JPq8XZGIf_8EJgb>MW=O`AeqN%PWl>DA3{|zTEW;n#NQ&kw$719QC@-IZuWW!>7LK45C~0UTDF%ZtsPg(0H3ktGnHdowX_9mz z3Lpq(L6nE7v;z`=fpHk45C|f~5MmS|gb+fAA%qY@M1)F4h^hm|5$AOBXtsUZ=DAm8 zq{l`cEL1Wfv`~%>je{GiNH zSxpWAnY}RqC3^cSl!O^pn4>Xaz#VIYqv<~6T_rHF?^!oQMY#Uk)UmU+LDP+fM|p~t z=$PMvqeg?SviTCEdV~k8y!x@Xvk1fScFH3>Wu;n#!{bHvjo>RzPVxcFqBb;`73HkH zx7AS5j1V07`~_n{DDJCi(nfgOA}&@gzMVRs^phl)F*!ELcKF#dnT{L)5DjG+H&fN>GjjT*U-jRZ!T z+d)%LKePRuX;m*tVbHzW38*qUIiX{aC>kine=BP+2UvVc7Zu!ni~m7DB{$?7fXHK9;b4GP5g%BwBcgT(<~bIzizL zNQ9QLap3hb`*5UNNU_9oX)EMW0nWn4Z&6qK!<>KJmEH88J7r@cRu7jetDKu9DEhb& z{-qFs?yzq-#O`rqa_t_v4C!=omw~OO6RDiNgJ7$c772rKGg=0zR#@{s@+p zFkuHt?2U?m(`(oRcqK7_{w-hjvBg}QoPzEkzN{){c!#yOnc`TET-(|BGMf6Z_sZ1) zuPTQ+EAF8=rmW`*_XSKiKr_shT3y62-@cle{o0B&;LQE3?vq}USDUAyS@&MkuaNa~ zj_M$y6qH_xcxqP=?tf2Nl2Khm-y4ZGv5`vN%}$Gu34lE0uToES-)cSQ;*|PZ79JB$ zca~r$)~yl+YfIzETIvgvy+Xo+)3;gRt%a}5$q#n$@#)r{TL^nELUzTu65h2ug*6cMyfVo-_^0 zBq=%Vs&9w%=t8oZDq?#<1RQOOfaq@^=K`@95OFZ0Aa&xh-aNwv7 z!gT5o4vtY|tuodd=W^~;HUX%KrZjSJb$p-h#6&9m!&05ZjEoHff#>7{Qd$Py&7^@@ zo17w2YkgEfjJoFobkRqfvD~gSFd-z31X*ZFH6Xzx*R8{aLi?aNS$t+%QY(}XmeW_< z!LLFGk~n!$w8?9OsP^IP5+e{&FC@6^zg&bZ{hY|@lS&yMNQXgnVc?2Lg2X|K*V3Y$ zJZl>;UVAWpT5680-208KDY_AFF3@B372JFzP9rY*f5WG~xmil*we6fccl3{>e0YR* zlL~6yhYf_}Dkaz8h4#3^N^wUp4um-yE<`?wLFDv&1pRiCbSridfE=?yY5Vmlu6+WO z!pDwf7D#Z~dUShbsKt&@e`hqwj?-2BQT7j?sJ2M44l}@Va9^{qrn|Oumw<*9Q5*TY zF|^5!?!*L<+i^eoUV77#%Bq)xFAFenwF%{P)~f_N9c2xql!H77U!r{6D+f`)jix<0 zK#AQ2?oQyuyLqGC95^Fx#eBcfHiFqUAqbylVV%Y@g>4e6sdZUEXa?Ic4mP%Cy*_4q z%lw`O0-ad1tKEis-!%+`3vb?W!**~YM zHlaLhOk+RAa+YXq6GpdM61OzP6Iz=Mc#7F9V622Gh1Hqoln*GSGKn*}-o961ihP@gaBg)EO zlRZgLl}xeQ!FwdxOL}b+?}pl|2nKJyVG*{U{W{=V3IPq#eiKGS7(u`Vb+SO2I5;Zm zePU?A8~M3|oWRDbU3=SF`z`MMg;?7-wUv)j8jA8*zpp&}gJC+c2bqlm=w&vKB&Q*> z|2A~dti9^4SJ|je1;}jo_vc0aj&z?trIqdQI&+aIi*Co}A+6I=f4;agDHwhQxlNl)t+WK{jFNmo zRaU75>rmQMYQ$eII0DK^7i|OR><^DP2HUgkhBea3#tZCIv&!=GkKEm0sF?;SK@AEp Sg51)l){^4jOog!gG-v}W>8dRN diff --git a/qis-compiler/python/tests/resources/unsupported_pytket_ops.hugr b/qis-compiler/python/tests/resources/unsupported_pytket_ops.hugr index 02ca2dd8de634949e327e85080d17fc07c5d446b..71a6b9dedf6d18e0074021bdfeb9939e3178f970 100644 GIT binary patch literal 3738 zcmV;L4rTF3RYy{3NJ@4BK`6B^{Qy`!bO5Tdgd|t6RFOJ-XdKeh7T1sPqqTea;?z0G zjYHf^<>yeyi<}kNG|Gvn2@wn-AG(RuV4TLK!*`b#TLXH*(_3NfrLMh zJi1OE8T1D=@HZ)Uk^w3LJOU~L^YkSbTV1rU^yg&pbIvaNBzSA$(f|KRz3}JQV>MbQ z^eMbG@woSXPR_Gw+Dp#y@Yci|wQS@o|H4}n&-Pm9)k|@MrM|(O*Qhz!$Z_Z!8Hz#+zzOKJk>YrHSv7Zp$ns|Fw(j$*;@W5LW5A-)WVAQX{VQolY|8c;e zUZEEo#0h|}R#&W91VLk>RN%KdPA2;$ZecjW$aK&)iGazot85pjhu z;#Llc`_C1znzM3A+<)$fzm-V(}ei(b1M$sf!DjTVrlVV@@$0Rp3@ClYq>vG`FKP_n*dC&3s2`I$GmaYUBP> z8Y>n*qBd@&IYv}P!Aj;U&2cNmxg&~mJBnkog7F>2xs`smqpmxmu9zQDS4Y2FslNX- zgB9sVRCg4-mDX}rq_1@6R$AUlZMV{!Sa#IbSNAKu-AaFG0HjhO9sLo6`$~n}4}@G1 zh7>7*$o;1#tmdq=$gR}Kt<>kAs<4`KM2+08gf-_o9|HARL0h#E5UE&MbCUd=+*hxHQtq6fAAwi`0JYo)Kqv+7ob|aBAQqT8 zsn-FB#hsISBaq9TlYR&kbLZr|=U#?YNwqHw>;)`KKuNVM&w}j$D{KlBR)CR3@h1eZ zCPwxKV6A6S0I=M5|3Bx66N>_X?MhhD&&fjz((H=QD^?|i4Ut$-ianvWM74MTtHQ*V zaQ3}X5i8@p3by*#ZscQSyg6qWu@?xjoe*1xSQg%#^}c--Yym}VSHxB$w)$AkdlqZ~ zK9+?awgRyg1j{|>QK)1w`@P6fp{dhLC>xpyY<^&zeQ!>i*CCx9>@3;$(koNvtBsnD z5TNkZB>Z$JhDsZq*eC8B`a`j_(K?@vC*iG$*FjjhvocFsR)%^Mf5sROL!k^+saE#= zU%6B2TBpw$!O!@PW`-5TcoP{hY{}2rz^A^%&nfc@q^zjKhDhw334Dmef_~1JZ}Fh7 z)XuX~4D7m=)4}mOg`C4qosSu(FzJ?2rI*qv<5b=pBuCAo>^tLB&ONQ45*r>h^8St5 zfw?tJXNM&>2T{naJCA7{F(o?Ec5zjO%BYTpjQv6Su4MQ$GKa}zN~N-G zA~8%s;yJZIsr-GI*28x?0xtEgXyU7JO`^6O6rV zqFB;?a-3FwJJD1oU9D6mU$t-i#7sK9q%!%cl{=GeuB^(Wtjeua)??YfO#{hH$~4){ zY9^<$7Hz%DJ*h16-1DRQIV-qf=XAMTC`@v>PFxF<@=k8Ge#lXGas`BaxkJGOHlIqT zyrRi3G;_onG_0#d$x(+o3DWfV>JP#oc>60q1LIZR0R-kWnXHOefU|SnViJJyCX+S6 zSkuFp?8|?(s5kvrYxWKVA!zYgwl z1IpRk3mSt{S#L0WX_3dsj7cytIF73XuUoQ~o;09+dn{P~l80(ylXCT&_-@v*Cms-gEfwFJJ8^kqm;2FoH4n?qs zWesZ>mW3tn;R3tV_&CEoR*s$Ad}bDYIjm)T79w zu}!SmNc>?v^1cdb`+LQ}ki%*=lEq@NaBy&NZgl9-aic?r4j0MQ>cPhdY@-br^4W~r z*x1_lPmJmHfYeG z!D6vkI5;@2e3LN=)xsoKW@St|wQg=^GA7+(yPUm7-Ghf2lQbEAvu}g2j7hhfD`S%D zmS;-Z_<`llCsv?p;Z)9;lq1MEmAg&GVHuNLEu4EWCf!^uoGNQI9*dD+O$5gnseRPU z_^6r5Jvf!gQHwld(ya%ldRqVQ?V26Ey?sWZN~o8XQ|Se!bmHMchTk4_-=K>NOxs_W zamf!?^Qbvpx4e7st+Pv)Q|W{vwP@?5{_!w^OQ-_tP%4BBnHdogq0uDi;t3E4XGxl- zIlKW9z>r~>#2AJ`j4{L@LkKa15JQN75F#>UB0`i0ib&J)=w}!u;sY$^M>4WpyBZi4 zmS(gp@luB-7y-Hm9DKhITcpKjppyzR(o6WE8PFOe7M5@vB%5|ok4>cVoV*e|6j&a^U);nsvEqePM!y7x1H+=9^pZkhYKf3iBo%G)-e!lUU}DsGScNnK zg+hU-vCsliFSj(Z3ImOE59r#c!Y)DHb_fHa3+ApCOT+Sxo zr|(xz%#vs)i{RftMnfrqd!o<6Ft~$6BhpzEx5=g*a=YJ671x4Dm)!owK)fy=$>O znn!(r+?Ah_@xLN{b+L8BQuHX45fhJ@5$1$6VIA^;hFP#qK|5cwOR&L(uUm_O!)Jq@ z!Cps92l5_yrm{CeLSP}{UO3q9_=i=XOrR~6?G{O>ZC0!~s)(=FLxn$x@=ru@o#0?e zY^4W@w4LRJ+dZO@N;nFTAPirQYentI&^WyaS=;{R z6>|@3_qLRjNc>c)aH_7cVg@}q>ao&Wi72W7(Z`cq3X-b#)bJT4Mfw2%o)BdIhV2=x z3GoT!4xzrvIn~<3^#Qd4i5aXOkC0KT%c>YTm38+mjb{k?AjoHYgs=1_KX&pah+xd# zY|_P@=(SX!;UZNnun=0S3}#EwHR=VR#0-dLiuQwNJ96qf zsGPoqQIga^(2#_15(RoYi6)e`O?hNUv=@k^Au$XBBJepNG=ZpV`hix9zR5CF{ur3R0yv@reR7(_|qmkU%f5|$6?UU}i?3f69C z{fv6B!7ZKPSV%@4JyB>|LwtU1h+xO=I(}}VU@Mfxr}RG)^AepH6)0!f-pcM0L@1VA ze=0#n-XZb}z@o>#2dGUd}ll*`UFmp0BpQsRwdD~V^!i`JQZ3g znFu0g0$_gU1JCkKAZs9A4RU_Xb~$-JH4M;Ue3vwv_`HH>S~O$fjFoUiovmx*Kqz> E8*HXUtN;K2 literal 3373 zcmV+|4bt*RRYy{3NJ@4BK`6B^{Qy|iXaK69{2*44mXSILVAHxD?}i+>LjI0lz~;G| z%wHdEtoQV;omcT~~ zJt~I`bzA%sMJZ)U0rUa#0s8@Sh_|6`)Ui=~c^KY?I@{|V*Dh<}N7~`1;~Mphjp7e) zL!Abx?{BYm_=z>!_&d};9lQ;7?x9Fx;PSS98fkkqnh5*(;BBZ2Wh6a{Fby1d8|qMA zg8#2MpgsgVtOE?#|C$+-3zS#v-}nbTO11wrCKs(M7PMkttk{1`zovHFeBstPgJ{O! z!VI@g8myA^4nABSnA|#rxOFzUbvgl}$qmBECBleX zCla>^CGHU__d1{4I-9uMY~t4G#QmR4sAhbfPuxoXa`bPdDEFV*%y^EXREpwq6orbt zm9DrPU2!XQA#zcvjLT6O_n*3`PG9K&w^EqPQJ7n)%>Ab|R5PBVGPlwjB5Jz-bfm)Z zmEO3O=C~r7<8m~|{ig<~Y<#6UZl$QpQPdSt)cvOls7lXK6i0d7N`2gaxR32)EKCw^9=RX$UHJjwZQW3AfS{?myi?45>$uy#6BJt$9yF82e zWIFLEmD=kbfP2XO#fzv+3pM4q?kQeGQ6lQYMT-UHS#gA=1Q2auh1!tvwG&Y$*PZ(o zDg;NJT=&q6C=wifa@|+H6IGP!uJZ2H#dQb0`~2E*Rpz>UZ5|_wzGQsZ?u|vJ(KY0;p6g1HV`p0azC-?22n$d2D&Bqyc7_tmDX~=rTbJ0`Jqy-liDiKU zTaVa^#Lh?g7AYZr^EJ@~@|{gG-SCj$=I1r-ckVuZ$2^yQ@g0vgYC1k(!rM>>zJngj zrUoi+c3@sD6oSHowem*qctBo+x1nx-uaf7*Njg@7daV77FcAcSs1%7-?(n^mhqU$1 zc30rJ)31aOc$IfQ;91@s#~bh~Di)Mt-De(@Vo~0`^eA7cbuZvyz7Fv8-DkYJ@0b_C z+fYaU|DAT=`?z5?dI$67sd~SIeW4jZ-FFv@*=2TPvsXD5o;( zl=WC{FPwd39_3jKM@5rQS=Vfv%RZ-E6SL3H1Mj|r#=5s!EfXHKTBXUtqs)_8tRHgJ zn|%3RU-F(A6y1cM2TG$pM3&4w1 zSQX!O*8Qtxd5*<$&!S>gKIKJG2BOoJ-Zpys3rh{$zZ1=z8Nt*sV+54MGnrZ8nS7Jg zJBfKD?mzh^{<{B*=E}5p4j`I2RDA8Y31l@>H|M(Nr>iM5<4!wn-e8$Jcjer^yUg#pufy}Hzs2-RLmPQ9+9vw z^lJ1DOzXhH(q#aS{e_=QCKN+Vei&<=jb$I!p%?^f8%%;BL+^`uBMv|8qXx@FOlq+9 zZLp+a{lYP@6pPfrGBk0N;SDRtO@<^lq`{0<~UI}_cG}bR1dN8~_osC2BBS}5hdNj7xXf_giSdZdXfwRza!9GxY z(QM>uwOZxm<)3iXN7Uc&3AFG2CKk1D~=s@{ysCj8Ba%+I`m@BlOw0)_}7ENopIfkks_;UW9>L$+#YU6Xp z{HC=Ojzq$WM0#F%fshe1$CHQ-QPkS;aG=yJSVy2eZLua;^J`Hh829!W{QSbA?}G$- zmd-xJx0I`fZx{2uhk4kYAeeujQh;HTcIQ^Hcx)A?s9yd zjjx=e=|mJ0LYVVDp1-S5vzM8~ zq`G7YMzMA*idb6ak~KDq1>3aTgBZ`SK77SXeq6zG5V13}s7cHw6x4?zIFrKtx}S$b+MAtW3hMEBI7I zik3%5H>19Mz;HhLMwXkpfeB}6uw^Mm>V<>3vwMsKYxjY_SbPSJ)Q;tgqWbVX_#Jg1 zNw^o)CNJbfHA=Dje;}lma9rA|Dy^lHKt3HqmvL+Q_$pe!`-lWEfEKUUP+Q$#JCwav zG$vnah1Q*FXUho;0fLJ$SrwRA42d;{!jn=cCatFlSeYt7!uipT)JbZKTcOcM_S*N! zxUTYvz4;_?YJLD{6{HSp7DsNZI`twk$DBgM2rm_FHc?@(>BSAdE&IbPQJG-O$P@cl zsM8#hlcO{oz+^^c3W3xM%iKELk4aOAiqGivCRnf3W`NkK6@n^mjWiUWafSZosx54A%PqmeZs zz9yr}E%qVYZx1&JnTGUe4(7Y6#p4>VimI)^6Sw969TdbRkgOF%9L4$fMtyvsmrhhjnIaFCup0KVg{UxbkZJ|WK!Zg-GA0POo;pN7X z^NK_c`WMwDwd@uagdo7xJM4hN*M?4e04%1X5wf!CM&NC#o#W9hBL3PS.main.1"() local_unnamed_addr !dbg !4 { +alloca_block: + %0 = tail call ptr @heap_alloc(i64 80), !dbg !8 + %1 = tail call ptr @heap_alloc(i64 8), !dbg !8 + store i64 -1, ptr %1, align 1, !dbg !8 + %qalloc.i = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !9 + br i1 %not_max.not.not.i, label %cond_233_case_0.i, label %__hugr__.__tk2_qalloc.229.exit, !dbg !9 + +cond_233_case_0.i: ; preds = %cond_exit_20.8, %cond_exit_20.7, %cond_exit_20.6, %cond_exit_20.5, %cond_exit_20.4, %cond_exit_20.3, %cond_exit_20.2, %cond_exit_20.1, %cond_exit_20, %alloca_block + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 + unreachable, !dbg !9 + +__hugr__.__tk2_qalloc.229.exit: ; preds = %alloca_block + tail call void @___reset(i64 %qalloc.i), !dbg !9 + %2 = load i64, ptr %1, align 4 + %3 = trunc i64 %2 to i1 + br i1 %3, label %cond_exit_20, label %panic.i + +panic.i: ; preds = %__barray_check_bounds.exit.9, %__hugr__.__tk2_qalloc.229.exit.8, %__hugr__.__tk2_qalloc.229.exit.7, %__hugr__.__tk2_qalloc.229.exit.6, %__hugr__.__tk2_qalloc.229.exit.5, %__hugr__.__tk2_qalloc.229.exit.4, %__hugr__.__tk2_qalloc.229.exit.3, %__hugr__.__tk2_qalloc.229.exit.2, %__hugr__.__tk2_qalloc.229.exit.1, %__hugr__.__tk2_qalloc.229.exit + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") + unreachable + +cond_exit_20: ; preds = %__hugr__.__tk2_qalloc.229.exit + %4 = and i64 %2, -2 + store i64 %4, ptr %1, align 4 + store i64 %qalloc.i, ptr %0, align 4 + %qalloc.i.1 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1, !dbg !9 + br i1 %not_max.not.not.i.1, label %cond_233_case_0.i, label %__hugr__.__tk2_qalloc.229.exit.1, !dbg !9 + +__hugr__.__tk2_qalloc.229.exit.1: ; preds = %cond_exit_20 + tail call void @___reset(i64 %qalloc.i.1), !dbg !9 + %5 = load i64, ptr %1, align 4 + %6 = and i64 %5, 2 + %.not = icmp eq i64 %6, 0 + br i1 %.not, label %panic.i, label %cond_exit_20.1 + +cond_exit_20.1: ; preds = %__hugr__.__tk2_qalloc.229.exit.1 + %7 = and i64 %5, -3 + store i64 %7, ptr %1, align 4 + %8 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %qalloc.i.1, ptr %8, align 4 + %qalloc.i.2 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1, !dbg !9 + br i1 %not_max.not.not.i.2, label %cond_233_case_0.i, label %__hugr__.__tk2_qalloc.229.exit.2, !dbg !9 + +__hugr__.__tk2_qalloc.229.exit.2: ; preds = %cond_exit_20.1 + tail call void @___reset(i64 %qalloc.i.2), !dbg !9 + %9 = load i64, ptr %1, align 4 + %10 = and i64 %9, 4 + %.not108 = icmp eq i64 %10, 0 + br i1 %.not108, label %panic.i, label %cond_exit_20.2 + +cond_exit_20.2: ; preds = %__hugr__.__tk2_qalloc.229.exit.2 + %11 = and i64 %9, -5 + store i64 %11, ptr %1, align 4 + %12 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %qalloc.i.2, ptr %12, align 4 + %qalloc.i.3 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1, !dbg !9 + br i1 %not_max.not.not.i.3, label %cond_233_case_0.i, label %__hugr__.__tk2_qalloc.229.exit.3, !dbg !9 + +__hugr__.__tk2_qalloc.229.exit.3: ; preds = %cond_exit_20.2 + tail call void @___reset(i64 %qalloc.i.3), !dbg !9 + %13 = load i64, ptr %1, align 4 + %14 = and i64 %13, 8 + %.not109 = icmp eq i64 %14, 0 + br i1 %.not109, label %panic.i, label %cond_exit_20.3 + +cond_exit_20.3: ; preds = %__hugr__.__tk2_qalloc.229.exit.3 + %15 = and i64 %13, -9 + store i64 %15, ptr %1, align 4 + %16 = getelementptr inbounds nuw i8, ptr %0, i64 24 + store i64 %qalloc.i.3, ptr %16, align 4 + %qalloc.i.4 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1, !dbg !9 + br i1 %not_max.not.not.i.4, label %cond_233_case_0.i, label %__hugr__.__tk2_qalloc.229.exit.4, !dbg !9 + +__hugr__.__tk2_qalloc.229.exit.4: ; preds = %cond_exit_20.3 + tail call void @___reset(i64 %qalloc.i.4), !dbg !9 + %17 = load i64, ptr %1, align 4 + %18 = and i64 %17, 16 + %.not110 = icmp eq i64 %18, 0 + br i1 %.not110, label %panic.i, label %cond_exit_20.4 + +cond_exit_20.4: ; preds = %__hugr__.__tk2_qalloc.229.exit.4 + %19 = and i64 %17, -17 + store i64 %19, ptr %1, align 4 + %20 = getelementptr inbounds nuw i8, ptr %0, i64 32 + store i64 %qalloc.i.4, ptr %20, align 4 + %qalloc.i.5 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.5 = icmp eq i64 %qalloc.i.5, -1, !dbg !9 + br i1 %not_max.not.not.i.5, label %cond_233_case_0.i, label %__hugr__.__tk2_qalloc.229.exit.5, !dbg !9 + +__hugr__.__tk2_qalloc.229.exit.5: ; preds = %cond_exit_20.4 + tail call void @___reset(i64 %qalloc.i.5), !dbg !9 + %21 = load i64, ptr %1, align 4 + %22 = and i64 %21, 32 + %.not111 = icmp eq i64 %22, 0 + br i1 %.not111, label %panic.i, label %cond_exit_20.5 + +cond_exit_20.5: ; preds = %__hugr__.__tk2_qalloc.229.exit.5 + %23 = and i64 %21, -33 + store i64 %23, ptr %1, align 4 + %24 = getelementptr inbounds nuw i8, ptr %0, i64 40 + store i64 %qalloc.i.5, ptr %24, align 4 + %qalloc.i.6 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.6 = icmp eq i64 %qalloc.i.6, -1, !dbg !9 + br i1 %not_max.not.not.i.6, label %cond_233_case_0.i, label %__hugr__.__tk2_qalloc.229.exit.6, !dbg !9 + +__hugr__.__tk2_qalloc.229.exit.6: ; preds = %cond_exit_20.5 + tail call void @___reset(i64 %qalloc.i.6), !dbg !9 + %25 = load i64, ptr %1, align 4 + %26 = and i64 %25, 64 + %.not112 = icmp eq i64 %26, 0 + br i1 %.not112, label %panic.i, label %cond_exit_20.6 + +cond_exit_20.6: ; preds = %__hugr__.__tk2_qalloc.229.exit.6 + %27 = and i64 %25, -65 + store i64 %27, ptr %1, align 4 + %28 = getelementptr inbounds nuw i8, ptr %0, i64 48 + store i64 %qalloc.i.6, ptr %28, align 4 + %qalloc.i.7 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.7 = icmp eq i64 %qalloc.i.7, -1, !dbg !9 + br i1 %not_max.not.not.i.7, label %cond_233_case_0.i, label %__hugr__.__tk2_qalloc.229.exit.7, !dbg !9 + +__hugr__.__tk2_qalloc.229.exit.7: ; preds = %cond_exit_20.6 + tail call void @___reset(i64 %qalloc.i.7), !dbg !9 + %29 = load i64, ptr %1, align 4 + %30 = and i64 %29, 128 + %.not113 = icmp eq i64 %30, 0 + br i1 %.not113, label %panic.i, label %cond_exit_20.7 + +cond_exit_20.7: ; preds = %__hugr__.__tk2_qalloc.229.exit.7 + %31 = and i64 %29, -129 + store i64 %31, ptr %1, align 4 + %32 = getelementptr inbounds nuw i8, ptr %0, i64 56 + store i64 %qalloc.i.7, ptr %32, align 4 + %qalloc.i.8 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.8 = icmp eq i64 %qalloc.i.8, -1, !dbg !9 + br i1 %not_max.not.not.i.8, label %cond_233_case_0.i, label %__hugr__.__tk2_qalloc.229.exit.8, !dbg !9 + +__hugr__.__tk2_qalloc.229.exit.8: ; preds = %cond_exit_20.7 + tail call void @___reset(i64 %qalloc.i.8), !dbg !9 + %33 = load i64, ptr %1, align 4 + %34 = and i64 %33, 256 + %.not114 = icmp eq i64 %34, 0 + br i1 %.not114, label %panic.i, label %cond_exit_20.8 + +cond_exit_20.8: ; preds = %__hugr__.__tk2_qalloc.229.exit.8 + %35 = and i64 %33, -257 + store i64 %35, ptr %1, align 4 + %36 = getelementptr inbounds nuw i8, ptr %0, i64 64 + store i64 %qalloc.i.8, ptr %36, align 4 + %qalloc.i.9 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.9 = icmp eq i64 %qalloc.i.9, -1, !dbg !9 + br i1 %not_max.not.not.i.9, label %cond_233_case_0.i, label %__barray_check_bounds.exit.9, !dbg !9 + +__barray_check_bounds.exit.9: ; preds = %cond_exit_20.8 + tail call void @___reset(i64 %qalloc.i.9), !dbg !9 + %37 = load i64, ptr %1, align 4 + %38 = and i64 %37, 512 + %.not115 = icmp eq i64 %38, 0 + br i1 %.not115, label %panic.i, label %cond_exit_20.9 + +cond_exit_20.9: ; preds = %__barray_check_bounds.exit.9 + %39 = and i64 %37, -513 + store i64 %39, ptr %1, align 4 + %40 = getelementptr inbounds nuw i8, ptr %0, i64 72 + store i64 %qalloc.i.9, ptr %40, align 4 + %41 = load i64, ptr %1, align 4, !dbg !10 + %42 = trunc i64 %41 to i1, !dbg !10 + br i1 %42, label %cond_171_case_1.1.i, label %__barray_mask_borrow.exit.i + +cond_171_case_1.1.i: ; preds = %__barray_mask_borrow.exit.i, %cond_exit_20.9 + %43 = phi i64 [ %41, %cond_exit_20.9 ], [ %.pre.i, %__barray_mask_borrow.exit.i ], !dbg !10 + %44 = and i64 %43, 2, !dbg !10 + %.not.i = icmp eq i64 %44, 0, !dbg !10 + br i1 %.not.i, label %__barray_mask_borrow.exit.1.i, label %cond_171_case_1.2.i + +__barray_mask_borrow.exit.1.i: ; preds = %cond_171_case_1.1.i + %45 = or disjoint i64 %43, 2, !dbg !21 + store i64 %45, ptr %1, align 4, !dbg !21 + %46 = load i64, ptr %8, align 4, !dbg !23 + tail call void @___qfree(i64 %46), !dbg !24 + %.pre337.i = load i64, ptr %1, align 4, !dbg !10 + br label %cond_171_case_1.2.i + +cond_171_case_1.2.i: ; preds = %__barray_mask_borrow.exit.1.i, %cond_171_case_1.1.i + %47 = phi i64 [ %.pre337.i, %__barray_mask_borrow.exit.1.i ], [ %43, %cond_171_case_1.1.i ], !dbg !10 + %48 = and i64 %47, 4, !dbg !10 + %.not345.i = icmp eq i64 %48, 0, !dbg !10 + br i1 %.not345.i, label %__barray_mask_borrow.exit.2.i, label %cond_171_case_1.3.i + +__barray_mask_borrow.exit.2.i: ; preds = %cond_171_case_1.2.i + %49 = or disjoint i64 %47, 4, !dbg !21 + store i64 %49, ptr %1, align 4, !dbg !21 + %50 = load i64, ptr %12, align 4, !dbg !23 + tail call void @___qfree(i64 %50), !dbg !24 + %.pre338.i = load i64, ptr %1, align 4, !dbg !10 + br label %cond_171_case_1.3.i + +cond_171_case_1.3.i: ; preds = %__barray_mask_borrow.exit.2.i, %cond_171_case_1.2.i + %51 = phi i64 [ %.pre338.i, %__barray_mask_borrow.exit.2.i ], [ %47, %cond_171_case_1.2.i ], !dbg !10 + %52 = and i64 %51, 8, !dbg !10 + %.not346.i = icmp eq i64 %52, 0, !dbg !10 + br i1 %.not346.i, label %__barray_mask_borrow.exit.3.i, label %cond_171_case_1.4.i + +__barray_mask_borrow.exit.3.i: ; preds = %cond_171_case_1.3.i + %53 = or disjoint i64 %51, 8, !dbg !21 + store i64 %53, ptr %1, align 4, !dbg !21 + %54 = load i64, ptr %16, align 4, !dbg !23 + tail call void @___qfree(i64 %54), !dbg !24 + %.pre339.i = load i64, ptr %1, align 4, !dbg !10 + br label %cond_171_case_1.4.i + +cond_171_case_1.4.i: ; preds = %__barray_mask_borrow.exit.3.i, %cond_171_case_1.3.i + %55 = phi i64 [ %.pre339.i, %__barray_mask_borrow.exit.3.i ], [ %51, %cond_171_case_1.3.i ], !dbg !10 + %56 = and i64 %55, 16, !dbg !10 + %.not347.i = icmp eq i64 %56, 0, !dbg !10 + br i1 %.not347.i, label %__barray_mask_borrow.exit.4.i, label %cond_171_case_1.5.i + +__barray_mask_borrow.exit.4.i: ; preds = %cond_171_case_1.4.i + %57 = or disjoint i64 %55, 16, !dbg !21 + store i64 %57, ptr %1, align 4, !dbg !21 + %58 = load i64, ptr %20, align 4, !dbg !23 + tail call void @___qfree(i64 %58), !dbg !24 + %.pre340.i = load i64, ptr %1, align 4, !dbg !10 + br label %cond_171_case_1.5.i + +cond_171_case_1.5.i: ; preds = %__barray_mask_borrow.exit.4.i, %cond_171_case_1.4.i + %59 = phi i64 [ %.pre340.i, %__barray_mask_borrow.exit.4.i ], [ %55, %cond_171_case_1.4.i ], !dbg !10 + %60 = and i64 %59, 32, !dbg !10 + %.not348.i = icmp eq i64 %60, 0, !dbg !10 + br i1 %.not348.i, label %__barray_mask_borrow.exit.5.i, label %cond_171_case_1.6.i + +__barray_mask_borrow.exit.5.i: ; preds = %cond_171_case_1.5.i + %61 = or disjoint i64 %59, 32, !dbg !21 + store i64 %61, ptr %1, align 4, !dbg !21 + %62 = load i64, ptr %24, align 4, !dbg !23 + tail call void @___qfree(i64 %62), !dbg !24 + %.pre341.i = load i64, ptr %1, align 4, !dbg !10 + br label %cond_171_case_1.6.i + +cond_171_case_1.6.i: ; preds = %__barray_mask_borrow.exit.5.i, %cond_171_case_1.5.i + %63 = phi i64 [ %.pre341.i, %__barray_mask_borrow.exit.5.i ], [ %59, %cond_171_case_1.5.i ], !dbg !10 + %64 = and i64 %63, 64, !dbg !10 + %.not349.i = icmp eq i64 %64, 0, !dbg !10 + br i1 %.not349.i, label %__barray_mask_borrow.exit.6.i, label %cond_171_case_1.7.i + +__barray_mask_borrow.exit.6.i: ; preds = %cond_171_case_1.6.i + %65 = or disjoint i64 %63, 64, !dbg !21 + store i64 %65, ptr %1, align 4, !dbg !21 + %66 = load i64, ptr %28, align 4, !dbg !23 + tail call void @___qfree(i64 %66), !dbg !24 + %.pre342.i = load i64, ptr %1, align 4, !dbg !10 + br label %cond_171_case_1.7.i + +cond_171_case_1.7.i: ; preds = %__barray_mask_borrow.exit.6.i, %cond_171_case_1.6.i + %67 = phi i64 [ %.pre342.i, %__barray_mask_borrow.exit.6.i ], [ %63, %cond_171_case_1.6.i ], !dbg !10 + %68 = and i64 %67, 128, !dbg !10 + %.not350.i = icmp eq i64 %68, 0, !dbg !10 + br i1 %.not350.i, label %__barray_mask_borrow.exit.7.i, label %cond_171_case_1.8.i + +__barray_mask_borrow.exit.7.i: ; preds = %cond_171_case_1.7.i + %69 = or disjoint i64 %67, 128, !dbg !21 + store i64 %69, ptr %1, align 4, !dbg !21 + %70 = load i64, ptr %32, align 4, !dbg !23 + tail call void @___qfree(i64 %70), !dbg !24 + %.pre343.i = load i64, ptr %1, align 4, !dbg !10 + br label %cond_171_case_1.8.i + +cond_171_case_1.8.i: ; preds = %__barray_mask_borrow.exit.7.i, %cond_171_case_1.7.i + %71 = phi i64 [ %.pre343.i, %__barray_mask_borrow.exit.7.i ], [ %67, %cond_171_case_1.7.i ], !dbg !10 + %72 = and i64 %71, 256, !dbg !10 + %.not351.i = icmp eq i64 %72, 0, !dbg !10 + br i1 %.not351.i, label %__barray_mask_borrow.exit.8.i, label %__barray_check_bounds.exit.9.i + +__barray_mask_borrow.exit.8.i: ; preds = %cond_171_case_1.8.i + %73 = or disjoint i64 %71, 256, !dbg !21 + store i64 %73, ptr %1, align 4, !dbg !21 + %74 = load i64, ptr %36, align 4, !dbg !23 + tail call void @___qfree(i64 %74), !dbg !24 + %.pre = load i64, ptr %1, align 4, !dbg !10 + br label %__barray_check_bounds.exit.9.i + +__barray_check_bounds.exit.9.i: ; preds = %__barray_mask_borrow.exit.8.i, %cond_171_case_1.8.i + %75 = phi i64 [ %.pre, %__barray_mask_borrow.exit.8.i ], [ %71, %cond_171_case_1.8.i ], !dbg !10 + %76 = and i64 %75, 512, !dbg !10 + %.not352.i = icmp eq i64 %76, 0, !dbg !10 + br i1 %.not352.i, label %__barray_mask_borrow.exit.9.i, label %cond_exit_156.i + +__barray_mask_borrow.exit.9.i: ; preds = %__barray_check_bounds.exit.9.i + %77 = or disjoint i64 %75, 512, !dbg !21 + store i64 %77, ptr %1, align 4, !dbg !21 + %78 = load i64, ptr %40, align 4, !dbg !23 + tail call void @___qfree(i64 %78), !dbg !24 + %.pre344.i = load i64, ptr %1, align 4, !dbg !25 + br label %cond_exit_156.i + +cond_exit_156.i: ; preds = %__barray_mask_borrow.exit.9.i, %__barray_check_bounds.exit.9.i + %79 = phi i64 [ %.pre344.i, %__barray_mask_borrow.exit.9.i ], [ %75, %__barray_check_bounds.exit.9.i ], !dbg !25 + %80 = or i64 %79, -1024, !dbg !25 + store i64 %80, ptr %1, align 4, !dbg !25 + %81 = icmp eq i64 %80, -1, !dbg !25 + br i1 %81, label %"__hugr__.guppylang.std.quantum.discard_array$10.113.exit", label %mask_block_err.i.i, !dbg !25 + +mask_block_err.i.i: ; preds = %cond_exit_156.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0"), !dbg !25 + unreachable, !dbg !25 + +__barray_mask_borrow.exit.i: ; preds = %cond_exit_20.9 + %82 = or disjoint i64 %41, 1, !dbg !21 + store i64 %82, ptr %1, align 4, !dbg !21 + %83 = load i64, ptr %0, align 4, !dbg !23 + tail call void @___qfree(i64 %83), !dbg !24 + %.pre.i = load i64, ptr %1, align 4, !dbg !10 + br label %cond_171_case_1.1.i + +"__hugr__.guppylang.std.quantum.discard_array$10.113.exit": ; preds = %cond_exit_156.i + tail call void @heap_free(ptr nonnull %0), !dbg !27 + tail call void @heap_free(ptr nonnull %1), !dbg !27 + ret void +} + declare ptr @heap_alloc(i64) local_unnamed_addr ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #0 -declare void @___qfree(i64) local_unnamed_addr - declare void @heap_free(ptr) local_unnamed_addr +declare void @___qfree(i64) local_unnamed_addr + declare i64 @___qalloc() local_unnamed_addr declare void @___reset(i64) local_unnamed_addr -define i64 @qmain(i64 %0) local_unnamed_addr { +define i64 @qmain(i64 %0) local_unnamed_addr !dbg !28 { entry: - tail call void @setup(i64 %0) - %1 = tail call ptr @heap_alloc(i64 80) - %2 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %2, align 1 - %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.not.i.i, label %cond_213_case_0.i.i, label %__hugr__.__tk2_qalloc.218.exit.i - -cond_213_case_0.i.i: ; preds = %cond_exit_20.8.i, %cond_exit_20.7.i, %cond_exit_20.6.i, %cond_exit_20.5.i, %cond_exit_20.4.i, %cond_exit_20.3.i, %cond_exit_20.2.i, %cond_exit_20.1.i, %cond_exit_20.i, %entry - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_qalloc.218.exit.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - %3 = load i64, ptr %2, align 4 - %4 = trunc i64 %3 to i1 - br i1 %4, label %cond_exit_20.i, label %panic.i.i - -panic.i.i: ; preds = %__barray_check_bounds.exit.9.i, %__hugr__.__tk2_qalloc.218.exit.8.i, %__hugr__.__tk2_qalloc.218.exit.7.i, %__hugr__.__tk2_qalloc.218.exit.6.i, %__hugr__.__tk2_qalloc.218.exit.5.i, %__hugr__.__tk2_qalloc.218.exit.4.i, %__hugr__.__tk2_qalloc.218.exit.3.i, %__hugr__.__tk2_qalloc.218.exit.2.i, %__hugr__.__tk2_qalloc.218.exit.1.i, %__hugr__.__tk2_qalloc.218.exit.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_exit_20.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.i - %5 = and i64 %3, -2 - store i64 %5, ptr %2, align 4 - store i64 %qalloc.i.i, ptr %1, align 4 - %qalloc.i.1.i = tail call i64 @___qalloc() - %not_max.not.not.i.1.i = icmp eq i64 %qalloc.i.1.i, -1 - br i1 %not_max.not.not.i.1.i, label %cond_213_case_0.i.i, label %__hugr__.__tk2_qalloc.218.exit.1.i - -__hugr__.__tk2_qalloc.218.exit.1.i: ; preds = %cond_exit_20.i - tail call void @___reset(i64 %qalloc.i.1.i) - %6 = load i64, ptr %2, align 4 - %7 = and i64 %6, 2 - %.not.i = icmp eq i64 %7, 0 - br i1 %.not.i, label %panic.i.i, label %cond_exit_20.1.i - -cond_exit_20.1.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.1.i - %8 = and i64 %6, -3 - store i64 %8, ptr %2, align 4 - %9 = getelementptr inbounds nuw i8, ptr %1, i64 8 - store i64 %qalloc.i.1.i, ptr %9, align 4 - %qalloc.i.2.i = tail call i64 @___qalloc() - %not_max.not.not.i.2.i = icmp eq i64 %qalloc.i.2.i, -1 - br i1 %not_max.not.not.i.2.i, label %cond_213_case_0.i.i, label %__hugr__.__tk2_qalloc.218.exit.2.i - -__hugr__.__tk2_qalloc.218.exit.2.i: ; preds = %cond_exit_20.1.i - tail call void @___reset(i64 %qalloc.i.2.i) - %10 = load i64, ptr %2, align 4 - %11 = and i64 %10, 4 - %.not106.i = icmp eq i64 %11, 0 - br i1 %.not106.i, label %panic.i.i, label %cond_exit_20.2.i - -cond_exit_20.2.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.2.i - %12 = and i64 %10, -5 - store i64 %12, ptr %2, align 4 - %13 = getelementptr inbounds nuw i8, ptr %1, i64 16 - store i64 %qalloc.i.2.i, ptr %13, align 4 - %qalloc.i.3.i = tail call i64 @___qalloc() - %not_max.not.not.i.3.i = icmp eq i64 %qalloc.i.3.i, -1 - br i1 %not_max.not.not.i.3.i, label %cond_213_case_0.i.i, label %__hugr__.__tk2_qalloc.218.exit.3.i - -__hugr__.__tk2_qalloc.218.exit.3.i: ; preds = %cond_exit_20.2.i - tail call void @___reset(i64 %qalloc.i.3.i) - %14 = load i64, ptr %2, align 4 - %15 = and i64 %14, 8 - %.not107.i = icmp eq i64 %15, 0 - br i1 %.not107.i, label %panic.i.i, label %cond_exit_20.3.i - -cond_exit_20.3.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.3.i - %16 = and i64 %14, -9 - store i64 %16, ptr %2, align 4 - %17 = getelementptr inbounds nuw i8, ptr %1, i64 24 - store i64 %qalloc.i.3.i, ptr %17, align 4 - %qalloc.i.4.i = tail call i64 @___qalloc() - %not_max.not.not.i.4.i = icmp eq i64 %qalloc.i.4.i, -1 - br i1 %not_max.not.not.i.4.i, label %cond_213_case_0.i.i, label %__hugr__.__tk2_qalloc.218.exit.4.i - -__hugr__.__tk2_qalloc.218.exit.4.i: ; preds = %cond_exit_20.3.i - tail call void @___reset(i64 %qalloc.i.4.i) - %18 = load i64, ptr %2, align 4 - %19 = and i64 %18, 16 - %.not108.i = icmp eq i64 %19, 0 - br i1 %.not108.i, label %panic.i.i, label %cond_exit_20.4.i - -cond_exit_20.4.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.4.i - %20 = and i64 %18, -17 - store i64 %20, ptr %2, align 4 - %21 = getelementptr inbounds nuw i8, ptr %1, i64 32 - store i64 %qalloc.i.4.i, ptr %21, align 4 - %qalloc.i.5.i = tail call i64 @___qalloc() - %not_max.not.not.i.5.i = icmp eq i64 %qalloc.i.5.i, -1 - br i1 %not_max.not.not.i.5.i, label %cond_213_case_0.i.i, label %__hugr__.__tk2_qalloc.218.exit.5.i - -__hugr__.__tk2_qalloc.218.exit.5.i: ; preds = %cond_exit_20.4.i - tail call void @___reset(i64 %qalloc.i.5.i) - %22 = load i64, ptr %2, align 4 - %23 = and i64 %22, 32 - %.not109.i = icmp eq i64 %23, 0 - br i1 %.not109.i, label %panic.i.i, label %cond_exit_20.5.i - -cond_exit_20.5.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.5.i - %24 = and i64 %22, -33 - store i64 %24, ptr %2, align 4 - %25 = getelementptr inbounds nuw i8, ptr %1, i64 40 - store i64 %qalloc.i.5.i, ptr %25, align 4 - %qalloc.i.6.i = tail call i64 @___qalloc() - %not_max.not.not.i.6.i = icmp eq i64 %qalloc.i.6.i, -1 - br i1 %not_max.not.not.i.6.i, label %cond_213_case_0.i.i, label %__hugr__.__tk2_qalloc.218.exit.6.i - -__hugr__.__tk2_qalloc.218.exit.6.i: ; preds = %cond_exit_20.5.i - tail call void @___reset(i64 %qalloc.i.6.i) - %26 = load i64, ptr %2, align 4 - %27 = and i64 %26, 64 - %.not110.i = icmp eq i64 %27, 0 - br i1 %.not110.i, label %panic.i.i, label %cond_exit_20.6.i - -cond_exit_20.6.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.6.i - %28 = and i64 %26, -65 - store i64 %28, ptr %2, align 4 - %29 = getelementptr inbounds nuw i8, ptr %1, i64 48 - store i64 %qalloc.i.6.i, ptr %29, align 4 - %qalloc.i.7.i = tail call i64 @___qalloc() - %not_max.not.not.i.7.i = icmp eq i64 %qalloc.i.7.i, -1 - br i1 %not_max.not.not.i.7.i, label %cond_213_case_0.i.i, label %__hugr__.__tk2_qalloc.218.exit.7.i - -__hugr__.__tk2_qalloc.218.exit.7.i: ; preds = %cond_exit_20.6.i - tail call void @___reset(i64 %qalloc.i.7.i) - %30 = load i64, ptr %2, align 4 - %31 = and i64 %30, 128 - %.not111.i = icmp eq i64 %31, 0 - br i1 %.not111.i, label %panic.i.i, label %cond_exit_20.7.i - -cond_exit_20.7.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.7.i - %32 = and i64 %30, -129 - store i64 %32, ptr %2, align 4 - %33 = getelementptr inbounds nuw i8, ptr %1, i64 56 - store i64 %qalloc.i.7.i, ptr %33, align 4 - %qalloc.i.8.i = tail call i64 @___qalloc() - %not_max.not.not.i.8.i = icmp eq i64 %qalloc.i.8.i, -1 - br i1 %not_max.not.not.i.8.i, label %cond_213_case_0.i.i, label %__hugr__.__tk2_qalloc.218.exit.8.i - -__hugr__.__tk2_qalloc.218.exit.8.i: ; preds = %cond_exit_20.7.i - tail call void @___reset(i64 %qalloc.i.8.i) - %34 = load i64, ptr %2, align 4 - %35 = and i64 %34, 256 - %.not112.i = icmp eq i64 %35, 0 - br i1 %.not112.i, label %panic.i.i, label %cond_exit_20.8.i - -cond_exit_20.8.i: ; preds = %__hugr__.__tk2_qalloc.218.exit.8.i - %36 = and i64 %34, -257 - store i64 %36, ptr %2, align 4 - %37 = getelementptr inbounds nuw i8, ptr %1, i64 64 - store i64 %qalloc.i.8.i, ptr %37, align 4 - %qalloc.i.9.i = tail call i64 @___qalloc() - %not_max.not.not.i.9.i = icmp eq i64 %qalloc.i.9.i, -1 - br i1 %not_max.not.not.i.9.i, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.9.i - -__barray_check_bounds.exit.9.i: ; preds = %cond_exit_20.8.i - tail call void @___reset(i64 %qalloc.i.9.i) - %38 = load i64, ptr %2, align 4 - %39 = and i64 %38, 512 - %.not113.i = icmp eq i64 %39, 0 - br i1 %.not113.i, label %panic.i.i, label %cond_exit_20.9.i - -cond_exit_20.9.i: ; preds = %__barray_check_bounds.exit.9.i - %40 = and i64 %38, -513 - store i64 %40, ptr %2, align 4 - %41 = getelementptr inbounds nuw i8, ptr %1, i64 72 - store i64 %qalloc.i.9.i, ptr %41, align 4 - %"116.fca.0.insert.i" = insertvalue { ptr, ptr, i64 } poison, ptr %1, 0 - %"116.fca.1.insert.i" = insertvalue { ptr, ptr, i64 } %"116.fca.0.insert.i", ptr %2, 1 - %"116.fca.2.insert.i" = insertvalue { ptr, ptr, i64 } %"116.fca.1.insert.i", i64 0, 2 - %42 = insertvalue { { ptr, ptr, i64 }, i64 } poison, { ptr, ptr, i64 } %"116.fca.2.insert.i", 0 - br label %__barray_check_bounds.exit.i.i.i - -43: ; preds = %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" - %44 = lshr i64 %.fca.1.0.0.2.extract.i.i.i, 6 - %45 = getelementptr i64, ptr %.fca.1.0.0.1.extract.i.i.i, i64 %44 - %46 = load i64, ptr %45, align 4 - %47 = and i64 %.fca.1.0.0.2.extract.i.i.i, 63 - %48 = sub nuw nsw i64 64, %47 - %49 = lshr i64 -1, %48 - %50 = icmp eq i64 %47, 0 - %51 = select i1 %50, i64 0, i64 %49 - %52 = or i64 %46, %51 - store i64 %52, ptr %45, align 4 - %last_valid.i.i.i.i = add i64 %.fca.1.0.0.2.extract.i.i.i, 9 - %53 = lshr i64 %last_valid.i.i.i.i, 6 - %54 = getelementptr inbounds nuw i64, ptr %.fca.1.0.0.1.extract.i.i.i, i64 %53 - %55 = load i64, ptr %54, align 4 - %56 = and i64 %last_valid.i.i.i.i, 63 - %57 = shl nsw i64 -2, %56 - %58 = icmp eq i64 %56, 63 - %59 = select i1 %58, i64 0, i64 %57 - %60 = or i64 %55, %59 - store i64 %60, ptr %54, align 4 - %reass.sub.i.i.i.i = sub nsw i64 %53, %44 - %.not.i.i.i.i = icmp eq i64 %reass.sub.i.i.i.i, -1 - br i1 %.not.i.i.i.i, label %__hugr__.main.1.exit, label %mask_block_ok.i.i.i.i - -61: ; preds = %mask_block_ok.i.i.i.i - %62 = add nuw i64 %.02.i.i.i.i, 1 - %exitcond.not.i.i.i.i = icmp eq i64 %.02.i.i.i.i, %reass.sub.i.i.i.i - br i1 %exitcond.not.i.i.i.i, label %__hugr__.main.1.exit, label %mask_block_ok.i.i.i.i - -mask_block_ok.i.i.i.i: ; preds = %43, %61 - %.02.i.i.i.i = phi i64 [ %62, %61 ], [ 0, %43 ] - %gep.i.i.i.i = getelementptr i64, ptr %45, i64 %.02.i.i.i.i - %63 = load i64, ptr %gep.i.i.i.i, align 4 - %64 = icmp eq i64 %63, -1 - br i1 %64, label %61, label %mask_block_err.i.i.i.i - -mask_block_err.i.i.i.i: ; preds = %mask_block_ok.i.i.i.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit.i.i.i: ; preds = %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i", %cond_exit_20.9.i - %.fca.2.extract82.i185.i.i = phi i64 [ 0, %cond_exit_20.9.i ], [ %.fca.1.0.0.2.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %.fca.1.extract81.i184.i.i = phi ptr [ %2, %cond_exit_20.9.i ], [ %.fca.1.0.0.1.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %.fca.0.extract80.i183.i.i = phi ptr [ %1, %cond_exit_20.9.i ], [ %.fca.1.0.0.0.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %"294_0.0182.i.i" = phi i64 [ 0, %cond_exit_20.9.i ], [ %72, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %.pn181.i.i = phi { { ptr, ptr, i64 }, i64 } [ %42, %cond_exit_20.9.i ], [ %80, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %65 = add i64 %"294_0.0182.i.i", %.fca.2.extract82.i185.i.i - %66 = lshr i64 %65, 6 - %67 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i184.i.i, i64 %66 - %68 = load i64, ptr %67, align 4 - %69 = and i64 %65, 63 - %70 = lshr i64 %68, %69 - %71 = trunc i64 %70 to i1 - br i1 %71, label %panic.i.i.i.i, label %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" - -panic.i.i.i.i: ; preds = %__barray_check_bounds.exit.i.i.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i": ; preds = %__barray_check_bounds.exit.i.i.i - %72 = add nuw nsw i64 %"294_0.0182.i.i", 1 - %73 = shl nuw i64 1, %69 - %74 = xor i64 %73, %68 - store i64 %74, ptr %67, align 4 - %75 = getelementptr inbounds i64, ptr %.fca.0.extract80.i183.i.i, i64 %65 - %76 = load i64, ptr %75, align 4 - %.fca.1.0.0.0.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 0 - %.fca.1.0.0.1.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 1 - %.fca.1.0.0.2.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 2 - %77 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, i64 %72, 1 - %78 = insertvalue { { ptr, ptr, i64 }, i64 } %77, ptr %.fca.1.0.0.0.extract.i.i.i, 0, 0 - %79 = insertvalue { { ptr, ptr, i64 }, i64 } %78, ptr %.fca.1.0.0.1.extract.i.i.i, 0, 1 - %80 = insertvalue { { ptr, ptr, i64 }, i64 } %79, i64 %.fca.1.0.0.2.extract.i.i.i, 0, 2 - tail call void @___qfree(i64 %76) - %.not.i.i = icmp eq i64 %"294_0.0182.i.i", 9 - br i1 %.not.i.i, label %43, label %__barray_check_bounds.exit.i.i.i - -__hugr__.main.1.exit: ; preds = %61, %43 - tail call void @heap_free(ptr %.fca.1.0.0.0.extract.i.i.i) - tail call void @heap_free(ptr nonnull %.fca.1.0.0.1.extract.i.i.i) - %81 = tail call i64 @teardown() - ret i64 %81 + tail call void @setup(i64 %0), !dbg !32 + tail call void @"__hugr__.__main__.discard_qb_array..main.1"(), !dbg !32 + %1 = tail call i64 @teardown(), !dbg !32 + ret i64 %1, !dbg !32 } declare void @setup(i64) local_unnamed_addr @@ -290,6 +360,40 @@ declare i64 @teardown() local_unnamed_addr attributes #0 = { noreturn } -!name = !{!0} - -!0 = !{!"mainlib"} +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} +!name = !{!3} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v0.32.0)-v0.21.11", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "file:///Users/george.hodgkins/proj/clone-anduril") +!3 = !{!"mainlib"} +!4 = distinct !DISubprogram(name: "discard_qb_array..main", linkageName: "__hugr__.__main__.discard_qb_array..main.1", scope: null, file: !5, line: 92, type: !6, scopeLine: 93, spFlags: DISPFlagDefinition, unit: !1) +!5 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "") +!6 = !DISubroutineType(types: !7) +!7 = !{null} +!8 = !DILocation(line: 93, column: 13, scope: !4) +!9 = !DILocation(line: 93, column: 19, scope: !4) +!10 = !DILocation(line: 390, column: 15, scope: !11, inlinedAt: !19) +!11 = distinct !DISubprogram(name: "std.quantum.discard_array$10", linkageName: "__hugr__.guppylang.std.quantum.discard_array$10.113", scope: null, file: !12, line: 387, type: !13, scopeLine: 389, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!12 = !DIFile(filename: "/Users/george.hodgkins/proj/clone-anduril/.venv/lib/python3.10/site-packages/guppylang/std/quantum/__init__.py", directory: "") +!13 = !DISubroutineType(types: !14) +!14 = !{null, !15} +!15 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ ptr, ptr, i64 }", file: !2, size: 24, align: 8, elements: !16) +!16 = !{!17, !17, !18} +!17 = !DIBasicType(name: "ptr", size: 64, encoding: DW_ATE_address) +!18 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!19 = distinct !DILocation(line: 390, column: 15, scope: !11, inlinedAt: !20) +!20 = distinct !DILocation(line: 94, column: 8, scope: !4) +!21 = !DILocation(line: 391, column: 20, scope: !11, inlinedAt: !22) +!22 = distinct !DILocation(line: 391, column: 20, scope: !11, inlinedAt: !20) +!23 = !DILocation(line: 391, column: 20, scope: !11, inlinedAt: !20) +!24 = !DILocation(line: 391, column: 12, scope: !11, inlinedAt: !20) +!25 = !DILocation(line: 392, column: 4, scope: !11, inlinedAt: !26) +!26 = distinct !DILocation(line: 392, column: 4, scope: !11, inlinedAt: !20) +!27 = !DILocation(line: 392, column: 4, scope: !11, inlinedAt: !20) +!28 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !29, type: !30, spFlags: DISPFlagDefinition, unit: !1) +!29 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") +!30 = !DISubroutineType(types: !31) +!31 = !{!18, !18} +!32 = !DILocation(line: 0, scope: !28) diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-flip_some/flip_some_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-flip_some/flip_some_aarch64-apple-darwin index 938ef7cb9..32e9fd682 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-flip_some/flip_some_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-flip_some/flip_some_aarch64-apple-darwin @@ -9,6 +9,74 @@ target triple = "aarch64-apple-darwin" @res_c3.B223E16D.0 = private constant [13 x i8] c"\0CUSER:BOOL:c3" @"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." +define void @"__hugr__.__main__.flip_some..main.1"() local_unnamed_addr !dbg !4 { +alloca_block: + %qalloc.i = tail call i64 @___qalloc(), !dbg !8 + %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 + br i1 %not_max.not.not.i, label %cond_40_case_0.i, label %__hugr__.__tk2_qalloc.36.exit, !dbg !8 + +cond_40_case_0.i: ; preds = %alloca_block + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + unreachable, !dbg !8 + +__hugr__.__tk2_qalloc.36.exit: ; preds = %alloca_block + tail call void @___reset(i64 %qalloc.i), !dbg !8 + tail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00), !dbg !9 + %qalloc.i101 = tail call i64 @___qalloc(), !dbg !10 + %not_max.not.not.i102 = icmp eq i64 %qalloc.i101, -1, !dbg !10 + br i1 %not_max.not.not.i102, label %cond_54_case_0.i, label %__hugr__.__tk2_qalloc.50.exit, !dbg !10 + +cond_54_case_0.i: ; preds = %__hugr__.__tk2_qalloc.36.exit + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !10 + unreachable, !dbg !10 + +__hugr__.__tk2_qalloc.50.exit: ; preds = %__hugr__.__tk2_qalloc.36.exit + tail call void @___reset(i64 %qalloc.i101), !dbg !10 + %qalloc.i103 = tail call i64 @___qalloc(), !dbg !11 + %not_max.not.not.i104 = icmp eq i64 %qalloc.i103, -1, !dbg !11 + br i1 %not_max.not.not.i104, label %cond_68_case_0.i, label %__hugr__.__tk2_qalloc.64.exit, !dbg !11 + +cond_68_case_0.i: ; preds = %__hugr__.__tk2_qalloc.50.exit + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !11 + unreachable, !dbg !11 + +__hugr__.__tk2_qalloc.64.exit: ; preds = %__hugr__.__tk2_qalloc.50.exit + tail call void @___reset(i64 %qalloc.i103), !dbg !11 + tail call void @___rxy(i64 %qalloc.i103, double 0x400921FB54442D18, double 0.000000e+00), !dbg !12 + %qalloc.i105 = tail call i64 @___qalloc(), !dbg !13 + %not_max.not.not.i106 = icmp eq i64 %qalloc.i105, -1, !dbg !13 + br i1 %not_max.not.not.i106, label %cond_82_case_0.i, label %__hugr__.__tk2_qalloc.78.exit, !dbg !13 + +cond_82_case_0.i: ; preds = %__hugr__.__tk2_qalloc.64.exit + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !13 + unreachable, !dbg !13 + +__hugr__.__tk2_qalloc.78.exit: ; preds = %__hugr__.__tk2_qalloc.64.exit + tail call void @___reset(i64 %qalloc.i105), !dbg !13 + %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) + tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool), !dbg !14 + %lazy_measure22 = tail call i64 @___lazy_measure(i64 %qalloc.i101) + tail call void @___qfree(i64 %qalloc.i101) + %read_bool35 = 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_c1.1F7A6571.0, i64 12, i1 %read_bool35), !dbg !15 + %lazy_measure44 = tail call i64 @___lazy_measure(i64 %qalloc.i103) + tail call void @___qfree(i64 %qalloc.i103) + %read_bool57 = tail call i1 @___read_future_bool(i64 %lazy_measure44) + tail call void @___dec_future_refcount(i64 %lazy_measure44) + tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool57), !dbg !16 + tail call void @___rxy(i64 %qalloc.i105, double 0x400921FB54442D18, double 0.000000e+00), !dbg !17 + %lazy_measure67 = tail call i64 @___lazy_measure(i64 %qalloc.i105) + tail call void @___qfree(i64 %qalloc.i105) + %read_bool80 = tail call i1 @___read_future_bool(i64 %lazy_measure67) + tail call void @___dec_future_refcount(i64 %lazy_measure67) + tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool80), !dbg !18 + ret void +} + declare i64 @___lazy_measure(i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -28,74 +96,12 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @___rxy(i64, double, double) local_unnamed_addr -define i64 @qmain(i64 %0) local_unnamed_addr { +define i64 @qmain(i64 %0) local_unnamed_addr !dbg !19 { entry: - tail call void @setup(i64 %0) - %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.not.i.i, label %cond_40_case_0.i.i, label %__hugr__.__tk2_qalloc.36.exit.i - -cond_40_case_0.i.i: ; preds = %entry - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_qalloc.36.exit.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - tail call void @___rxy(i64 %qalloc.i.i, double 0x400921FB54442D18, double 0.000000e+00) - %qalloc.i101.i = tail call i64 @___qalloc() - %not_max.not.not.i102.i = icmp eq i64 %qalloc.i101.i, -1 - br i1 %not_max.not.not.i102.i, label %cond_54_case_0.i.i, label %__hugr__.__tk2_qalloc.50.exit.i - -cond_54_case_0.i.i: ; preds = %__hugr__.__tk2_qalloc.36.exit.i - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_qalloc.50.exit.i: ; preds = %__hugr__.__tk2_qalloc.36.exit.i - tail call void @___reset(i64 %qalloc.i101.i) - %qalloc.i103.i = tail call i64 @___qalloc() - %not_max.not.not.i104.i = icmp eq i64 %qalloc.i103.i, -1 - br i1 %not_max.not.not.i104.i, label %cond_68_case_0.i.i, label %__hugr__.__tk2_qalloc.64.exit.i - -cond_68_case_0.i.i: ; preds = %__hugr__.__tk2_qalloc.50.exit.i - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_qalloc.64.exit.i: ; preds = %__hugr__.__tk2_qalloc.50.exit.i - tail call void @___reset(i64 %qalloc.i103.i) - tail call void @___rxy(i64 %qalloc.i103.i, double 0x400921FB54442D18, double 0.000000e+00) - %qalloc.i105.i = tail call i64 @___qalloc() - %not_max.not.not.i106.i = icmp eq i64 %qalloc.i105.i, -1 - br i1 %not_max.not.not.i106.i, label %cond_82_case_0.i.i, label %__hugr__.main.1.exit - -cond_82_case_0.i.i: ; preds = %__hugr__.__tk2_qalloc.64.exit.i - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.main.1.exit: ; preds = %__hugr__.__tk2_qalloc.64.exit.i - tail call void @___reset(i64 %qalloc.i105.i) - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i.i) - tail call void @___qfree(i64 %qalloc.i.i) - %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) - tail call void @___dec_future_refcount(i64 %lazy_measure.i) - tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool.i) - %lazy_measure22.i = tail call i64 @___lazy_measure(i64 %qalloc.i101.i) - tail call void @___qfree(i64 %qalloc.i101.i) - %read_bool35.i = tail call i1 @___read_future_bool(i64 %lazy_measure22.i) - tail call void @___dec_future_refcount(i64 %lazy_measure22.i) - tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool35.i) - %lazy_measure44.i = tail call i64 @___lazy_measure(i64 %qalloc.i103.i) - tail call void @___qfree(i64 %qalloc.i103.i) - %read_bool57.i = tail call i1 @___read_future_bool(i64 %lazy_measure44.i) - tail call void @___dec_future_refcount(i64 %lazy_measure44.i) - tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool57.i) - tail call void @___rxy(i64 %qalloc.i105.i, double 0x400921FB54442D18, double 0.000000e+00) - %lazy_measure67.i = tail call i64 @___lazy_measure(i64 %qalloc.i105.i) - tail call void @___qfree(i64 %qalloc.i105.i) - %read_bool80.i = tail call i1 @___read_future_bool(i64 %lazy_measure67.i) - tail call void @___dec_future_refcount(i64 %lazy_measure67.i) - tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool80.i) - %1 = tail call i64 @teardown() - ret i64 %1 + tail call void @setup(i64 %0), !dbg !24 + tail call void @"__hugr__.__main__.flip_some..main.1"(), !dbg !24 + %1 = tail call i64 @teardown(), !dbg !24 + ret i64 %1, !dbg !24 } declare void @setup(i64) local_unnamed_addr @@ -104,6 +110,32 @@ declare i64 @teardown() local_unnamed_addr attributes #0 = { noreturn } -!name = !{!0} - -!0 = !{!"mainlib"} +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} +!name = !{!3} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v0.32.0)-v0.21.11", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "file:///Users/george.hodgkins/proj/clone-anduril") +!3 = !{!"mainlib"} +!4 = distinct !DISubprogram(name: "flip_some..main", linkageName: "__hugr__.__main__.flip_some..main.1", scope: null, file: !5, line: 74, type: !6, scopeLine: 75, spFlags: DISPFlagDefinition, unit: !1) +!5 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "") +!6 = !DISubroutineType(types: !7) +!7 = !{null} +!8 = !DILocation(line: 75, column: 20, scope: !4) +!9 = !DILocation(line: 79, column: 8, scope: !4) +!10 = !DILocation(line: 76, column: 20, scope: !4) +!11 = !DILocation(line: 77, column: 20, scope: !4) +!12 = !DILocation(line: 80, column: 8, scope: !4) +!13 = !DILocation(line: 78, column: 20, scope: !4) +!14 = !DILocation(line: 82, column: 8, scope: !4) +!15 = !DILocation(line: 83, column: 8, scope: !4) +!16 = !DILocation(line: 84, column: 8, scope: !4) +!17 = !DILocation(line: 81, column: 8, scope: !4) +!18 = !DILocation(line: 85, column: 8, scope: !4) +!19 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !20, type: !21, spFlags: DISPFlagDefinition, unit: !1) +!20 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") +!21 = !DISubroutineType(types: !22) +!22 = !{!23, !23} +!23 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!24 = !DILocation(line: 0, scope: !19) diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-measure_qb_array/measure_qb_array_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-measure_qb_array/measure_qb_array_aarch64-apple-darwin index 2d34acc98..d53e7915c 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-measure_qb_array/measure_qb_array_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-measure_qb_array/measure_qb_array_aarch64-apple-darwin @@ -8,6 +8,434 @@ target triple = "aarch64-apple-darwin" @"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" @"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." +define void @"__hugr__.__main__.measure_qb_array..main.1"() local_unnamed_addr !dbg !4 { +alloca_block: + %0 = tail call ptr @heap_alloc(i64 80), !dbg !8 + %1 = tail call ptr @heap_alloc(i64 8), !dbg !8 + store i64 -1, ptr %1, align 1, !dbg !8 + %qalloc.i = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !9 + br i1 %not_max.not.not.i, label %cond_299_case_0.i, label %__hugr__.__tk2_qalloc.295.exit, !dbg !9 + +cond_299_case_0.i: ; preds = %cond_exit_20.8, %cond_exit_20.7, %cond_exit_20.6, %cond_exit_20.5, %cond_exit_20.4, %cond_exit_20.3, %cond_exit_20.2, %cond_exit_20.1, %cond_exit_20, %alloca_block + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 + unreachable, !dbg !9 + +__hugr__.__tk2_qalloc.295.exit: ; preds = %alloca_block + tail call void @___reset(i64 %qalloc.i), !dbg !9 + %2 = load i64, ptr %1, align 4 + %3 = trunc i64 %2 to i1 + br i1 %3, label %cond_exit_20, label %panic.i + +panic.i: ; preds = %__barray_check_bounds.exit.9, %__hugr__.__tk2_qalloc.295.exit.8, %__hugr__.__tk2_qalloc.295.exit.7, %__hugr__.__tk2_qalloc.295.exit.6, %__hugr__.__tk2_qalloc.295.exit.5, %__hugr__.__tk2_qalloc.295.exit.4, %__hugr__.__tk2_qalloc.295.exit.3, %__hugr__.__tk2_qalloc.295.exit.2, %__hugr__.__tk2_qalloc.295.exit.1, %__hugr__.__tk2_qalloc.295.exit + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") + unreachable + +cond_exit_20: ; preds = %__hugr__.__tk2_qalloc.295.exit + %4 = and i64 %2, -2 + store i64 %4, ptr %1, align 4 + store i64 %qalloc.i, ptr %0, align 4 + %qalloc.i.1 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1, !dbg !9 + br i1 %not_max.not.not.i.1, label %cond_299_case_0.i, label %__hugr__.__tk2_qalloc.295.exit.1, !dbg !9 + +__hugr__.__tk2_qalloc.295.exit.1: ; preds = %cond_exit_20 + tail call void @___reset(i64 %qalloc.i.1), !dbg !9 + %5 = load i64, ptr %1, align 4 + %6 = and i64 %5, 2 + %.not280 = icmp eq i64 %6, 0 + br i1 %.not280, label %panic.i, label %cond_exit_20.1 + +cond_exit_20.1: ; preds = %__hugr__.__tk2_qalloc.295.exit.1 + %7 = and i64 %5, -3 + store i64 %7, ptr %1, align 4 + %8 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %qalloc.i.1, ptr %8, align 4 + %qalloc.i.2 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1, !dbg !9 + br i1 %not_max.not.not.i.2, label %cond_299_case_0.i, label %__hugr__.__tk2_qalloc.295.exit.2, !dbg !9 + +__hugr__.__tk2_qalloc.295.exit.2: ; preds = %cond_exit_20.1 + tail call void @___reset(i64 %qalloc.i.2), !dbg !9 + %9 = load i64, ptr %1, align 4 + %10 = and i64 %9, 4 + %.not281 = icmp eq i64 %10, 0 + br i1 %.not281, label %panic.i, label %cond_exit_20.2 + +cond_exit_20.2: ; preds = %__hugr__.__tk2_qalloc.295.exit.2 + %11 = and i64 %9, -5 + store i64 %11, ptr %1, align 4 + %12 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %qalloc.i.2, ptr %12, align 4 + %qalloc.i.3 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1, !dbg !9 + br i1 %not_max.not.not.i.3, label %cond_299_case_0.i, label %__hugr__.__tk2_qalloc.295.exit.3, !dbg !9 + +__hugr__.__tk2_qalloc.295.exit.3: ; preds = %cond_exit_20.2 + tail call void @___reset(i64 %qalloc.i.3), !dbg !9 + %13 = load i64, ptr %1, align 4 + %14 = and i64 %13, 8 + %.not282 = icmp eq i64 %14, 0 + br i1 %.not282, label %panic.i, label %cond_exit_20.3 + +cond_exit_20.3: ; preds = %__hugr__.__tk2_qalloc.295.exit.3 + %15 = and i64 %13, -9 + store i64 %15, ptr %1, align 4 + %16 = getelementptr inbounds nuw i8, ptr %0, i64 24 + store i64 %qalloc.i.3, ptr %16, align 4 + %qalloc.i.4 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1, !dbg !9 + br i1 %not_max.not.not.i.4, label %cond_299_case_0.i, label %__hugr__.__tk2_qalloc.295.exit.4, !dbg !9 + +__hugr__.__tk2_qalloc.295.exit.4: ; preds = %cond_exit_20.3 + tail call void @___reset(i64 %qalloc.i.4), !dbg !9 + %17 = load i64, ptr %1, align 4 + %18 = and i64 %17, 16 + %.not283 = icmp eq i64 %18, 0 + br i1 %.not283, label %panic.i, label %cond_exit_20.4 + +cond_exit_20.4: ; preds = %__hugr__.__tk2_qalloc.295.exit.4 + %19 = and i64 %17, -17 + store i64 %19, ptr %1, align 4 + %20 = getelementptr inbounds nuw i8, ptr %0, i64 32 + store i64 %qalloc.i.4, ptr %20, align 4 + %qalloc.i.5 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.5 = icmp eq i64 %qalloc.i.5, -1, !dbg !9 + br i1 %not_max.not.not.i.5, label %cond_299_case_0.i, label %__hugr__.__tk2_qalloc.295.exit.5, !dbg !9 + +__hugr__.__tk2_qalloc.295.exit.5: ; preds = %cond_exit_20.4 + tail call void @___reset(i64 %qalloc.i.5), !dbg !9 + %21 = load i64, ptr %1, align 4 + %22 = and i64 %21, 32 + %.not284 = icmp eq i64 %22, 0 + br i1 %.not284, label %panic.i, label %cond_exit_20.5 + +cond_exit_20.5: ; preds = %__hugr__.__tk2_qalloc.295.exit.5 + %23 = and i64 %21, -33 + store i64 %23, ptr %1, align 4 + %24 = getelementptr inbounds nuw i8, ptr %0, i64 40 + store i64 %qalloc.i.5, ptr %24, align 4 + %qalloc.i.6 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.6 = icmp eq i64 %qalloc.i.6, -1, !dbg !9 + br i1 %not_max.not.not.i.6, label %cond_299_case_0.i, label %__hugr__.__tk2_qalloc.295.exit.6, !dbg !9 + +__hugr__.__tk2_qalloc.295.exit.6: ; preds = %cond_exit_20.5 + tail call void @___reset(i64 %qalloc.i.6), !dbg !9 + %25 = load i64, ptr %1, align 4 + %26 = and i64 %25, 64 + %.not285 = icmp eq i64 %26, 0 + br i1 %.not285, label %panic.i, label %cond_exit_20.6 + +cond_exit_20.6: ; preds = %__hugr__.__tk2_qalloc.295.exit.6 + %27 = and i64 %25, -65 + store i64 %27, ptr %1, align 4 + %28 = getelementptr inbounds nuw i8, ptr %0, i64 48 + store i64 %qalloc.i.6, ptr %28, align 4 + %qalloc.i.7 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.7 = icmp eq i64 %qalloc.i.7, -1, !dbg !9 + br i1 %not_max.not.not.i.7, label %cond_299_case_0.i, label %__hugr__.__tk2_qalloc.295.exit.7, !dbg !9 + +__hugr__.__tk2_qalloc.295.exit.7: ; preds = %cond_exit_20.6 + tail call void @___reset(i64 %qalloc.i.7), !dbg !9 + %29 = load i64, ptr %1, align 4 + %30 = and i64 %29, 128 + %.not286 = icmp eq i64 %30, 0 + br i1 %.not286, label %panic.i, label %cond_exit_20.7 + +cond_exit_20.7: ; preds = %__hugr__.__tk2_qalloc.295.exit.7 + %31 = and i64 %29, -129 + store i64 %31, ptr %1, align 4 + %32 = getelementptr inbounds nuw i8, ptr %0, i64 56 + store i64 %qalloc.i.7, ptr %32, align 4 + %qalloc.i.8 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.8 = icmp eq i64 %qalloc.i.8, -1, !dbg !9 + br i1 %not_max.not.not.i.8, label %cond_299_case_0.i, label %__hugr__.__tk2_qalloc.295.exit.8, !dbg !9 + +__hugr__.__tk2_qalloc.295.exit.8: ; preds = %cond_exit_20.7 + tail call void @___reset(i64 %qalloc.i.8), !dbg !9 + %33 = load i64, ptr %1, align 4 + %34 = and i64 %33, 256 + %.not287 = icmp eq i64 %34, 0 + br i1 %.not287, label %panic.i, label %cond_exit_20.8 + +cond_exit_20.8: ; preds = %__hugr__.__tk2_qalloc.295.exit.8 + %35 = and i64 %33, -257 + store i64 %35, ptr %1, align 4 + %36 = getelementptr inbounds nuw i8, ptr %0, i64 64 + store i64 %qalloc.i.8, ptr %36, align 4 + %qalloc.i.9 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.9 = icmp eq i64 %qalloc.i.9, -1, !dbg !9 + br i1 %not_max.not.not.i.9, label %cond_299_case_0.i, label %__barray_check_bounds.exit.9, !dbg !9 + +__barray_check_bounds.exit.9: ; preds = %cond_exit_20.8 + tail call void @___reset(i64 %qalloc.i.9), !dbg !9 + %37 = load i64, ptr %1, align 4 + %38 = and i64 %37, 512 + %.not288 = icmp eq i64 %38, 0 + br i1 %.not288, label %panic.i, label %cond_exit_20.9 + +cond_exit_20.9: ; preds = %__barray_check_bounds.exit.9 + %39 = and i64 %37, -513 + store i64 %39, ptr %1, align 4 + %40 = getelementptr inbounds nuw i8, ptr %0, i64 72 + store i64 %qalloc.i.9, ptr %40, align 4 + %"116.fca.0.insert" = insertvalue { ptr, ptr, i64 } poison, ptr %0, 0 + %"116.fca.1.insert" = insertvalue { ptr, ptr, i64 } %"116.fca.0.insert", ptr %1, 1 + %"116.fca.2.insert" = insertvalue { ptr, ptr, i64 } %"116.fca.1.insert", i64 0, 2 + %41 = load i64, ptr %1, align 4, !dbg !10 + %42 = trunc i64 %41 to i1, !dbg !10 + br i1 %42, label %panic.i238, label %__barray_mask_borrow.exit, !dbg !10 + +panic.i238: ; preds = %cond_exit_20.9 + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !10 + unreachable, !dbg !10 + +__barray_mask_borrow.exit: ; preds = %cond_exit_20.9 + %43 = or disjoint i64 %41, 1, !dbg !10 + store i64 %43, ptr %1, align 4, !dbg !10 + %44 = load i64, ptr %0, align 4, !dbg !12 + tail call void @___rxy(i64 %44, double 0x400921FB54442D18, double 0.000000e+00), !dbg !13 + %45 = load i64, ptr %1, align 4, !dbg !12 + %46 = trunc i64 %45 to i1, !dbg !12 + br i1 %46, label %__barray_mask_return.exit240, label %panic.i239, !dbg !12 + +panic.i239: ; preds = %__barray_mask_borrow.exit + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !12 + unreachable, !dbg !12 + +__barray_mask_return.exit240: ; preds = %__barray_mask_borrow.exit + %47 = and i64 %45, -2, !dbg !12 + store i64 %47, ptr %1, align 4, !dbg !12 + store i64 %44, ptr %0, align 4, !dbg !12 + %48 = load i64, ptr %1, align 4, !dbg !14 + %49 = and i64 %48, 4, !dbg !14 + %.not = icmp eq i64 %49, 0, !dbg !14 + br i1 %.not, label %__barray_mask_borrow.exit242, label %panic.i241, !dbg !14 + +panic.i241: ; preds = %__barray_mask_return.exit240 + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !14 + unreachable, !dbg !14 + +__barray_mask_borrow.exit242: ; preds = %__barray_mask_return.exit240 + %50 = or disjoint i64 %48, 4, !dbg !14 + store i64 %50, ptr %1, align 4, !dbg !14 + %51 = load i64, ptr %12, align 4, !dbg !16 + tail call void @___rxy(i64 %51, double 0x400921FB54442D18, double 0.000000e+00), !dbg !17 + %52 = load i64, ptr %1, align 4, !dbg !16 + %53 = and i64 %52, 4, !dbg !16 + %.not268 = icmp eq i64 %53, 0, !dbg !16 + br i1 %.not268, label %panic.i243, label %__barray_mask_return.exit244, !dbg !16 + +panic.i243: ; preds = %__barray_mask_borrow.exit242 + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !16 + unreachable, !dbg !16 + +__barray_mask_return.exit244: ; preds = %__barray_mask_borrow.exit242 + %54 = and i64 %52, -5, !dbg !16 + store i64 %54, ptr %1, align 4, !dbg !16 + store i64 %51, ptr %12, align 4, !dbg !16 + %55 = load i64, ptr %1, align 4, !dbg !18 + %56 = and i64 %55, 8, !dbg !18 + %.not269 = icmp eq i64 %56, 0, !dbg !18 + br i1 %.not269, label %__barray_mask_borrow.exit246, label %panic.i245, !dbg !18 + +panic.i245: ; preds = %__barray_mask_return.exit244 + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !18 + unreachable, !dbg !18 + +__barray_mask_borrow.exit246: ; preds = %__barray_mask_return.exit244 + %57 = or disjoint i64 %55, 8, !dbg !18 + store i64 %57, ptr %1, align 4, !dbg !18 + %58 = load i64, ptr %16, align 4, !dbg !20 + tail call void @___rxy(i64 %58, double 0x400921FB54442D18, double 0.000000e+00), !dbg !21 + %59 = load i64, ptr %1, align 4, !dbg !20 + %60 = and i64 %59, 8, !dbg !20 + %.not270 = icmp eq i64 %60, 0, !dbg !20 + br i1 %.not270, label %panic.i247, label %__barray_mask_return.exit248, !dbg !20 + +panic.i247: ; preds = %__barray_mask_borrow.exit246 + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !20 + unreachable, !dbg !20 + +__barray_mask_return.exit248: ; preds = %__barray_mask_borrow.exit246 + %61 = and i64 %59, -9, !dbg !20 + store i64 %61, ptr %1, align 4, !dbg !20 + store i64 %58, ptr %16, align 4, !dbg !20 + %62 = load i64, ptr %1, align 4, !dbg !22 + %63 = and i64 %62, 512, !dbg !22 + %.not271 = icmp eq i64 %63, 0, !dbg !22 + br i1 %.not271, label %__barray_mask_borrow.exit250, label %panic.i249, !dbg !22 + +panic.i249: ; preds = %__barray_mask_return.exit248 + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !22 + unreachable, !dbg !22 + +__barray_mask_borrow.exit250: ; preds = %__barray_mask_return.exit248 + %64 = or disjoint i64 %62, 512, !dbg !22 + store i64 %64, ptr %1, align 4, !dbg !22 + %65 = load i64, ptr %40, align 4, !dbg !24 + tail call void @___rxy(i64 %65, double 0x400921FB54442D18, double 0.000000e+00), !dbg !25 + %66 = load i64, ptr %1, align 4, !dbg !24 + %67 = and i64 %66, 512, !dbg !24 + %.not272 = icmp eq i64 %67, 0, !dbg !24 + br i1 %.not272, label %panic.i251, label %__barray_mask_return.exit252, !dbg !24 + +panic.i251: ; preds = %__barray_mask_borrow.exit250 + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !24 + unreachable, !dbg !24 + +__barray_mask_return.exit252: ; preds = %__barray_mask_borrow.exit250 + %68 = and i64 %66, -513, !dbg !24 + store i64 %68, ptr %1, align 4, !dbg !24 + store i64 %65, ptr %40, align 4, !dbg !24 + %69 = insertvalue { { ptr, ptr, i64 }, i64 } poison, { ptr, ptr, i64 } %"116.fca.2.insert", 0, !dbg !26 + %70 = tail call ptr @heap_alloc(i64 240), !dbg !43 + %71 = tail call ptr @heap_alloc(i64 8), !dbg !43 + store i64 -1, ptr %71, align 1, !dbg !43 + br label %__barray_check_bounds.exit.i.i + +72: ; preds = %loop_body.i + %73 = lshr i64 %.fca.2.extract82.i.i, 6, !dbg !44 + %74 = getelementptr i64, ptr %.fca.1.extract81.i.i, i64 %73, !dbg !44 + %75 = load i64, ptr %74, align 4, !dbg !44 + %76 = and i64 %.fca.2.extract82.i.i, 63, !dbg !44 + %77 = sub nuw nsw i64 64, %76, !dbg !44 + %78 = lshr i64 -1, %77, !dbg !44 + %79 = icmp eq i64 %76, 0, !dbg !44 + %80 = select i1 %79, i64 0, i64 %78, !dbg !44 + %81 = or i64 %75, %80, !dbg !44 + store i64 %81, ptr %74, align 4, !dbg !44 + %last_valid.i.i.i = add i64 %.fca.2.extract82.i.i, 9, !dbg !44 + %82 = lshr i64 %last_valid.i.i.i, 6, !dbg !44 + %83 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i.i, i64 %82, !dbg !44 + %84 = load i64, ptr %83, align 4, !dbg !44 + %85 = and i64 %last_valid.i.i.i, 63, !dbg !44 + %86 = shl nsw i64 -2, %85, !dbg !44 + %87 = icmp eq i64 %85, 63, !dbg !44 + %88 = select i1 %87, i64 0, i64 %86, !dbg !44 + %89 = or i64 %84, %88, !dbg !44 + store i64 %89, ptr %83, align 4, !dbg !44 + %reass.sub.i.i.i = sub nsw i64 %82, %73, !dbg !44 + %.not.i.i.i = icmp eq i64 %reass.sub.i.i.i, -1, !dbg !44 + br i1 %.not.i.i.i, label %"__hugr__.guppylang.std.quantum.measure_array$10.149.exit", label %mask_block_ok.i.i.i, !dbg !44 + +90: ; preds = %mask_block_ok.i.i.i + %91 = add nuw i64 %.02.i.i.i, 1, !dbg !44 + %exitcond.not.i.i.i = icmp eq i64 %.02.i.i.i, %reass.sub.i.i.i, !dbg !44 + br i1 %exitcond.not.i.i.i, label %"__hugr__.guppylang.std.quantum.measure_array$10.149.exit", label %mask_block_ok.i.i.i, !dbg !44 + +mask_block_ok.i.i.i: ; preds = %72, %90 + %.02.i.i.i = phi i64 [ %91, %90 ], [ 0, %72 ], !dbg !44 + %gep.i.i.i = getelementptr i64, ptr %74, i64 %.02.i.i.i, !dbg !44 + %92 = load i64, ptr %gep.i.i.i, align 4, !dbg !44 + %93 = icmp eq i64 %92, -1, !dbg !44 + br i1 %93, label %90, label %mask_block_err.i.i.i, !dbg !44 + +mask_block_err.i.i.i: ; preds = %mask_block_ok.i.i.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0"), !dbg !44 + unreachable, !dbg !44 + +__barray_check_bounds.exit.i.i: ; preds = %loop_body.i, %__barray_mask_return.exit252 + %.fca.2.extract82.i187.i = phi i64 [ 0, %__barray_mask_return.exit252 ], [ %.fca.2.extract82.i.i, %loop_body.i ] + %.fca.1.extract81.i186.i = phi ptr [ %1, %__barray_mask_return.exit252 ], [ %.fca.1.extract81.i.i, %loop_body.i ] + %.fca.0.extract80.i185.i = phi ptr [ %0, %__barray_mask_return.exit252 ], [ %.fca.0.extract80.i.i, %loop_body.i ] + %"163_0.sroa.15.0184.i" = phi i64 [ 0, %__barray_mask_return.exit252 ], [ %94, %loop_body.i ] + %.pn165183.i = phi { { ptr, ptr, i64 }, i64 } [ %69, %__barray_mask_return.exit252 ], [ %109, %loop_body.i ] + %94 = add nuw nsw i64 %"163_0.sroa.15.0184.i", 1, !dbg !54 + %95 = add i64 %"163_0.sroa.15.0184.i", %.fca.2.extract82.i187.i, !dbg !55 + %96 = lshr i64 %95, 6, !dbg !56 + %97 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i186.i, i64 %96, !dbg !56 + %98 = load i64, ptr %97, align 4, !dbg !56 + %99 = and i64 %95, 63, !dbg !56 + %100 = lshr i64 %98, %99, !dbg !56 + %101 = trunc i64 %100 to i1, !dbg !56 + br i1 %101, label %panic.i.i.i, label %__barray_check_bounds.exit.i, !dbg !56 + +panic.i.i.i: ; preds = %__barray_check_bounds.exit.i.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !56 + unreachable, !dbg !56 + +__barray_check_bounds.exit.i: ; preds = %__barray_check_bounds.exit.i.i + %102 = shl nuw i64 1, %99, !dbg !56 + %103 = xor i64 %102, %98, !dbg !56 + store i64 %103, ptr %97, align 4, !dbg !56 + %104 = getelementptr inbounds i64, ptr %.fca.0.extract80.i185.i, i64 %95, !dbg !55 + %105 = load i64, ptr %104, align 4, !dbg !55 + %lazy_measure.i = tail call i64 @___lazy_measure(i64 %105) + tail call void @___qfree(i64 %105) + %106 = load i64, ptr %71, align 4 + %107 = lshr i64 %106, %"163_0.sroa.15.0184.i" + %108 = trunc i64 %107 to i1 + br i1 %108, label %loop_body.i, label %panic.i.i + +panic.i.i: ; preds = %__barray_check_bounds.exit.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") + unreachable + +loop_body.i: ; preds = %__barray_check_bounds.exit.i + %"182_054.fca.1.insert.i" = insertvalue { i1, i64, i1 } { i1 true, i64 poison, i1 undef }, i64 %lazy_measure.i, 1 + %"182_054.fca.2.insert.i" = insertvalue { i1, i64, i1 } %"182_054.fca.1.insert.i", i1 undef, 2 + %109 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn165183.i, i64 %94, 1 + %110 = shl nuw nsw i64 1, %"163_0.sroa.15.0184.i" + %111 = xor i64 %106, %110 + store i64 %111, ptr %71, align 4 + %112 = getelementptr inbounds nuw { i1, i64, i1 }, ptr %70, i64 %"163_0.sroa.15.0184.i" + store { i1, i64, i1 } %"182_054.fca.2.insert.i", ptr %112, align 4 + %113 = extractvalue { { ptr, ptr, i64 }, i64 } %.pn165183.i, 0 + %.fca.0.extract80.i.i = extractvalue { ptr, ptr, i64 } %113, 0 + %.fca.1.extract81.i.i = extractvalue { ptr, ptr, i64 } %113, 1 + %.fca.2.extract82.i.i = extractvalue { ptr, ptr, i64 } %113, 2 + %exitcond.not.i = icmp eq i64 %94, 10, !dbg !58 + br i1 %exitcond.not.i, label %72, label %__barray_check_bounds.exit.i.i + +"__hugr__.guppylang.std.quantum.measure_array$10.149.exit": ; preds = %90, %72 + tail call void @heap_free(ptr %.fca.0.extract80.i.i), !dbg !44 + tail call void @heap_free(ptr nonnull %.fca.1.extract81.i.i), !dbg !44 + br label %__barray_check_bounds.exit255 + +cond_369_case_0: ; preds = %cond_exit_369.thread + %114 = load i64, ptr %71, align 4 + %115 = or i64 %114, -1024 + store i64 %115, ptr %71, align 4 + %116 = icmp eq i64 %115, -1 + br i1 %116, label %cond_exit_369, label %mask_block_err.i + +cond_exit_369: ; preds = %cond_369_case_0 + tail call void @heap_free(ptr %70) + tail call void @heap_free(ptr nonnull %71) + ret void + +mask_block_err.i: ; preds = %cond_369_case_0 + tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") + unreachable + +__barray_check_bounds.exit255: ; preds = %"__hugr__.guppylang.std.quantum.measure_array$10.149.exit", %cond_exit_369.thread + %"366_0.0279" = phi i64 [ 0, %"__hugr__.guppylang.std.quantum.measure_array$10.149.exit" ], [ %117, %cond_exit_369.thread ] + %117 = add nuw nsw i64 %"366_0.0279", 1 + %118 = load i64, ptr %71, align 4 + %119 = lshr i64 %118, %"366_0.0279" + %120 = trunc i64 %119 to i1 + br i1 %120, label %cond_exit_369.thread, label %__barray_mask_borrow.exit259 + +__barray_mask_borrow.exit259: ; preds = %__barray_check_bounds.exit255 + %121 = shl nuw nsw i64 1, %"366_0.0279", !dbg !12 + %122 = xor i64 %118, %121, !dbg !12 + store i64 %122, ptr %71, align 4, !dbg !12 + %123 = getelementptr inbounds nuw { i1, i64, i1 }, ptr %70, i64 %"366_0.0279" + %124 = load { i1, i64, i1 }, ptr %123, align 4 + %.fca.0.extract167 = extractvalue { i1, i64, i1 } %124, 0 + br i1 %.fca.0.extract167, label %cond_392_case_1, label %cond_exit_369.thread + +cond_exit_369.thread: ; preds = %cond_392_case_1, %__barray_mask_borrow.exit259, %__barray_check_bounds.exit255 + %exitcond = icmp eq i64 %117, 10 + br i1 %exitcond, label %cond_369_case_0, label %__barray_check_bounds.exit255 + +cond_392_case_1: ; preds = %__barray_mask_borrow.exit259 + %.fca.1.extract = extractvalue { i1, i64, i1 } %124, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract) + br label %cond_exit_369.thread +} + declare ptr @heap_alloc(i64) local_unnamed_addr ; Function Attrs: noreturn @@ -27,434 +455,12 @@ declare i64 @___qalloc() local_unnamed_addr declare void @___reset(i64) local_unnamed_addr -define i64 @qmain(i64 %0) local_unnamed_addr { +define i64 @qmain(i64 %0) local_unnamed_addr !dbg !59 { entry: - tail call void @setup(i64 %0) - %1 = tail call ptr @heap_alloc(i64 80) - %2 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %2, align 1 - %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.not.i.i, label %cond_207_case_0.i.i, label %__hugr__.__tk2_qalloc.210.exit.i - -cond_207_case_0.i.i: ; preds = %cond_exit_20.8.i, %cond_exit_20.7.i, %cond_exit_20.6.i, %cond_exit_20.5.i, %cond_exit_20.4.i, %cond_exit_20.3.i, %cond_exit_20.2.i, %cond_exit_20.1.i, %cond_exit_20.i, %entry - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_qalloc.210.exit.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - %3 = load i64, ptr %2, align 4 - %4 = trunc i64 %3 to i1 - br i1 %4, label %cond_exit_20.i, label %panic.i.i - -panic.i.i: ; preds = %__barray_check_bounds.exit.9.i, %__hugr__.__tk2_qalloc.210.exit.8.i, %__hugr__.__tk2_qalloc.210.exit.7.i, %__hugr__.__tk2_qalloc.210.exit.6.i, %__hugr__.__tk2_qalloc.210.exit.5.i, %__hugr__.__tk2_qalloc.210.exit.4.i, %__hugr__.__tk2_qalloc.210.exit.3.i, %__hugr__.__tk2_qalloc.210.exit.2.i, %__hugr__.__tk2_qalloc.210.exit.1.i, %__hugr__.__tk2_qalloc.210.exit.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_exit_20.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.i - %5 = and i64 %3, -2 - store i64 %5, ptr %2, align 4 - store i64 %qalloc.i.i, ptr %1, align 4 - %qalloc.i.1.i = tail call i64 @___qalloc() - %not_max.not.not.i.1.i = icmp eq i64 %qalloc.i.1.i, -1 - br i1 %not_max.not.not.i.1.i, label %cond_207_case_0.i.i, label %__hugr__.__tk2_qalloc.210.exit.1.i - -__hugr__.__tk2_qalloc.210.exit.1.i: ; preds = %cond_exit_20.i - tail call void @___reset(i64 %qalloc.i.1.i) - %6 = load i64, ptr %2, align 4 - %7 = and i64 %6, 2 - %.not280.i = icmp eq i64 %7, 0 - br i1 %.not280.i, label %panic.i.i, label %cond_exit_20.1.i - -cond_exit_20.1.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.1.i - %8 = and i64 %6, -3 - store i64 %8, ptr %2, align 4 - %9 = getelementptr inbounds nuw i8, ptr %1, i64 8 - store i64 %qalloc.i.1.i, ptr %9, align 4 - %qalloc.i.2.i = tail call i64 @___qalloc() - %not_max.not.not.i.2.i = icmp eq i64 %qalloc.i.2.i, -1 - br i1 %not_max.not.not.i.2.i, label %cond_207_case_0.i.i, label %__hugr__.__tk2_qalloc.210.exit.2.i - -__hugr__.__tk2_qalloc.210.exit.2.i: ; preds = %cond_exit_20.1.i - tail call void @___reset(i64 %qalloc.i.2.i) - %10 = load i64, ptr %2, align 4 - %11 = and i64 %10, 4 - %.not281.i = icmp eq i64 %11, 0 - br i1 %.not281.i, label %panic.i.i, label %cond_exit_20.2.i - -cond_exit_20.2.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.2.i - %12 = and i64 %10, -5 - store i64 %12, ptr %2, align 4 - %13 = getelementptr inbounds nuw i8, ptr %1, i64 16 - store i64 %qalloc.i.2.i, ptr %13, align 4 - %qalloc.i.3.i = tail call i64 @___qalloc() - %not_max.not.not.i.3.i = icmp eq i64 %qalloc.i.3.i, -1 - br i1 %not_max.not.not.i.3.i, label %cond_207_case_0.i.i, label %__hugr__.__tk2_qalloc.210.exit.3.i - -__hugr__.__tk2_qalloc.210.exit.3.i: ; preds = %cond_exit_20.2.i - tail call void @___reset(i64 %qalloc.i.3.i) - %14 = load i64, ptr %2, align 4 - %15 = and i64 %14, 8 - %.not282.i = icmp eq i64 %15, 0 - br i1 %.not282.i, label %panic.i.i, label %cond_exit_20.3.i - -cond_exit_20.3.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.3.i - %16 = and i64 %14, -9 - store i64 %16, ptr %2, align 4 - %17 = getelementptr inbounds nuw i8, ptr %1, i64 24 - store i64 %qalloc.i.3.i, ptr %17, align 4 - %qalloc.i.4.i = tail call i64 @___qalloc() - %not_max.not.not.i.4.i = icmp eq i64 %qalloc.i.4.i, -1 - br i1 %not_max.not.not.i.4.i, label %cond_207_case_0.i.i, label %__hugr__.__tk2_qalloc.210.exit.4.i - -__hugr__.__tk2_qalloc.210.exit.4.i: ; preds = %cond_exit_20.3.i - tail call void @___reset(i64 %qalloc.i.4.i) - %18 = load i64, ptr %2, align 4 - %19 = and i64 %18, 16 - %.not283.i = icmp eq i64 %19, 0 - br i1 %.not283.i, label %panic.i.i, label %cond_exit_20.4.i - -cond_exit_20.4.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.4.i - %20 = and i64 %18, -17 - store i64 %20, ptr %2, align 4 - %21 = getelementptr inbounds nuw i8, ptr %1, i64 32 - store i64 %qalloc.i.4.i, ptr %21, align 4 - %qalloc.i.5.i = tail call i64 @___qalloc() - %not_max.not.not.i.5.i = icmp eq i64 %qalloc.i.5.i, -1 - br i1 %not_max.not.not.i.5.i, label %cond_207_case_0.i.i, label %__hugr__.__tk2_qalloc.210.exit.5.i - -__hugr__.__tk2_qalloc.210.exit.5.i: ; preds = %cond_exit_20.4.i - tail call void @___reset(i64 %qalloc.i.5.i) - %22 = load i64, ptr %2, align 4 - %23 = and i64 %22, 32 - %.not284.i = icmp eq i64 %23, 0 - br i1 %.not284.i, label %panic.i.i, label %cond_exit_20.5.i - -cond_exit_20.5.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.5.i - %24 = and i64 %22, -33 - store i64 %24, ptr %2, align 4 - %25 = getelementptr inbounds nuw i8, ptr %1, i64 40 - store i64 %qalloc.i.5.i, ptr %25, align 4 - %qalloc.i.6.i = tail call i64 @___qalloc() - %not_max.not.not.i.6.i = icmp eq i64 %qalloc.i.6.i, -1 - br i1 %not_max.not.not.i.6.i, label %cond_207_case_0.i.i, label %__hugr__.__tk2_qalloc.210.exit.6.i - -__hugr__.__tk2_qalloc.210.exit.6.i: ; preds = %cond_exit_20.5.i - tail call void @___reset(i64 %qalloc.i.6.i) - %26 = load i64, ptr %2, align 4 - %27 = and i64 %26, 64 - %.not285.i = icmp eq i64 %27, 0 - br i1 %.not285.i, label %panic.i.i, label %cond_exit_20.6.i - -cond_exit_20.6.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.6.i - %28 = and i64 %26, -65 - store i64 %28, ptr %2, align 4 - %29 = getelementptr inbounds nuw i8, ptr %1, i64 48 - store i64 %qalloc.i.6.i, ptr %29, align 4 - %qalloc.i.7.i = tail call i64 @___qalloc() - %not_max.not.not.i.7.i = icmp eq i64 %qalloc.i.7.i, -1 - br i1 %not_max.not.not.i.7.i, label %cond_207_case_0.i.i, label %__hugr__.__tk2_qalloc.210.exit.7.i - -__hugr__.__tk2_qalloc.210.exit.7.i: ; preds = %cond_exit_20.6.i - tail call void @___reset(i64 %qalloc.i.7.i) - %30 = load i64, ptr %2, align 4 - %31 = and i64 %30, 128 - %.not286.i = icmp eq i64 %31, 0 - br i1 %.not286.i, label %panic.i.i, label %cond_exit_20.7.i - -cond_exit_20.7.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.7.i - %32 = and i64 %30, -129 - store i64 %32, ptr %2, align 4 - %33 = getelementptr inbounds nuw i8, ptr %1, i64 56 - store i64 %qalloc.i.7.i, ptr %33, align 4 - %qalloc.i.8.i = tail call i64 @___qalloc() - %not_max.not.not.i.8.i = icmp eq i64 %qalloc.i.8.i, -1 - br i1 %not_max.not.not.i.8.i, label %cond_207_case_0.i.i, label %__hugr__.__tk2_qalloc.210.exit.8.i - -__hugr__.__tk2_qalloc.210.exit.8.i: ; preds = %cond_exit_20.7.i - tail call void @___reset(i64 %qalloc.i.8.i) - %34 = load i64, ptr %2, align 4 - %35 = and i64 %34, 256 - %.not287.i = icmp eq i64 %35, 0 - br i1 %.not287.i, label %panic.i.i, label %cond_exit_20.8.i - -cond_exit_20.8.i: ; preds = %__hugr__.__tk2_qalloc.210.exit.8.i - %36 = and i64 %34, -257 - store i64 %36, ptr %2, align 4 - %37 = getelementptr inbounds nuw i8, ptr %1, i64 64 - store i64 %qalloc.i.8.i, ptr %37, align 4 - %qalloc.i.9.i = tail call i64 @___qalloc() - %not_max.not.not.i.9.i = icmp eq i64 %qalloc.i.9.i, -1 - br i1 %not_max.not.not.i.9.i, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.9.i - -__barray_check_bounds.exit.9.i: ; preds = %cond_exit_20.8.i - tail call void @___reset(i64 %qalloc.i.9.i) - %38 = load i64, ptr %2, align 4 - %39 = and i64 %38, 512 - %.not288.i = icmp eq i64 %39, 0 - br i1 %.not288.i, label %panic.i.i, label %cond_exit_20.9.i - -cond_exit_20.9.i: ; preds = %__barray_check_bounds.exit.9.i - %40 = and i64 %38, -513 - store i64 %40, ptr %2, align 4 - %41 = getelementptr inbounds nuw i8, ptr %1, i64 72 - store i64 %qalloc.i.9.i, ptr %41, align 4 - %"116.fca.0.insert.i" = insertvalue { ptr, ptr, i64 } poison, ptr %1, 0 - %"116.fca.1.insert.i" = insertvalue { ptr, ptr, i64 } %"116.fca.0.insert.i", ptr %2, 1 - %"116.fca.2.insert.i" = insertvalue { ptr, ptr, i64 } %"116.fca.1.insert.i", i64 0, 2 - %42 = load i64, ptr %2, align 4 - %43 = trunc i64 %42 to i1 - br i1 %43, label %panic.i238.i, label %__barray_mask_borrow.exit.i - -panic.i238.i: ; preds = %cond_exit_20.9.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit.i: ; preds = %cond_exit_20.9.i - %44 = or disjoint i64 %42, 1 - store i64 %44, ptr %2, align 4 - %45 = load i64, ptr %1, align 4 - tail call void @___rxy(i64 %45, double 0x400921FB54442D18, double 0.000000e+00) - %46 = load i64, ptr %2, align 4 - %47 = trunc i64 %46 to i1 - br i1 %47, label %__barray_mask_return.exit240.i, label %panic.i239.i - -panic.i239.i: ; preds = %__barray_mask_borrow.exit.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit240.i: ; preds = %__barray_mask_borrow.exit.i - %48 = and i64 %46, -2 - store i64 %48, ptr %2, align 4 - store i64 %45, ptr %1, align 4 - %49 = load i64, ptr %2, align 4 - %50 = and i64 %49, 4 - %.not.i = icmp eq i64 %50, 0 - br i1 %.not.i, label %__barray_mask_borrow.exit242.i, label %panic.i241.i - -panic.i241.i: ; preds = %__barray_mask_return.exit240.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit242.i: ; preds = %__barray_mask_return.exit240.i - %51 = or disjoint i64 %49, 4 - store i64 %51, ptr %2, align 4 - %52 = load i64, ptr %13, align 4 - tail call void @___rxy(i64 %52, double 0x400921FB54442D18, double 0.000000e+00) - %53 = load i64, ptr %2, align 4 - %54 = and i64 %53, 4 - %.not268.i = icmp eq i64 %54, 0 - br i1 %.not268.i, label %panic.i243.i, label %__barray_mask_return.exit244.i - -panic.i243.i: ; preds = %__barray_mask_borrow.exit242.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit244.i: ; preds = %__barray_mask_borrow.exit242.i - %55 = and i64 %53, -5 - store i64 %55, ptr %2, align 4 - store i64 %52, ptr %13, align 4 - %56 = load i64, ptr %2, align 4 - %57 = and i64 %56, 8 - %.not269.i = icmp eq i64 %57, 0 - br i1 %.not269.i, label %__barray_mask_borrow.exit246.i, label %panic.i245.i - -panic.i245.i: ; preds = %__barray_mask_return.exit244.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit246.i: ; preds = %__barray_mask_return.exit244.i - %58 = or disjoint i64 %56, 8 - store i64 %58, ptr %2, align 4 - %59 = load i64, ptr %17, align 4 - tail call void @___rxy(i64 %59, double 0x400921FB54442D18, double 0.000000e+00) - %60 = load i64, ptr %2, align 4 - %61 = and i64 %60, 8 - %.not270.i = icmp eq i64 %61, 0 - br i1 %.not270.i, label %panic.i247.i, label %__barray_mask_return.exit248.i - -panic.i247.i: ; preds = %__barray_mask_borrow.exit246.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit248.i: ; preds = %__barray_mask_borrow.exit246.i - %62 = and i64 %60, -9 - store i64 %62, ptr %2, align 4 - store i64 %59, ptr %17, align 4 - %63 = load i64, ptr %2, align 4 - %64 = and i64 %63, 512 - %.not271.i = icmp eq i64 %64, 0 - br i1 %.not271.i, label %__barray_mask_borrow.exit250.i, label %panic.i249.i - -panic.i249.i: ; preds = %__barray_mask_return.exit248.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit250.i: ; preds = %__barray_mask_return.exit248.i - %65 = or disjoint i64 %63, 512 - store i64 %65, ptr %2, align 4 - %66 = load i64, ptr %41, align 4 - tail call void @___rxy(i64 %66, double 0x400921FB54442D18, double 0.000000e+00) - %67 = load i64, ptr %2, align 4 - %68 = and i64 %67, 512 - %.not272.i = icmp eq i64 %68, 0 - br i1 %.not272.i, label %panic.i251.i, label %__barray_mask_return.exit252.i - -panic.i251.i: ; preds = %__barray_mask_borrow.exit250.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit252.i: ; preds = %__barray_mask_borrow.exit250.i - %69 = and i64 %67, -513 - store i64 %69, ptr %2, align 4 - store i64 %66, ptr %41, align 4 - %70 = insertvalue { { ptr, ptr, i64 }, i64 } poison, { ptr, ptr, i64 } %"116.fca.2.insert.i", 0 - %71 = tail call ptr @heap_alloc(i64 240) - %72 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %72, align 1 - br label %__barray_check_bounds.exit.i.i.i - -73: ; preds = %loop_body.i.i - %74 = lshr i64 %.fca.2.extract82.i.i.i, 6 - %75 = getelementptr i64, ptr %.fca.1.extract81.i.i.i, i64 %74 - %76 = load i64, ptr %75, align 4 - %77 = and i64 %.fca.2.extract82.i.i.i, 63 - %78 = sub nuw nsw i64 64, %77 - %79 = lshr i64 -1, %78 - %80 = icmp eq i64 %77, 0 - %81 = select i1 %80, i64 0, i64 %79 - %82 = or i64 %76, %81 - store i64 %82, ptr %75, align 4 - %last_valid.i.i.i.i = add i64 %.fca.2.extract82.i.i.i, 9 - %83 = lshr i64 %last_valid.i.i.i.i, 6 - %84 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i.i.i, i64 %83 - %85 = load i64, ptr %84, align 4 - %86 = and i64 %last_valid.i.i.i.i, 63 - %87 = shl nsw i64 -2, %86 - %88 = icmp eq i64 %86, 63 - %89 = select i1 %88, i64 0, i64 %87 - %90 = or i64 %85, %89 - store i64 %90, ptr %84, align 4 - %reass.sub.i.i.i.i = sub nsw i64 %83, %74 - %.not.i.i.i.i = icmp eq i64 %reass.sub.i.i.i.i, -1 - br i1 %.not.i.i.i.i, label %"__hugr__.$measure_array$$n(10).280.exit.i", label %mask_block_ok.i.i.i.i - -91: ; preds = %mask_block_ok.i.i.i.i - %92 = add nuw i64 %.02.i.i.i.i, 1 - %exitcond.not.i.i.i.i = icmp eq i64 %.02.i.i.i.i, %reass.sub.i.i.i.i - br i1 %exitcond.not.i.i.i.i, label %"__hugr__.$measure_array$$n(10).280.exit.i", label %mask_block_ok.i.i.i.i - -mask_block_ok.i.i.i.i: ; preds = %73, %91 - %.02.i.i.i.i = phi i64 [ %92, %91 ], [ 0, %73 ] - %gep.i.i.i.i = getelementptr i64, ptr %75, i64 %.02.i.i.i.i - %93 = load i64, ptr %gep.i.i.i.i, align 4 - %94 = icmp eq i64 %93, -1 - br i1 %94, label %91, label %mask_block_err.i.i.i.i - -mask_block_err.i.i.i.i: ; preds = %mask_block_ok.i.i.i.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit.i.i.i: ; preds = %loop_body.i.i, %__barray_mask_return.exit252.i - %.fca.2.extract82.i187.i.i = phi i64 [ 0, %__barray_mask_return.exit252.i ], [ %.fca.2.extract82.i.i.i, %loop_body.i.i ] - %.fca.1.extract81.i186.i.i = phi ptr [ %2, %__barray_mask_return.exit252.i ], [ %.fca.1.extract81.i.i.i, %loop_body.i.i ] - %.fca.0.extract80.i185.i.i = phi ptr [ %1, %__barray_mask_return.exit252.i ], [ %.fca.0.extract80.i.i.i, %loop_body.i.i ] - %"306_0.sroa.15.0184.i.i" = phi i64 [ 0, %__barray_mask_return.exit252.i ], [ %95, %loop_body.i.i ] - %.pn165183.i.i = phi { { ptr, ptr, i64 }, i64 } [ %70, %__barray_mask_return.exit252.i ], [ %110, %loop_body.i.i ] - %95 = add nuw nsw i64 %"306_0.sroa.15.0184.i.i", 1 - %96 = add i64 %"306_0.sroa.15.0184.i.i", %.fca.2.extract82.i187.i.i - %97 = lshr i64 %96, 6 - %98 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i186.i.i, i64 %97 - %99 = load i64, ptr %98, align 4 - %100 = and i64 %96, 63 - %101 = lshr i64 %99, %100 - %102 = trunc i64 %101 to i1 - br i1 %102, label %panic.i.i.i.i, label %__barray_check_bounds.exit.i.i - -panic.i.i.i.i: ; preds = %__barray_check_bounds.exit.i.i.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit.i.i: ; preds = %__barray_check_bounds.exit.i.i.i - %103 = shl nuw i64 1, %100 - %104 = xor i64 %103, %99 - store i64 %104, ptr %98, align 4 - %105 = getelementptr inbounds i64, ptr %.fca.0.extract80.i185.i.i, i64 %96 - %106 = load i64, ptr %105, align 4 - %lazy_measure.i.i = tail call i64 @___lazy_measure(i64 %106) - tail call void @___qfree(i64 %106) - %107 = load i64, ptr %72, align 4 - %108 = lshr i64 %107, %"306_0.sroa.15.0184.i.i" - %109 = trunc i64 %108 to i1 - br i1 %109, label %loop_body.i.i, label %panic.i.i.i - -panic.i.i.i: ; preds = %__barray_check_bounds.exit.i.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -loop_body.i.i: ; preds = %__barray_check_bounds.exit.i.i - %"371_054.fca.1.insert.i.i" = insertvalue { i1, i64, i1 } { i1 true, i64 poison, i1 undef }, i64 %lazy_measure.i.i, 1 - %"371_054.fca.2.insert.i.i" = insertvalue { i1, i64, i1 } %"371_054.fca.1.insert.i.i", i1 undef, 2 - %110 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn165183.i.i, i64 %95, 1 - %111 = shl nuw nsw i64 1, %"306_0.sroa.15.0184.i.i" - %112 = xor i64 %107, %111 - store i64 %112, ptr %72, align 4 - %113 = getelementptr inbounds nuw { i1, i64, i1 }, ptr %71, i64 %"306_0.sroa.15.0184.i.i" - store { i1, i64, i1 } %"371_054.fca.2.insert.i.i", ptr %113, align 4 - %114 = extractvalue { { ptr, ptr, i64 }, i64 } %.pn165183.i.i, 0 - %.fca.0.extract80.i.i.i = extractvalue { ptr, ptr, i64 } %114, 0 - %.fca.1.extract81.i.i.i = extractvalue { ptr, ptr, i64 } %114, 1 - %.fca.2.extract82.i.i.i = extractvalue { ptr, ptr, i64 } %114, 2 - %exitcond.not.i.i = icmp eq i64 %95, 10 - br i1 %exitcond.not.i.i, label %73, label %__barray_check_bounds.exit.i.i.i - -"__hugr__.$measure_array$$n(10).280.exit.i": ; preds = %91, %73 - tail call void @heap_free(ptr %.fca.0.extract80.i.i.i) - tail call void @heap_free(ptr nonnull %.fca.1.extract81.i.i.i) - br label %__barray_check_bounds.exit255.i - -cond_89_case_0.i: ; preds = %cond_exit_89.thread.i - %115 = load i64, ptr %72, align 4 - %116 = or i64 %115, -1024 - store i64 %116, ptr %72, align 4 - %117 = icmp eq i64 %116, -1 - br i1 %117, label %__hugr__.main.1.exit, label %mask_block_err.i.i - -mask_block_err.i.i: ; preds = %cond_89_case_0.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit255.i: ; preds = %cond_exit_89.thread.i, %"__hugr__.$measure_array$$n(10).280.exit.i" - %"92_0.0279.i" = phi i64 [ 0, %"__hugr__.$measure_array$$n(10).280.exit.i" ], [ %118, %cond_exit_89.thread.i ] - %118 = add nuw nsw i64 %"92_0.0279.i", 1 - %119 = load i64, ptr %72, align 4 - %120 = lshr i64 %119, %"92_0.0279.i" - %121 = trunc i64 %120 to i1 - br i1 %121, label %cond_exit_89.thread.i, label %__barray_mask_borrow.exit259.i - -__barray_mask_borrow.exit259.i: ; preds = %__barray_check_bounds.exit255.i - %122 = shl nuw nsw i64 1, %"92_0.0279.i" - %123 = xor i64 %119, %122 - store i64 %123, ptr %72, align 4 - %124 = getelementptr inbounds nuw { i1, i64, i1 }, ptr %71, i64 %"92_0.0279.i" - %125 = load { i1, i64, i1 }, ptr %124, align 4 - %.fca.0.extract167.i = extractvalue { i1, i64, i1 } %125, 0 - br i1 %.fca.0.extract167.i, label %cond_392_case_1.i, label %cond_exit_89.thread.i - -cond_exit_89.thread.i: ; preds = %cond_392_case_1.i, %__barray_mask_borrow.exit259.i, %__barray_check_bounds.exit255.i - %exitcond.i = icmp eq i64 %118, 10 - br i1 %exitcond.i, label %cond_89_case_0.i, label %__barray_check_bounds.exit255.i - -cond_392_case_1.i: ; preds = %__barray_mask_borrow.exit259.i - %.fca.1.extract.i = extractvalue { i1, i64, i1 } %125, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.i) - br label %cond_exit_89.thread.i - -__hugr__.main.1.exit: ; preds = %cond_89_case_0.i - tail call void @heap_free(ptr %71) - tail call void @heap_free(ptr nonnull %72) - %126 = tail call i64 @teardown() - ret i64 %126 + tail call void @setup(i64 %0), !dbg !63 + tail call void @"__hugr__.__main__.measure_qb_array..main.1"(), !dbg !63 + %1 = tail call i64 @teardown(), !dbg !63 + ret i64 %1, !dbg !63 } declare void @setup(i64) local_unnamed_addr @@ -463,6 +469,71 @@ declare i64 @teardown() local_unnamed_addr attributes #0 = { noreturn } -!name = !{!0} - -!0 = !{!"mainlib"} +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} +!name = !{!3} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v0.32.0)-v0.21.11", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "file:///Users/george.hodgkins/proj/clone-anduril") +!3 = !{!"mainlib"} +!4 = distinct !DISubprogram(name: "measure_qb_array..main", linkageName: "__hugr__.__main__.measure_qb_array..main.1", scope: null, file: !5, line: 101, type: !6, scopeLine: 102, spFlags: DISPFlagDefinition, unit: !1) +!5 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "") +!6 = !DISubroutineType(types: !7) +!7 = !{null} +!8 = !DILocation(line: 102, column: 13, scope: !4) +!9 = !DILocation(line: 102, column: 19, scope: !4) +!10 = !DILocation(line: 103, column: 10, scope: !4, inlinedAt: !11) +!11 = distinct !DILocation(line: 103, column: 10, scope: !4) +!12 = !DILocation(line: 103, column: 10, scope: !4) +!13 = !DILocation(line: 103, column: 8, scope: !4) +!14 = !DILocation(line: 103, column: 10, scope: !4, inlinedAt: !15) +!15 = distinct !DILocation(line: 104, column: 10, scope: !4) +!16 = !DILocation(line: 104, column: 10, scope: !4) +!17 = !DILocation(line: 104, column: 8, scope: !4) +!18 = !DILocation(line: 103, column: 10, scope: !4, inlinedAt: !19) +!19 = distinct !DILocation(line: 105, column: 10, scope: !4) +!20 = !DILocation(line: 105, column: 10, scope: !4) +!21 = !DILocation(line: 105, column: 8, scope: !4) +!22 = !DILocation(line: 103, column: 10, scope: !4, inlinedAt: !23) +!23 = distinct !DILocation(line: 106, column: 10, scope: !4) +!24 = !DILocation(line: 106, column: 10, scope: !4) +!25 = !DILocation(line: 106, column: 8, scope: !4) +!26 = !DILocation(line: 84, column: 25, scope: !27, inlinedAt: !37) +!27 = distinct !DISubprogram(name: "std.array.array.__iter__$qubit&10", linkageName: "__hugr__.guppylang.std.array.array.__iter__$qubit&10.190", scope: null, file: !28, line: 83, type: !29, scopeLine: 84, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!28 = !DIFile(filename: "/Users/george.hodgkins/proj/clone-anduril/.venv/lib/python3.10/site-packages/guppylang/std/array.py", directory: "") +!29 = !DISubroutineType(types: !30) +!30 = !{!31, !33} +!31 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ { ptr, ptr, i64 }, i64 }", file: !2, size: 32, align: 8, elements: !32) +!32 = !{!33, !36} +!33 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ ptr, ptr, i64 }", file: !2, size: 24, align: 8, elements: !34) +!34 = !{!35, !35, !36} +!35 = !DIBasicType(name: "ptr", size: 64, encoding: DW_ATE_address) +!36 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!37 = distinct !DILocation(line: 382, column: 37, scope: !38, inlinedAt: !42) +!38 = distinct !DISubprogram(name: "std.quantum.measure_array$10", linkageName: "__hugr__.guppylang.std.quantum.measure_array$10.149", scope: null, file: !39, line: 380, type: !40, scopeLine: 382, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!39 = !DIFile(filename: "/Users/george.hodgkins/proj/clone-anduril/.venv/lib/python3.10/site-packages/guppylang/std/quantum/__init__.py", directory: "") +!40 = !DISubroutineType(types: !41) +!41 = !{!33, !33} +!42 = distinct !DILocation(line: 107, column: 8, scope: !4) +!43 = !DILocation(line: 382, column: 11, scope: !38, inlinedAt: !42) +!44 = !DILocation(line: 276, column: 8, scope: !45, inlinedAt: !53) +!45 = distinct !DISubprogram(name: "std.array.ArrayIter.__next__$qubit&10", linkageName: "__hugr__.guppylang.std.array.ArrayIter.__next__$qubit&10.202", scope: null, file: !28, line: 270, type: !46, scopeLine: 273, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!46 = !DISubroutineType(types: !47) +!47 = !{!48, !31} +!48 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i1, { { { ptr, ptr, i64 }, i64 }, i64 } }", file: !2, size: 40, align: 8, elements: !49) +!49 = !{!50, !51} +!50 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) +!51 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ { { ptr, ptr, i64 }, i64 }, i64 }", file: !2, size: 40, align: 8, elements: !52) +!52 = !{!31, !36} +!53 = distinct !DILocation(line: 382, column: 37, scope: !38, inlinedAt: !42) +!54 = !DILocation(line: 275, column: 50, scope: !45, inlinedAt: !53) +!55 = !DILocation(line: 274, column: 19, scope: !45, inlinedAt: !53) +!56 = !DILocation(line: 103, column: 10, scope: !4, inlinedAt: !57) +!57 = distinct !DILocation(line: 274, column: 19, scope: !45, inlinedAt: !53) +!58 = !DILocation(line: 273, column: 11, scope: !45, inlinedAt: !53) +!59 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !60, type: !61, spFlags: DISPFlagDefinition, unit: !1) +!60 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") +!61 = !DISubroutineType(types: !62) +!62 = !{!36, !36} +!63 = !DILocation(line: 0, scope: !59) diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-no_results/no_results_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-no_results/no_results_aarch64-apple-darwin index 50ddd8eca..dd5169a69 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-no_results/no_results_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-no_results/no_results_aarch64-apple-darwin @@ -5,6 +5,26 @@ target triple = "aarch64-apple-darwin" @"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." +define void @"__hugr__.__main__.no_results..bar.1"() local_unnamed_addr !dbg !4 { +alloca_block: + %qalloc.i = tail call i64 @___qalloc(), !dbg !8 + %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 + br i1 %not_max.not.not.i, label %cond_18_case_0.i, label %__hugr__.__tk2_qalloc.14.exit, !dbg !8 + +cond_18_case_0.i: ; preds = %alloca_block + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + unreachable, !dbg !8 + +__hugr__.__tk2_qalloc.14.exit: ; preds = %alloca_block + tail call void @___reset(i64 %qalloc.i), !dbg !8 + tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 + tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 + %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) + ret void +} + declare i64 @___lazy_measure(i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -22,26 +42,12 @@ declare void @___rxy(i64, double, double) local_unnamed_addr declare void @___rz(i64, double) local_unnamed_addr -define i64 @qmain(i64 %0) local_unnamed_addr { +define i64 @qmain(i64 %0) local_unnamed_addr !dbg !10 { entry: - tail call void @setup(i64 %0) - %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.not.i.i, label %cond_18_case_0.i.i, label %__hugr__.bar.1.exit - -cond_18_case_0.i.i: ; preds = %entry - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.bar.1.exit: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - tail call void @___rxy(i64 %qalloc.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i.i, double 0x400921FB54442D18) - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i.i) - tail call void @___qfree(i64 %qalloc.i.i) - tail call void @___dec_future_refcount(i64 %lazy_measure.i) - %1 = tail call i64 @teardown() - ret i64 %1 + tail call void @setup(i64 %0), !dbg !15 + tail call void @"__hugr__.__main__.no_results..bar.1"(), !dbg !15 + %1 = tail call i64 @teardown(), !dbg !15 + ret i64 %1, !dbg !15 } declare void @setup(i64) local_unnamed_addr @@ -50,6 +56,23 @@ declare i64 @teardown() local_unnamed_addr attributes #0 = { noreturn } -!name = !{!0} - -!0 = !{!"mainlib"} +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} +!name = !{!3} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v0.32.0)-v0.21.11", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "file:///Users/george.hodgkins/proj/clone-anduril") +!3 = !{!"mainlib"} +!4 = distinct !DISubprogram(name: "no_results..bar", linkageName: "__hugr__.__main__.no_results..bar.1", scope: null, file: !5, line: 64, type: !6, scopeLine: 65, spFlags: DISPFlagDefinition, unit: !1) +!5 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "") +!6 = !DISubroutineType(types: !7) +!7 = !{null} +!8 = !DILocation(line: 65, column: 20, scope: !4) +!9 = !DILocation(line: 66, column: 8, scope: !4) +!10 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !11, type: !12, spFlags: DISPFlagDefinition, unit: !1) +!11 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") +!12 = !DISubroutineType(types: !13) +!13 = !{!14, !14} +!14 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!15 = !DILocation(line: 0, scope: !10) diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-postselect_exit/postselect_exit_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-postselect_exit/postselect_exit_aarch64-apple-darwin index 531f2c607..7be3d51b8 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-postselect_exit/postselect_exit_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-postselect_exit/postselect_exit_aarch64-apple-darwin @@ -7,6 +7,38 @@ target triple = "aarch64-apple-darwin" @res_c.1C9EF4D1.0 = private constant [12 x i8] c"\0BUSER:BOOL:c" @"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." +define void @"__hugr__.__main__.postselect_exit..main.1"() local_unnamed_addr !dbg !4 { +alloca_block: + %qalloc.i = tail call i64 @___qalloc(), !dbg !8 + %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 + br i1 %not_max.not.not.i, label %cond_45_case_0.i, label %__hugr__.__tk2_qalloc.41.exit, !dbg !8 + +cond_45_case_0.i: ; preds = %alloca_block + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + unreachable, !dbg !8 + +__hugr__.__tk2_qalloc.41.exit: ; preds = %alloca_block + tail call void @___reset(i64 %qalloc.i), !dbg !8 + tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 + tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 + %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + tail call void @___qfree(i64 %qalloc.i) + tail call void @___inc_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 %0, label %cond_98_case_1 + +cond_98_case_1: ; preds = %__hugr__.__tk2_qalloc.41.exit + %read_bool66 = 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_c.1C9EF4D1.0, i64 11, i1 %read_bool66), !dbg !10 + ret void + +0: ; preds = %__hugr__.__tk2_qalloc.41.exit + tail call void @panic(i32 42, ptr nonnull @s_Postselect.13DF1CD0.0), !dbg !11 + unreachable +} + declare i64 @___lazy_measure(i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -30,38 +62,12 @@ declare void @___rxy(i64, double, double) local_unnamed_addr declare void @___rz(i64, double) local_unnamed_addr -define i64 @qmain(i64 %0) local_unnamed_addr { +define i64 @qmain(i64 %0) local_unnamed_addr !dbg !12 { entry: - tail call void @setup(i64 %0) - %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.not.i.i, label %cond_45_case_0.i.i, label %__hugr__.__tk2_qalloc.41.exit.i - -cond_45_case_0.i.i: ; preds = %entry - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_qalloc.41.exit.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - tail call void @___rxy(i64 %qalloc.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i.i, double 0x400921FB54442D18) - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i.i) - tail call void @___qfree(i64 %qalloc.i.i) - tail call void @___inc_future_refcount(i64 %lazy_measure.i) - %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) - tail call void @___dec_future_refcount(i64 %lazy_measure.i) - br i1 %read_bool.i, label %1, label %__hugr__.main.1.exit - -1: ; preds = %__hugr__.__tk2_qalloc.41.exit.i - tail call void @panic(i32 42, ptr nonnull @s_Postselect.13DF1CD0.0) - unreachable - -__hugr__.main.1.exit: ; preds = %__hugr__.__tk2_qalloc.41.exit.i - %read_bool66.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_bool66.i) - %2 = tail call i64 @teardown() - ret i64 %2 + tail call void @setup(i64 %0), !dbg !17 + tail call void @"__hugr__.__main__.postselect_exit..main.1"(), !dbg !17 + %1 = tail call i64 @teardown(), !dbg !17 + ret i64 %1, !dbg !17 } declare void @setup(i64) local_unnamed_addr @@ -70,6 +76,25 @@ declare i64 @teardown() local_unnamed_addr attributes #0 = { noreturn } -!name = !{!0} - -!0 = !{!"mainlib"} +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} +!name = !{!3} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v0.32.0)-v0.21.11", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "file:///Users/george.hodgkins/proj/clone-anduril") +!3 = !{!"mainlib"} +!4 = distinct !DISubprogram(name: "postselect_exit..main", linkageName: "__hugr__.__main__.postselect_exit..main.1", scope: null, file: !5, line: 131, type: !6, scopeLine: 132, spFlags: DISPFlagDefinition, unit: !1) +!5 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "") +!6 = !DISubroutineType(types: !7) +!7 = !{null} +!8 = !DILocation(line: 132, column: 12, scope: !4) +!9 = !DILocation(line: 133, column: 8, scope: !4) +!10 = !DILocation(line: 137, column: 8, scope: !4) +!11 = !DILocation(line: 136, column: 12, scope: !4) +!12 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !13, type: !14, spFlags: DISPFlagDefinition, unit: !1) +!13 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") +!14 = !DISubroutineType(types: !15) +!15 = !{!16, !16} +!16 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!17 = !DILocation(line: 0, scope: !12) diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-postselect_panic/postselect_panic_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-postselect_panic/postselect_panic_aarch64-apple-darwin index fb5d96cd4..9a2bd54b5 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-postselect_panic/postselect_panic_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-postselect_panic/postselect_panic_aarch64-apple-darwin @@ -7,6 +7,38 @@ target triple = "aarch64-apple-darwin" @res_c.1C9EF4D1.0 = private constant [12 x i8] c"\0BUSER:BOOL:c" @"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." +define void @"__hugr__.__main__.postselect_panic..main.1"() local_unnamed_addr !dbg !4 { +alloca_block: + %qalloc.i = tail call i64 @___qalloc(), !dbg !8 + %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 + br i1 %not_max.not.not.i, label %cond_43_case_0.i, label %__hugr__.__tk2_qalloc.39.exit, !dbg !8 + +cond_43_case_0.i: ; preds = %alloca_block + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + unreachable, !dbg !8 + +__hugr__.__tk2_qalloc.39.exit: ; preds = %alloca_block + tail call void @___reset(i64 %qalloc.i), !dbg !8 + tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 + tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 + %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + tail call void @___qfree(i64 %qalloc.i) + tail call void @___inc_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 %0, label %cond_96_case_1 + +cond_96_case_1: ; preds = %__hugr__.__tk2_qalloc.39.exit + %read_bool65 = 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_c.1C9EF4D1.0, i64 11, i1 %read_bool65), !dbg !10 + ret void + +0: ; preds = %__hugr__.__tk2_qalloc.39.exit + tail call void @panic(i32 1001, ptr nonnull @s_Postselect.13DF1CD0.0), !dbg !11 + unreachable +} + declare i64 @___lazy_measure(i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -30,38 +62,12 @@ declare void @___rxy(i64, double, double) local_unnamed_addr declare void @___rz(i64, double) local_unnamed_addr -define i64 @qmain(i64 %0) local_unnamed_addr { +define i64 @qmain(i64 %0) local_unnamed_addr !dbg !12 { entry: - tail call void @setup(i64 %0) - %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.not.i.i, label %cond_43_case_0.i.i, label %__hugr__.__tk2_qalloc.39.exit.i - -cond_43_case_0.i.i: ; preds = %entry - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_qalloc.39.exit.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - tail call void @___rxy(i64 %qalloc.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i.i, double 0x400921FB54442D18) - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i.i) - tail call void @___qfree(i64 %qalloc.i.i) - tail call void @___inc_future_refcount(i64 %lazy_measure.i) - %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) - tail call void @___dec_future_refcount(i64 %lazy_measure.i) - br i1 %read_bool.i, label %1, label %__hugr__.main.1.exit - -1: ; preds = %__hugr__.__tk2_qalloc.39.exit.i - tail call void @panic(i32 1001, ptr nonnull @s_Postselect.13DF1CD0.0) - unreachable - -__hugr__.main.1.exit: ; preds = %__hugr__.__tk2_qalloc.39.exit.i - %read_bool65.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_bool65.i) - %2 = tail call i64 @teardown() - ret i64 %2 + tail call void @setup(i64 %0), !dbg !17 + tail call void @"__hugr__.__main__.postselect_panic..main.1"(), !dbg !17 + %1 = tail call i64 @teardown(), !dbg !17 + ret i64 %1, !dbg !17 } declare void @setup(i64) local_unnamed_addr @@ -70,6 +76,25 @@ declare i64 @teardown() local_unnamed_addr attributes #0 = { noreturn } -!name = !{!0} - -!0 = !{!"mainlib"} +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} +!name = !{!3} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v0.32.0)-v0.21.11", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "file:///Users/george.hodgkins/proj/clone-anduril") +!3 = !{!"mainlib"} +!4 = distinct !DISubprogram(name: "postselect_panic..main", linkageName: "__hugr__.__main__.postselect_panic..main.1", scope: null, file: !5, line: 144, type: !6, scopeLine: 145, spFlags: DISPFlagDefinition, unit: !1) +!5 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "") +!6 = !DISubroutineType(types: !7) +!7 = !{null} +!8 = !DILocation(line: 145, column: 12, scope: !4) +!9 = !DILocation(line: 146, column: 8, scope: !4) +!10 = !DILocation(line: 150, column: 8, scope: !4) +!11 = !DILocation(line: 149, column: 12, scope: !4) +!12 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !13, type: !14, spFlags: DISPFlagDefinition, unit: !1) +!13 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") +!14 = !DISubroutineType(types: !15) +!15 = !{!16, !16} +!16 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!17 = !DILocation(line: 0, scope: !12) diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-print_current_shot/print_current_shot_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-print_current_shot/print_current_shot_aarch64-apple-darwin index 47a2a4968..2c054a4e3 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-print_current_shot/print_current_shot_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-print_current_shot/print_current_shot_aarch64-apple-darwin @@ -5,23 +5,50 @@ target triple = "aarch64-apple-darwin" @res_shot.6D86EAF7.0 = private constant [14 x i8] c"\0DUSER:INT:shot" +define void @"__hugr__.__main__.print_current_shot..main.1"() local_unnamed_addr !dbg !4 { +alloca_block: + %shot = tail call i64 @get_current_shot(), !dbg !8 + tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot), !dbg !9 + ret void +} + declare i64 @get_current_shot() local_unnamed_addr declare void @print_int(ptr, i64, i64) local_unnamed_addr -define i64 @qmain(i64 %0) local_unnamed_addr { +define i64 @qmain(i64 %0) local_unnamed_addr !dbg !10 { entry: - tail call void @setup(i64 %0) - %shot.i = tail call i64 @get_current_shot() - tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot.i) - %1 = tail call i64 @teardown() - ret i64 %1 + tail call void @setup(i64 %0), !dbg !15 + %shot.i = tail call i64 @get_current_shot(), !dbg !16 + tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot.i), !dbg !18 + %1 = tail call i64 @teardown(), !dbg !15 + ret i64 %1, !dbg !15 } declare void @setup(i64) local_unnamed_addr declare i64 @teardown() local_unnamed_addr -!name = !{!0} - -!0 = !{!"mainlib"} +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} +!name = !{!3} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v0.32.0)-v0.21.11", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "file:///Users/george.hodgkins/proj/clone-anduril") +!3 = !{!"mainlib"} +!4 = distinct !DISubprogram(name: "print_current_shot..main", linkageName: "__hugr__.__main__.print_current_shot..main.1", scope: null, file: !5, line: 194, type: !6, scopeLine: 195, spFlags: DISPFlagDefinition, unit: !1) +!5 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "") +!6 = !DISubroutineType(types: !7) +!7 = !{null} +!8 = !DILocation(line: 195, column: 23, scope: !4) +!9 = !DILocation(line: 195, column: 8, scope: !4) +!10 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !11, type: !12, spFlags: DISPFlagDefinition, unit: !1) +!11 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") +!12 = !DISubroutineType(types: !13) +!13 = !{!14, !14} +!14 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!15 = !DILocation(line: 0, scope: !10) +!16 = !DILocation(line: 195, column: 23, scope: !4, inlinedAt: !17) +!17 = distinct !DILocation(line: 0, scope: !10) +!18 = !DILocation(line: 195, column: 8, scope: !4, inlinedAt: !17) diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-rng/rng_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-rng/rng_aarch64-apple-darwin index 634388234..700e60d31 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-rng/rng_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-rng/rng_aarch64-apple-darwin @@ -11,6 +11,32 @@ target triple = "aarch64-apple-darwin" @res_rfloat2.4DAB941F.0 = private constant [19 x i8] c"\12USER:FLOAT:rfloat2" @res_rint_bnd2.169DE399.0 = private constant [19 x i8] c"\12USER:INT:rint_bnd2" +define void @"__hugr__.__main__.rng..main.1"() local_unnamed_addr !dbg !4 { +alloca_block: + tail call void @random_seed(i64 42), !dbg !8 + %rint = tail call i32 @random_int(), !dbg !17 + %rint14 = tail call i32 @random_int(), !dbg !18 + %rfloat = tail call double @random_float(), !dbg !19 + %rintb = tail call i32 @random_rng(i32 100), !dbg !20 + %0 = sext i32 %rintb to i64, !dbg !20 + %1 = sext i32 %rint14 to i64, !dbg !18 + %2 = sext i32 %rint to i64, !dbg !17 + tail call void @print_int(ptr nonnull @res_rint.B928E41E.0, i64 13, i64 %2), !dbg !21 + tail call void @print_int(ptr nonnull @res_rint1.0884EC03.0, i64 14, i64 %1), !dbg !22 + tail call void @print_float(ptr nonnull @res_rfloat.F0E4DD2C.0, i64 17, double %rfloat), !dbg !23 + tail call void @print_int(ptr nonnull @res_rint_bnd.CB1E6B0D.0, i64 17, i64 %0), !dbg !24 + tail call void @random_seed(i64 84), !dbg !25 + %rint47 = tail call i32 @random_int(), !dbg !27 + %rfloat49 = tail call double @random_float(), !dbg !28 + %rintb52 = tail call i32 @random_rng(i32 200), !dbg !29 + %3 = sext i32 %rintb52 to i64, !dbg !29 + %4 = sext i32 %rint47 to i64, !dbg !27 + tail call void @print_int(ptr nonnull @res_rint2.F0335598.0, i64 14, i64 %4), !dbg !30 + tail call void @print_float(ptr nonnull @res_rfloat2.4DAB941F.0, i64 18, double %rfloat49), !dbg !31 + tail call void @print_int(ptr nonnull @res_rint_bnd2.169DE399.0, i64 18, i64 %3), !dbg !32 + ret void +} + declare i32 @random_int() local_unnamed_addr declare double @random_float() local_unnamed_addr @@ -23,38 +49,57 @@ declare void @print_float(ptr, i64, double) local_unnamed_addr declare void @random_seed(i64) local_unnamed_addr -define i64 @qmain(i64 %0) local_unnamed_addr { +define i64 @qmain(i64 %0) local_unnamed_addr !dbg !33 { entry: - tail call void @setup(i64 %0) - tail call void @random_seed(i64 42) - %rint.i = tail call i32 @random_int() - %rint14.i = tail call i32 @random_int() - %rfloat.i = tail call double @random_float() - %rintb.i = tail call i32 @random_rng(i32 100) - %1 = sext i32 %rintb.i to i64 - %2 = sext i32 %rint14.i to i64 - %3 = sext i32 %rint.i to i64 - tail call void @print_int(ptr nonnull @res_rint.B928E41E.0, i64 13, i64 %3) - tail call void @print_int(ptr nonnull @res_rint1.0884EC03.0, i64 14, i64 %2) - tail call void @print_float(ptr nonnull @res_rfloat.F0E4DD2C.0, i64 17, double %rfloat.i) - tail call void @print_int(ptr nonnull @res_rint_bnd.CB1E6B0D.0, i64 17, i64 %1) - tail call void @random_seed(i64 84) - %rint47.i = tail call i32 @random_int() - %rfloat49.i = tail call double @random_float() - %rintb52.i = tail call i32 @random_rng(i32 200) - %4 = sext i32 %rintb52.i to i64 - %5 = sext i32 %rint47.i to i64 - tail call void @print_int(ptr nonnull @res_rint2.F0335598.0, i64 14, i64 %5) - tail call void @print_float(ptr nonnull @res_rfloat2.4DAB941F.0, i64 18, double %rfloat49.i) - tail call void @print_int(ptr nonnull @res_rint_bnd2.169DE399.0, i64 18, i64 %4) - %6 = tail call i64 @teardown() - ret i64 %6 + tail call void @setup(i64 %0), !dbg !37 + tail call void @"__hugr__.__main__.rng..main.1"(), !dbg !37 + %1 = tail call i64 @teardown(), !dbg !37 + ret i64 %1, !dbg !37 } declare void @setup(i64) local_unnamed_addr declare i64 @teardown() local_unnamed_addr -!name = !{!0} +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} +!name = !{!3} -!0 = !{!"mainlib"} +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v0.32.0)-v0.21.11", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "file:///Users/george.hodgkins/proj/clone-anduril") +!3 = !{!"mainlib"} +!4 = distinct !DISubprogram(name: "rng..main", linkageName: "__hugr__.__main__.rng..main.1", scope: null, file: !5, line: 202, type: !6, scopeLine: 203, spFlags: DISPFlagDefinition, unit: !1) +!5 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "") +!6 = !DISubroutineType(types: !7) +!7 = !{null} +!8 = !DILocation(line: 44, column: 15, scope: !9, inlinedAt: !16) +!9 = distinct !DISubprogram(name: "std.qsystem.random.RNG.__new__", linkageName: "__hugr__.guppylang.std.qsystem.random.RNG.__new__.72", scope: null, file: !10, line: 42, type: !11, scopeLine: 44, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!10 = !DIFile(filename: "/Users/george.hodgkins/proj/clone-anduril/.venv/lib/python3.10/site-packages/guppylang/std/qsystem/random.py", directory: "") +!11 = !DISubroutineType(types: !12) +!12 = !{!13, !15} +!13 = !DICompositeType(tag: DW_TAG_structure_type, name: "{}", file: !2, align: 8, elements: !14) +!14 = !{} +!15 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!16 = distinct !DILocation(line: 203, column: 14, scope: !4) +!17 = !DILocation(line: 204, column: 15, scope: !4) +!18 = !DILocation(line: 205, column: 16, scope: !4) +!19 = !DILocation(line: 206, column: 17, scope: !4) +!20 = !DILocation(line: 207, column: 19, scope: !4) +!21 = !DILocation(line: 209, column: 8, scope: !4) +!22 = !DILocation(line: 210, column: 8, scope: !4) +!23 = !DILocation(line: 211, column: 8, scope: !4) +!24 = !DILocation(line: 212, column: 8, scope: !4) +!25 = !DILocation(line: 44, column: 15, scope: !9, inlinedAt: !26) +!26 = distinct !DILocation(line: 213, column: 14, scope: !4) +!27 = !DILocation(line: 214, column: 15, scope: !4) +!28 = !DILocation(line: 215, column: 17, scope: !4) +!29 = !DILocation(line: 216, column: 19, scope: !4) +!30 = !DILocation(line: 218, column: 8, scope: !4) +!31 = !DILocation(line: 219, column: 8, scope: !4) +!32 = !DILocation(line: 220, column: 8, scope: !4) +!33 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !34, type: !35, spFlags: DISPFlagDefinition, unit: !1) +!34 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") +!35 = !DISubroutineType(types: !36) +!36 = !{!15, !15} +!37 = !DILocation(line: 0, scope: !33) diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-rus/rus_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-rus/rus_aarch64-apple-darwin index 95ddd2420..b8197fce9 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-rus/rus_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-rus/rus_aarch64-apple-darwin @@ -6,6 +6,93 @@ target triple = "aarch64-apple-darwin" @res_result.457DE32D.0 = private constant [17 x i8] c"\10USER:BOOL:result" @"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." +define void @"__hugr__.__main__.rus..main.1"() local_unnamed_addr !dbg !4 { +alloca_block: + %qalloc.i = tail call i64 @___qalloc(), !dbg !8 + %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 + br i1 %not_max.not.not.i, label %cond_87_case_0.i, label %__hugr__.__tk2_qalloc.83.exit, !dbg !8 + +cond_87_case_0.i: ; preds = %alloca_block + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + unreachable, !dbg !8 + +__hugr__.__tk2_qalloc.83.exit: ; preds = %alloca_block + tail call void @___reset(i64 %qalloc.i), !dbg !8 + %qalloc.i132.i = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i133.i = icmp eq i64 %qalloc.i132.i, -1, !dbg !9 + br i1 %not_max.not.not.i133.i, label %cond_101_case_0.i.i, label %__hugr__.__tk2_qalloc.97.exit.i, !dbg !9 + +cond_101_case_0.i.i: ; preds = %cond_242_case_1.backedge.i, %__hugr__.__tk2_qalloc.83.exit + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 + unreachable, !dbg !9 + +__hugr__.__tk2_qalloc.97.exit.i: ; preds = %__hugr__.__tk2_qalloc.83.exit, %cond_242_case_1.backedge.i + %qalloc.i134.i = phi i64 [ %qalloc.i.i, %cond_242_case_1.backedge.i ], [ %qalloc.i132.i, %__hugr__.__tk2_qalloc.83.exit ] + tail call void @___reset(i64 %qalloc.i134.i), !dbg !9 + %qalloc.i128.i = tail call i64 @___qalloc(), !dbg !15 + %not_max.not.not.i129.i = icmp eq i64 %qalloc.i128.i, -1, !dbg !15 + br i1 %not_max.not.not.i129.i, label %cond_115_case_0.i.i, label %__hugr__.__tk2_qalloc.111.exit.i, !dbg !15 + +cond_115_case_0.i.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !15 + unreachable, !dbg !15 + +__hugr__.__tk2_qalloc.111.exit.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i + tail call void @___reset(i64 %qalloc.i128.i), !dbg !15 + tail call void @___rxy(i64 %qalloc.i128.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !16 + tail call void @___rz(i64 %qalloc.i128.i, double 0x400921FB54442D18), !dbg !16 + tail call void @___rxy(i64 %qalloc.i134.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !17 + tail call void @___rz(i64 %qalloc.i134.i, double 0x400921FB54442D18), !dbg !17 + tail call void @___rz(i64 %qalloc.i134.i, double 0xBFE921FB54442D18), !dbg !18 + tail call void @___rxy(i64 %qalloc.i134.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18), !dbg !19 + tail call void @___rzz(i64 %qalloc.i128.i, i64 %qalloc.i134.i, double 0x3FF921FB54442D18), !dbg !19 + tail call void @___rz(i64 %qalloc.i128.i, double 0xBFF921FB54442D18), !dbg !19 + tail call void @___rxy(i64 %qalloc.i134.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18), !dbg !19 + tail call void @___rz(i64 %qalloc.i134.i, double 0xBFF921FB54442D18), !dbg !19 + tail call void @___rz(i64 %qalloc.i134.i, double 0x3FE921FB54442D18), !dbg !20 + %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i134.i) + tail call void @___qfree(i64 %qalloc.i134.i) + %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) + tail call void @___dec_future_refcount(i64 %lazy_measure.i) + br i1 %read_bool.i, label %cond_256_case_1.i, label %0 + +0: ; preds = %__hugr__.__tk2_qalloc.111.exit.i + tail call void @___qfree(i64 %qalloc.i128.i), !dbg !21 + br label %cond_242_case_1.backedge.i + +cond_242_case_1.backedge.i: ; preds = %1, %0 + %qalloc.i.i = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1, !dbg !9 + br i1 %not_max.not.not.i.i, label %cond_101_case_0.i.i, label %__hugr__.__tk2_qalloc.97.exit.i, !dbg !9 + +cond_256_case_1.i: ; preds = %__hugr__.__tk2_qalloc.111.exit.i + tail call void @___rz(i64 %qalloc.i, double 0x3FE921FB54442D18), !dbg !22 + tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !23 + tail call void @___rxy(i64 %qalloc.i128.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18), !dbg !24 + tail call void @___rzz(i64 %qalloc.i, i64 %qalloc.i128.i, double 0x3FF921FB54442D18), !dbg !24 + tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18), !dbg !24 + tail call void @___rxy(i64 %qalloc.i128.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18), !dbg !24 + tail call void @___rz(i64 %qalloc.i128.i, double 0xBFF921FB54442D18), !dbg !24 + tail call void @___rz(i64 %qalloc.i128.i, double 0x3FE921FB54442D18), !dbg !25 + %lazy_measure67.i = tail call i64 @___lazy_measure(i64 %qalloc.i128.i) + tail call void @___qfree(i64 %qalloc.i128.i) + %read_bool80.i = tail call i1 @___read_future_bool(i64 %lazy_measure67.i) + tail call void @___dec_future_refcount(i64 %lazy_measure67.i) + br i1 %read_bool80.i, label %"__hugr__.__main__.rus..rus.17.exit", label %1 + +1: ; preds = %cond_256_case_1.i + tail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00), !dbg !26 + br label %cond_242_case_1.backedge.i + +"__hugr__.__main__.rus..rus.17.exit": ; preds = %cond_256_case_1.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) + tail call void @print_bool(ptr nonnull @res_result.457DE32D.0, i64 16, i1 %read_bool), !dbg !27 + ret void +} + declare i64 @___lazy_measure(i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -29,93 +116,12 @@ 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 { +define i64 @qmain(i64 %0) local_unnamed_addr !dbg !28 { entry: - tail call void @setup(i64 %0) - %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.not.i.i, label %cond_87_case_0.i.i, label %__hugr__.__tk2_qalloc.83.exit.i - -cond_87_case_0.i.i: ; preds = %entry - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_qalloc.83.exit.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - %qalloc.i132.i.i = tail call i64 @___qalloc() - %not_max.not.not.i133.i.i = icmp eq i64 %qalloc.i132.i.i, -1 - br i1 %not_max.not.not.i133.i.i, label %cond_101_case_0.i.i.i, label %__hugr__.__tk2_qalloc.97.exit.i.i - -cond_101_case_0.i.i.i: ; preds = %cond_242_case_1.backedge.i.i, %__hugr__.__tk2_qalloc.83.exit.i - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_qalloc.97.exit.i.i: ; preds = %__hugr__.__tk2_qalloc.83.exit.i, %cond_242_case_1.backedge.i.i - %qalloc.i134.i.i = phi i64 [ %qalloc.i.i.i, %cond_242_case_1.backedge.i.i ], [ %qalloc.i132.i.i, %__hugr__.__tk2_qalloc.83.exit.i ] - tail call void @___reset(i64 %qalloc.i134.i.i) - %qalloc.i128.i.i = tail call i64 @___qalloc() - %not_max.not.not.i129.i.i = icmp eq i64 %qalloc.i128.i.i, -1 - br i1 %not_max.not.not.i129.i.i, label %cond_115_case_0.i.i.i, label %__hugr__.__tk2_qalloc.111.exit.i.i - -cond_115_case_0.i.i.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i.i - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_qalloc.111.exit.i.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i.i - tail call void @___reset(i64 %qalloc.i128.i.i) - tail call void @___rxy(i64 %qalloc.i128.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i128.i.i, double 0x400921FB54442D18) - tail call void @___rxy(i64 %qalloc.i134.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i134.i.i, double 0x400921FB54442D18) - tail call void @___rz(i64 %qalloc.i134.i.i, double 0xBFE921FB54442D18) - tail call void @___rxy(i64 %qalloc.i134.i.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rzz(i64 %qalloc.i128.i.i, i64 %qalloc.i134.i.i, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i128.i.i, double 0xBFF921FB54442D18) - tail call void @___rxy(i64 %qalloc.i134.i.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18) - tail call void @___rz(i64 %qalloc.i134.i.i, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i134.i.i, double 0x3FE921FB54442D18) - %lazy_measure.i.i = tail call i64 @___lazy_measure(i64 %qalloc.i134.i.i) - tail call void @___qfree(i64 %qalloc.i134.i.i) - %read_bool.i.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i.i) - tail call void @___dec_future_refcount(i64 %lazy_measure.i.i) - br i1 %read_bool.i.i, label %cond_256_case_1.i.i, label %1 - -1: ; preds = %__hugr__.__tk2_qalloc.111.exit.i.i - tail call void @___qfree(i64 %qalloc.i128.i.i) - br label %cond_242_case_1.backedge.i.i - -cond_242_case_1.backedge.i.i: ; preds = %2, %1 - %qalloc.i.i.i = tail call i64 @___qalloc() - %not_max.not.not.i.i.i = icmp eq i64 %qalloc.i.i.i, -1 - br i1 %not_max.not.not.i.i.i, label %cond_101_case_0.i.i.i, label %__hugr__.__tk2_qalloc.97.exit.i.i - -cond_256_case_1.i.i: ; preds = %__hugr__.__tk2_qalloc.111.exit.i.i - tail call void @___rz(i64 %qalloc.i.i, double 0x3FE921FB54442D18) - tail call void @___rz(i64 %qalloc.i.i, double 0x400921FB54442D18) - tail call void @___rxy(i64 %qalloc.i128.i.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rzz(i64 %qalloc.i.i, i64 %qalloc.i128.i.i, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i.i, double 0xBFF921FB54442D18) - tail call void @___rxy(i64 %qalloc.i128.i.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18) - tail call void @___rz(i64 %qalloc.i128.i.i, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i128.i.i, double 0x3FE921FB54442D18) - %lazy_measure67.i.i = tail call i64 @___lazy_measure(i64 %qalloc.i128.i.i) - tail call void @___qfree(i64 %qalloc.i128.i.i) - %read_bool80.i.i = tail call i1 @___read_future_bool(i64 %lazy_measure67.i.i) - tail call void @___dec_future_refcount(i64 %lazy_measure67.i.i) - br i1 %read_bool80.i.i, label %__hugr__.main.1.exit, label %2 - -2: ; preds = %cond_256_case_1.i.i - tail call void @___rxy(i64 %qalloc.i.i, double 0x400921FB54442D18, double 0.000000e+00) - br label %cond_242_case_1.backedge.i.i - -__hugr__.main.1.exit: ; preds = %cond_256_case_1.i.i - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i.i) - tail call void @___qfree(i64 %qalloc.i.i) - %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) - tail call void @___dec_future_refcount(i64 %lazy_measure.i) - tail call void @print_bool(ptr nonnull @res_result.457DE32D.0, i64 16, i1 %read_bool.i) - %3 = tail call i64 @teardown() - ret i64 %3 + tail call void @setup(i64 %0), !dbg !30 + tail call void @"__hugr__.__main__.rus..main.1"(), !dbg !30 + %1 = tail call i64 @teardown(), !dbg !30 + ret i64 %1, !dbg !30 } declare void @setup(i64) local_unnamed_addr @@ -124,6 +130,38 @@ declare i64 @teardown() local_unnamed_addr attributes #0 = { noreturn } -!name = !{!0} - -!0 = !{!"mainlib"} +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} +!name = !{!3} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v0.32.0)-v0.21.11", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "file:///Users/george.hodgkins/proj/clone-anduril") +!3 = !{!"mainlib"} +!4 = distinct !DISubprogram(name: "rus..main", linkageName: "__hugr__.__main__.rus..main.1", scope: null, file: !5, line: 184, type: !6, scopeLine: 185, spFlags: DISPFlagDefinition, unit: !1) +!5 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "") +!6 = !DISubroutineType(types: !7) +!7 = !{null} +!8 = !DILocation(line: 185, column: 12, scope: !4) +!9 = !DILocation(line: 160, column: 19, scope: !10, inlinedAt: !14) +!10 = distinct !DISubprogram(name: "rus..rus", linkageName: "__hugr__.__main__.rus..rus.17", scope: null, file: !5, line: 157, type: !11, scopeLine: 158, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!11 = !DISubroutineType(types: !12) +!12 = !{!13, !13} +!13 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!14 = distinct !DILocation(line: 186, column: 8, scope: !4) +!15 = !DILocation(line: 160, column: 28, scope: !10, inlinedAt: !14) +!16 = !DILocation(line: 162, column: 12, scope: !10, inlinedAt: !14) +!17 = !DILocation(line: 161, column: 12, scope: !10, inlinedAt: !14) +!18 = !DILocation(line: 164, column: 12, scope: !10, inlinedAt: !14) +!19 = !DILocation(line: 165, column: 12, scope: !10, inlinedAt: !14) +!20 = !DILocation(line: 166, column: 12, scope: !10, inlinedAt: !14) +!21 = !DILocation(line: 169, column: 16, scope: !10, inlinedAt: !14) +!22 = !DILocation(line: 172, column: 12, scope: !10, inlinedAt: !14) +!23 = !DILocation(line: 173, column: 12, scope: !10, inlinedAt: !14) +!24 = !DILocation(line: 174, column: 12, scope: !10, inlinedAt: !14) +!25 = !DILocation(line: 175, column: 12, scope: !10, inlinedAt: !14) +!26 = !DILocation(line: 181, column: 12, scope: !10, inlinedAt: !14) +!27 = !DILocation(line: 187, column: 8, scope: !4) +!28 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !29, type: !11, spFlags: DISPFlagDefinition, unit: !1) +!29 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") +!30 = !DILocation(line: 0, scope: !28) diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-discard_qb_array/discard_qb_array_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-discard_qb_array/discard_qb_array_x86_64-apple-darwin index 87a59b320..aed473f76 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-discard_qb_array/discard_qb_array_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-discard_qb_array/discard_qb_array_x86_64-apple-darwin @@ -4,284 +4,363 @@ target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80: 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" @"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." +define void @"__hugr__.__main__.discard_qb_array..main.1"() local_unnamed_addr !dbg !4 { +alloca_block: + %0 = tail call ptr @heap_alloc(i64 80), !dbg !8 + %1 = tail call ptr @heap_alloc(i64 8), !dbg !8 + store i64 -1, ptr %1, align 1, !dbg !8 + %qalloc.i = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !9 + br i1 %not_max.not.not.i, label %cond_233_case_0.i, label %__barray_check_bounds.exit, !dbg !9 + +cond_233_case_0.i: ; preds = %cond_exit_20.8, %cond_exit_20.7, %cond_exit_20.6, %cond_exit_20.5, %cond_exit_20.4, %cond_exit_20.3, %cond_exit_20.2, %cond_exit_20.1, %cond_exit_20, %alloca_block + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 + unreachable, !dbg !9 + +__barray_check_bounds.exit: ; preds = %alloca_block + tail call void @___reset(i64 %qalloc.i), !dbg !9 + %2 = load i64, ptr %1, align 4 + %3 = trunc i64 %2 to i1 + br i1 %3, label %cond_exit_20, 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_20: ; preds = %__barray_check_bounds.exit + %4 = and i64 %2, -2 + store i64 %4, ptr %1, align 4 + store i64 %qalloc.i, ptr %0, align 4 + %qalloc.i.1 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1, !dbg !9 + br i1 %not_max.not.not.i.1, label %cond_233_case_0.i, label %__barray_check_bounds.exit.1, !dbg !9 + +__barray_check_bounds.exit.1: ; preds = %cond_exit_20 + tail call void @___reset(i64 %qalloc.i.1), !dbg !9 + %5 = load i64, ptr %1, align 4 + %6 = and i64 %5, 2 + %.not = icmp eq i64 %6, 0 + br i1 %.not, label %panic.i, label %cond_exit_20.1 + +cond_exit_20.1: ; preds = %__barray_check_bounds.exit.1 + %7 = and i64 %5, -3 + store i64 %7, ptr %1, align 4 + %8 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %qalloc.i.1, ptr %8, align 4 + %qalloc.i.2 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1, !dbg !9 + br i1 %not_max.not.not.i.2, label %cond_233_case_0.i, label %__barray_check_bounds.exit.2, !dbg !9 + +__barray_check_bounds.exit.2: ; preds = %cond_exit_20.1 + tail call void @___reset(i64 %qalloc.i.2), !dbg !9 + %9 = load i64, ptr %1, align 4 + %10 = and i64 %9, 4 + %.not108 = icmp eq i64 %10, 0 + br i1 %.not108, label %panic.i, label %cond_exit_20.2 + +cond_exit_20.2: ; preds = %__barray_check_bounds.exit.2 + %11 = and i64 %9, -5 + store i64 %11, ptr %1, align 4 + %12 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %qalloc.i.2, ptr %12, align 4 + %qalloc.i.3 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1, !dbg !9 + br i1 %not_max.not.not.i.3, label %cond_233_case_0.i, label %__barray_check_bounds.exit.3, !dbg !9 + +__barray_check_bounds.exit.3: ; preds = %cond_exit_20.2 + tail call void @___reset(i64 %qalloc.i.3), !dbg !9 + %13 = load i64, ptr %1, align 4 + %14 = and i64 %13, 8 + %.not109 = icmp eq i64 %14, 0 + br i1 %.not109, label %panic.i, label %cond_exit_20.3 + +cond_exit_20.3: ; preds = %__barray_check_bounds.exit.3 + %15 = and i64 %13, -9 + store i64 %15, ptr %1, align 4 + %16 = getelementptr inbounds nuw i8, ptr %0, i64 24 + store i64 %qalloc.i.3, ptr %16, align 4 + %qalloc.i.4 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1, !dbg !9 + br i1 %not_max.not.not.i.4, label %cond_233_case_0.i, label %__barray_check_bounds.exit.4, !dbg !9 + +__barray_check_bounds.exit.4: ; preds = %cond_exit_20.3 + tail call void @___reset(i64 %qalloc.i.4), !dbg !9 + %17 = load i64, ptr %1, align 4 + %18 = and i64 %17, 16 + %.not110 = icmp eq i64 %18, 0 + br i1 %.not110, label %panic.i, label %cond_exit_20.4 + +cond_exit_20.4: ; preds = %__barray_check_bounds.exit.4 + %19 = and i64 %17, -17 + store i64 %19, ptr %1, align 4 + %20 = getelementptr inbounds nuw i8, ptr %0, i64 32 + store i64 %qalloc.i.4, ptr %20, align 4 + %qalloc.i.5 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.5 = icmp eq i64 %qalloc.i.5, -1, !dbg !9 + br i1 %not_max.not.not.i.5, label %cond_233_case_0.i, label %__barray_check_bounds.exit.5, !dbg !9 + +__barray_check_bounds.exit.5: ; preds = %cond_exit_20.4 + tail call void @___reset(i64 %qalloc.i.5), !dbg !9 + %21 = load i64, ptr %1, align 4 + %22 = and i64 %21, 32 + %.not111 = icmp eq i64 %22, 0 + br i1 %.not111, label %panic.i, label %cond_exit_20.5 + +cond_exit_20.5: ; preds = %__barray_check_bounds.exit.5 + %23 = and i64 %21, -33 + store i64 %23, ptr %1, align 4 + %24 = getelementptr inbounds nuw i8, ptr %0, i64 40 + store i64 %qalloc.i.5, ptr %24, align 4 + %qalloc.i.6 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.6 = icmp eq i64 %qalloc.i.6, -1, !dbg !9 + br i1 %not_max.not.not.i.6, label %cond_233_case_0.i, label %__barray_check_bounds.exit.6, !dbg !9 + +__barray_check_bounds.exit.6: ; preds = %cond_exit_20.5 + tail call void @___reset(i64 %qalloc.i.6), !dbg !9 + %25 = load i64, ptr %1, align 4 + %26 = and i64 %25, 64 + %.not112 = icmp eq i64 %26, 0 + br i1 %.not112, label %panic.i, label %cond_exit_20.6 + +cond_exit_20.6: ; preds = %__barray_check_bounds.exit.6 + %27 = and i64 %25, -65 + store i64 %27, ptr %1, align 4 + %28 = getelementptr inbounds nuw i8, ptr %0, i64 48 + store i64 %qalloc.i.6, ptr %28, align 4 + %qalloc.i.7 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.7 = icmp eq i64 %qalloc.i.7, -1, !dbg !9 + br i1 %not_max.not.not.i.7, label %cond_233_case_0.i, label %__barray_check_bounds.exit.7, !dbg !9 + +__barray_check_bounds.exit.7: ; preds = %cond_exit_20.6 + tail call void @___reset(i64 %qalloc.i.7), !dbg !9 + %29 = load i64, ptr %1, align 4 + %30 = and i64 %29, 128 + %.not113 = icmp eq i64 %30, 0 + br i1 %.not113, label %panic.i, label %cond_exit_20.7 + +cond_exit_20.7: ; preds = %__barray_check_bounds.exit.7 + %31 = and i64 %29, -129 + store i64 %31, ptr %1, align 4 + %32 = getelementptr inbounds nuw i8, ptr %0, i64 56 + store i64 %qalloc.i.7, ptr %32, align 4 + %qalloc.i.8 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.8 = icmp eq i64 %qalloc.i.8, -1, !dbg !9 + br i1 %not_max.not.not.i.8, label %cond_233_case_0.i, label %__barray_check_bounds.exit.8, !dbg !9 + +__barray_check_bounds.exit.8: ; preds = %cond_exit_20.7 + tail call void @___reset(i64 %qalloc.i.8), !dbg !9 + %33 = load i64, ptr %1, align 4 + %34 = and i64 %33, 256 + %.not114 = icmp eq i64 %34, 0 + br i1 %.not114, label %panic.i, label %cond_exit_20.8 + +cond_exit_20.8: ; preds = %__barray_check_bounds.exit.8 + %35 = and i64 %33, -257 + store i64 %35, ptr %1, align 4 + %36 = getelementptr inbounds nuw i8, ptr %0, i64 64 + store i64 %qalloc.i.8, ptr %36, align 4 + %qalloc.i.9 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.9 = icmp eq i64 %qalloc.i.9, -1, !dbg !9 + br i1 %not_max.not.not.i.9, label %cond_233_case_0.i, label %__barray_check_bounds.exit.9, !dbg !9 + +__barray_check_bounds.exit.9: ; preds = %cond_exit_20.8 + tail call void @___reset(i64 %qalloc.i.9), !dbg !9 + %37 = load i64, ptr %1, align 4 + %38 = and i64 %37, 512 + %.not115 = icmp eq i64 %38, 0 + br i1 %.not115, label %panic.i, label %cond_exit_20.9 + +cond_exit_20.9: ; preds = %__barray_check_bounds.exit.9 + %39 = and i64 %37, -513 + store i64 %39, ptr %1, align 4 + %40 = getelementptr inbounds nuw i8, ptr %0, i64 72 + store i64 %qalloc.i.9, ptr %40, align 4 + %41 = load i64, ptr %1, align 4, !dbg !10 + %42 = trunc i64 %41 to i1, !dbg !10 + br i1 %42, label %cond_171_case_1.1.i, label %__barray_mask_borrow.exit.i + +cond_171_case_1.1.i: ; preds = %__barray_mask_borrow.exit.i, %cond_exit_20.9 + %43 = phi i64 [ %41, %cond_exit_20.9 ], [ %.pre.i, %__barray_mask_borrow.exit.i ], !dbg !10 + %44 = and i64 %43, 2, !dbg !10 + %.not.i = icmp eq i64 %44, 0, !dbg !10 + br i1 %.not.i, label %__barray_mask_borrow.exit.1.i, label %cond_171_case_1.2.i + +__barray_mask_borrow.exit.1.i: ; preds = %cond_171_case_1.1.i + %45 = or disjoint i64 %43, 2, !dbg !21 + store i64 %45, ptr %1, align 4, !dbg !21 + %46 = getelementptr inbounds nuw i8, ptr %0, i64 8, !dbg !23 + %47 = load i64, ptr %46, align 4, !dbg !23 + tail call void @___qfree(i64 %47), !dbg !24 + %.pre337.i = load i64, ptr %1, align 4, !dbg !10 + br label %cond_171_case_1.2.i + +cond_171_case_1.2.i: ; preds = %__barray_mask_borrow.exit.1.i, %cond_171_case_1.1.i + %48 = phi i64 [ %.pre337.i, %__barray_mask_borrow.exit.1.i ], [ %43, %cond_171_case_1.1.i ], !dbg !10 + %49 = and i64 %48, 4, !dbg !10 + %.not345.i = icmp eq i64 %49, 0, !dbg !10 + br i1 %.not345.i, label %__barray_mask_borrow.exit.2.i, label %cond_171_case_1.3.i + +__barray_mask_borrow.exit.2.i: ; preds = %cond_171_case_1.2.i + %50 = or disjoint i64 %48, 4, !dbg !21 + store i64 %50, ptr %1, align 4, !dbg !21 + %51 = getelementptr inbounds nuw i8, ptr %0, i64 16, !dbg !23 + %52 = load i64, ptr %51, align 4, !dbg !23 + tail call void @___qfree(i64 %52), !dbg !24 + %.pre338.i = load i64, ptr %1, align 4, !dbg !10 + br label %cond_171_case_1.3.i + +cond_171_case_1.3.i: ; preds = %__barray_mask_borrow.exit.2.i, %cond_171_case_1.2.i + %53 = phi i64 [ %.pre338.i, %__barray_mask_borrow.exit.2.i ], [ %48, %cond_171_case_1.2.i ], !dbg !10 + %54 = and i64 %53, 8, !dbg !10 + %.not346.i = icmp eq i64 %54, 0, !dbg !10 + br i1 %.not346.i, label %__barray_mask_borrow.exit.3.i, label %cond_171_case_1.4.i + +__barray_mask_borrow.exit.3.i: ; preds = %cond_171_case_1.3.i + %55 = or disjoint i64 %53, 8, !dbg !21 + store i64 %55, ptr %1, align 4, !dbg !21 + %56 = getelementptr inbounds nuw i8, ptr %0, i64 24, !dbg !23 + %57 = load i64, ptr %56, align 4, !dbg !23 + tail call void @___qfree(i64 %57), !dbg !24 + %.pre339.i = load i64, ptr %1, align 4, !dbg !10 + br label %cond_171_case_1.4.i + +cond_171_case_1.4.i: ; preds = %__barray_mask_borrow.exit.3.i, %cond_171_case_1.3.i + %58 = phi i64 [ %.pre339.i, %__barray_mask_borrow.exit.3.i ], [ %53, %cond_171_case_1.3.i ], !dbg !10 + %59 = and i64 %58, 16, !dbg !10 + %.not347.i = icmp eq i64 %59, 0, !dbg !10 + br i1 %.not347.i, label %__barray_mask_borrow.exit.4.i, label %cond_171_case_1.5.i + +__barray_mask_borrow.exit.4.i: ; preds = %cond_171_case_1.4.i + %60 = or disjoint i64 %58, 16, !dbg !21 + store i64 %60, ptr %1, align 4, !dbg !21 + %61 = getelementptr inbounds nuw i8, ptr %0, i64 32, !dbg !23 + %62 = load i64, ptr %61, align 4, !dbg !23 + tail call void @___qfree(i64 %62), !dbg !24 + %.pre340.i = load i64, ptr %1, align 4, !dbg !10 + br label %cond_171_case_1.5.i + +cond_171_case_1.5.i: ; preds = %__barray_mask_borrow.exit.4.i, %cond_171_case_1.4.i + %63 = phi i64 [ %.pre340.i, %__barray_mask_borrow.exit.4.i ], [ %58, %cond_171_case_1.4.i ], !dbg !10 + %64 = and i64 %63, 32, !dbg !10 + %.not348.i = icmp eq i64 %64, 0, !dbg !10 + br i1 %.not348.i, label %__barray_mask_borrow.exit.5.i, label %cond_171_case_1.6.i + +__barray_mask_borrow.exit.5.i: ; preds = %cond_171_case_1.5.i + %65 = or disjoint i64 %63, 32, !dbg !21 + store i64 %65, ptr %1, align 4, !dbg !21 + %66 = getelementptr inbounds nuw i8, ptr %0, i64 40, !dbg !23 + %67 = load i64, ptr %66, align 4, !dbg !23 + tail call void @___qfree(i64 %67), !dbg !24 + %.pre341.i = load i64, ptr %1, align 4, !dbg !10 + br label %cond_171_case_1.6.i + +cond_171_case_1.6.i: ; preds = %__barray_mask_borrow.exit.5.i, %cond_171_case_1.5.i + %68 = phi i64 [ %.pre341.i, %__barray_mask_borrow.exit.5.i ], [ %63, %cond_171_case_1.5.i ], !dbg !10 + %69 = and i64 %68, 64, !dbg !10 + %.not349.i = icmp eq i64 %69, 0, !dbg !10 + br i1 %.not349.i, label %__barray_mask_borrow.exit.6.i, label %cond_171_case_1.7.i + +__barray_mask_borrow.exit.6.i: ; preds = %cond_171_case_1.6.i + %70 = or disjoint i64 %68, 64, !dbg !21 + store i64 %70, ptr %1, align 4, !dbg !21 + %71 = getelementptr inbounds nuw i8, ptr %0, i64 48, !dbg !23 + %72 = load i64, ptr %71, align 4, !dbg !23 + tail call void @___qfree(i64 %72), !dbg !24 + %.pre342.i = load i64, ptr %1, align 4, !dbg !10 + br label %cond_171_case_1.7.i + +cond_171_case_1.7.i: ; preds = %__barray_mask_borrow.exit.6.i, %cond_171_case_1.6.i + %73 = phi i64 [ %.pre342.i, %__barray_mask_borrow.exit.6.i ], [ %68, %cond_171_case_1.6.i ], !dbg !10 + %74 = and i64 %73, 128, !dbg !10 + %.not350.i = icmp eq i64 %74, 0, !dbg !10 + br i1 %.not350.i, label %__barray_mask_borrow.exit.7.i, label %cond_171_case_1.8.i + +__barray_mask_borrow.exit.7.i: ; preds = %cond_171_case_1.7.i + %75 = or disjoint i64 %73, 128, !dbg !21 + store i64 %75, ptr %1, align 4, !dbg !21 + %76 = getelementptr inbounds nuw i8, ptr %0, i64 56, !dbg !23 + %77 = load i64, ptr %76, align 4, !dbg !23 + tail call void @___qfree(i64 %77), !dbg !24 + %.pre343.i = load i64, ptr %1, align 4, !dbg !10 + br label %cond_171_case_1.8.i + +cond_171_case_1.8.i: ; preds = %__barray_mask_borrow.exit.7.i, %cond_171_case_1.7.i + %78 = phi i64 [ %.pre343.i, %__barray_mask_borrow.exit.7.i ], [ %73, %cond_171_case_1.7.i ], !dbg !10 + %79 = and i64 %78, 256, !dbg !10 + %.not351.i = icmp eq i64 %79, 0, !dbg !10 + br i1 %.not351.i, label %__barray_mask_borrow.exit.8.i, label %__barray_check_bounds.exit.9.i + +__barray_mask_borrow.exit.8.i: ; preds = %cond_171_case_1.8.i + %80 = or disjoint i64 %78, 256, !dbg !21 + store i64 %80, ptr %1, align 4, !dbg !21 + %81 = getelementptr inbounds nuw i8, ptr %0, i64 64, !dbg !23 + %82 = load i64, ptr %81, align 4, !dbg !23 + tail call void @___qfree(i64 %82), !dbg !24 + %.pre = load i64, ptr %1, align 4, !dbg !10 + br label %__barray_check_bounds.exit.9.i + +__barray_check_bounds.exit.9.i: ; preds = %__barray_mask_borrow.exit.8.i, %cond_171_case_1.8.i + %83 = phi i64 [ %.pre, %__barray_mask_borrow.exit.8.i ], [ %78, %cond_171_case_1.8.i ], !dbg !10 + %84 = and i64 %83, 512, !dbg !10 + %.not352.i = icmp eq i64 %84, 0, !dbg !10 + br i1 %.not352.i, label %__barray_mask_borrow.exit.9.i, label %cond_exit_156.i + +__barray_mask_borrow.exit.9.i: ; preds = %__barray_check_bounds.exit.9.i + %85 = or disjoint i64 %83, 512, !dbg !21 + store i64 %85, ptr %1, align 4, !dbg !21 + %86 = getelementptr inbounds nuw i8, ptr %0, i64 72, !dbg !23 + %87 = load i64, ptr %86, align 4, !dbg !23 + tail call void @___qfree(i64 %87), !dbg !24 + %.pre344.i = load i64, ptr %1, align 4, !dbg !25 + br label %cond_exit_156.i + +cond_exit_156.i: ; preds = %__barray_mask_borrow.exit.9.i, %__barray_check_bounds.exit.9.i + %88 = phi i64 [ %.pre344.i, %__barray_mask_borrow.exit.9.i ], [ %83, %__barray_check_bounds.exit.9.i ], !dbg !25 + %89 = or i64 %88, -1024, !dbg !25 + store i64 %89, ptr %1, align 4, !dbg !25 + %90 = icmp eq i64 %89, -1, !dbg !25 + br i1 %90, label %"__hugr__.guppylang.std.quantum.discard_array$10.113.exit", label %mask_block_err.i.i, !dbg !25 + +mask_block_err.i.i: ; preds = %cond_exit_156.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0"), !dbg !25 + unreachable, !dbg !25 + +__barray_mask_borrow.exit.i: ; preds = %cond_exit_20.9 + %91 = or disjoint i64 %41, 1, !dbg !21 + store i64 %91, ptr %1, align 4, !dbg !21 + %92 = load i64, ptr %0, align 4, !dbg !23 + tail call void @___qfree(i64 %92), !dbg !24 + %.pre.i = load i64, ptr %1, align 4, !dbg !10 + br label %cond_171_case_1.1.i + +"__hugr__.guppylang.std.quantum.discard_array$10.113.exit": ; preds = %cond_exit_156.i + tail call void @heap_free(ptr nonnull %0), !dbg !27 + tail call void @heap_free(ptr nonnull %1), !dbg !27 + ret void +} + declare ptr @heap_alloc(i64) local_unnamed_addr ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #0 -declare void @___qfree(i64) local_unnamed_addr - declare void @heap_free(ptr) local_unnamed_addr +declare void @___qfree(i64) local_unnamed_addr + declare i64 @___qalloc() local_unnamed_addr declare void @___reset(i64) local_unnamed_addr -define i64 @qmain(i64 %0) local_unnamed_addr { +define i64 @qmain(i64 %0) local_unnamed_addr !dbg !28 { entry: - tail call void @setup(i64 %0) - %1 = tail call ptr @heap_alloc(i64 80) - %2 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %2, align 1 - %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.not.i.i, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i - -cond_213_case_0.i.i: ; preds = %cond_exit_20.i.8, %cond_exit_20.i.7, %cond_exit_20.i.6, %cond_exit_20.i.5, %cond_exit_20.i.4, %cond_exit_20.i.3, %cond_exit_20.i.2, %cond_exit_20.i.1, %cond_exit_20.i, %entry - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__barray_check_bounds.exit.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - %3 = load i64, ptr %2, align 4 - %4 = trunc i64 %3 to i1 - br i1 %4, label %cond_exit_20.i, label %panic.i.i - -panic.i.i: ; preds = %__barray_check_bounds.exit.i.9, %__barray_check_bounds.exit.i.8, %__barray_check_bounds.exit.i.7, %__barray_check_bounds.exit.i.6, %__barray_check_bounds.exit.i.5, %__barray_check_bounds.exit.i.4, %__barray_check_bounds.exit.i.3, %__barray_check_bounds.exit.i.2, %__barray_check_bounds.exit.i.1, %__barray_check_bounds.exit.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_exit_20.i: ; preds = %__barray_check_bounds.exit.i - %5 = and i64 %3, -2 - store i64 %5, ptr %2, align 4 - store i64 %qalloc.i.i, ptr %1, align 4 - %qalloc.i.i.1 = tail call i64 @___qalloc() - %not_max.not.not.i.i.1 = icmp eq i64 %qalloc.i.i.1, -1 - br i1 %not_max.not.not.i.i.1, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.1 - -__barray_check_bounds.exit.i.1: ; preds = %cond_exit_20.i - tail call void @___reset(i64 %qalloc.i.i.1) - %6 = load i64, ptr %2, align 4 - %7 = and i64 %6, 2 - %.not = icmp eq i64 %7, 0 - br i1 %.not, label %panic.i.i, label %cond_exit_20.i.1 - -cond_exit_20.i.1: ; preds = %__barray_check_bounds.exit.i.1 - %8 = and i64 %6, -3 - store i64 %8, ptr %2, align 4 - %9 = getelementptr inbounds nuw i8, ptr %1, i64 8 - store i64 %qalloc.i.i.1, ptr %9, align 4 - %qalloc.i.i.2 = tail call i64 @___qalloc() - %not_max.not.not.i.i.2 = icmp eq i64 %qalloc.i.i.2, -1 - br i1 %not_max.not.not.i.i.2, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.2 - -__barray_check_bounds.exit.i.2: ; preds = %cond_exit_20.i.1 - tail call void @___reset(i64 %qalloc.i.i.2) - %10 = load i64, ptr %2, align 4 - %11 = and i64 %10, 4 - %.not1 = icmp eq i64 %11, 0 - br i1 %.not1, label %panic.i.i, label %cond_exit_20.i.2 - -cond_exit_20.i.2: ; preds = %__barray_check_bounds.exit.i.2 - %12 = and i64 %10, -5 - store i64 %12, ptr %2, align 4 - %13 = getelementptr inbounds nuw i8, ptr %1, i64 16 - store i64 %qalloc.i.i.2, ptr %13, align 4 - %qalloc.i.i.3 = tail call i64 @___qalloc() - %not_max.not.not.i.i.3 = icmp eq i64 %qalloc.i.i.3, -1 - br i1 %not_max.not.not.i.i.3, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.3 - -__barray_check_bounds.exit.i.3: ; preds = %cond_exit_20.i.2 - tail call void @___reset(i64 %qalloc.i.i.3) - %14 = load i64, ptr %2, align 4 - %15 = and i64 %14, 8 - %.not2 = icmp eq i64 %15, 0 - br i1 %.not2, label %panic.i.i, label %cond_exit_20.i.3 - -cond_exit_20.i.3: ; preds = %__barray_check_bounds.exit.i.3 - %16 = and i64 %14, -9 - store i64 %16, ptr %2, align 4 - %17 = getelementptr inbounds nuw i8, ptr %1, i64 24 - store i64 %qalloc.i.i.3, ptr %17, align 4 - %qalloc.i.i.4 = tail call i64 @___qalloc() - %not_max.not.not.i.i.4 = icmp eq i64 %qalloc.i.i.4, -1 - br i1 %not_max.not.not.i.i.4, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.4 - -__barray_check_bounds.exit.i.4: ; preds = %cond_exit_20.i.3 - tail call void @___reset(i64 %qalloc.i.i.4) - %18 = load i64, ptr %2, align 4 - %19 = and i64 %18, 16 - %.not3 = icmp eq i64 %19, 0 - br i1 %.not3, label %panic.i.i, label %cond_exit_20.i.4 - -cond_exit_20.i.4: ; preds = %__barray_check_bounds.exit.i.4 - %20 = and i64 %18, -17 - store i64 %20, ptr %2, align 4 - %21 = getelementptr inbounds nuw i8, ptr %1, i64 32 - store i64 %qalloc.i.i.4, ptr %21, align 4 - %qalloc.i.i.5 = tail call i64 @___qalloc() - %not_max.not.not.i.i.5 = icmp eq i64 %qalloc.i.i.5, -1 - br i1 %not_max.not.not.i.i.5, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.5 - -__barray_check_bounds.exit.i.5: ; preds = %cond_exit_20.i.4 - tail call void @___reset(i64 %qalloc.i.i.5) - %22 = load i64, ptr %2, align 4 - %23 = and i64 %22, 32 - %.not4 = icmp eq i64 %23, 0 - br i1 %.not4, label %panic.i.i, label %cond_exit_20.i.5 - -cond_exit_20.i.5: ; preds = %__barray_check_bounds.exit.i.5 - %24 = and i64 %22, -33 - store i64 %24, ptr %2, align 4 - %25 = getelementptr inbounds nuw i8, ptr %1, i64 40 - store i64 %qalloc.i.i.5, ptr %25, align 4 - %qalloc.i.i.6 = tail call i64 @___qalloc() - %not_max.not.not.i.i.6 = icmp eq i64 %qalloc.i.i.6, -1 - br i1 %not_max.not.not.i.i.6, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.6 - -__barray_check_bounds.exit.i.6: ; preds = %cond_exit_20.i.5 - tail call void @___reset(i64 %qalloc.i.i.6) - %26 = load i64, ptr %2, align 4 - %27 = and i64 %26, 64 - %.not5 = icmp eq i64 %27, 0 - br i1 %.not5, label %panic.i.i, label %cond_exit_20.i.6 - -cond_exit_20.i.6: ; preds = %__barray_check_bounds.exit.i.6 - %28 = and i64 %26, -65 - store i64 %28, ptr %2, align 4 - %29 = getelementptr inbounds nuw i8, ptr %1, i64 48 - store i64 %qalloc.i.i.6, ptr %29, align 4 - %qalloc.i.i.7 = tail call i64 @___qalloc() - %not_max.not.not.i.i.7 = icmp eq i64 %qalloc.i.i.7, -1 - br i1 %not_max.not.not.i.i.7, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.7 - -__barray_check_bounds.exit.i.7: ; preds = %cond_exit_20.i.6 - tail call void @___reset(i64 %qalloc.i.i.7) - %30 = load i64, ptr %2, align 4 - %31 = and i64 %30, 128 - %.not6 = icmp eq i64 %31, 0 - br i1 %.not6, label %panic.i.i, label %cond_exit_20.i.7 - -cond_exit_20.i.7: ; preds = %__barray_check_bounds.exit.i.7 - %32 = and i64 %30, -129 - store i64 %32, ptr %2, align 4 - %33 = getelementptr inbounds nuw i8, ptr %1, i64 56 - store i64 %qalloc.i.i.7, ptr %33, align 4 - %qalloc.i.i.8 = tail call i64 @___qalloc() - %not_max.not.not.i.i.8 = icmp eq i64 %qalloc.i.i.8, -1 - br i1 %not_max.not.not.i.i.8, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.8 - -__barray_check_bounds.exit.i.8: ; preds = %cond_exit_20.i.7 - tail call void @___reset(i64 %qalloc.i.i.8) - %34 = load i64, ptr %2, align 4 - %35 = and i64 %34, 256 - %.not7 = icmp eq i64 %35, 0 - br i1 %.not7, label %panic.i.i, label %cond_exit_20.i.8 - -cond_exit_20.i.8: ; preds = %__barray_check_bounds.exit.i.8 - %36 = and i64 %34, -257 - store i64 %36, ptr %2, align 4 - %37 = getelementptr inbounds nuw i8, ptr %1, i64 64 - store i64 %qalloc.i.i.8, ptr %37, align 4 - %qalloc.i.i.9 = tail call i64 @___qalloc() - %not_max.not.not.i.i.9 = icmp eq i64 %qalloc.i.i.9, -1 - br i1 %not_max.not.not.i.i.9, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.9 - -__barray_check_bounds.exit.i.9: ; preds = %cond_exit_20.i.8 - tail call void @___reset(i64 %qalloc.i.i.9) - %38 = load i64, ptr %2, align 4 - %39 = and i64 %38, 512 - %.not8 = icmp eq i64 %39, 0 - br i1 %.not8, label %panic.i.i, label %cond_exit_20.i.9 - -cond_exit_20.i.9: ; preds = %__barray_check_bounds.exit.i.9 - %40 = and i64 %38, -513 - store i64 %40, ptr %2, align 4 - %41 = getelementptr inbounds nuw i8, ptr %1, i64 72 - store i64 %qalloc.i.i.9, ptr %41, align 4 - %"116.fca.0.insert.i" = insertvalue { ptr, ptr, i64 } poison, ptr %1, 0 - %"116.fca.1.insert.i" = insertvalue { ptr, ptr, i64 } %"116.fca.0.insert.i", ptr %2, 1 - %"116.fca.2.insert.i" = insertvalue { ptr, ptr, i64 } %"116.fca.1.insert.i", i64 0, 2 - %42 = insertvalue { { ptr, ptr, i64 }, i64 } poison, { ptr, ptr, i64 } %"116.fca.2.insert.i", 0 - br label %__barray_check_bounds.exit.i.i.i - -43: ; preds = %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" - %44 = lshr i64 %.fca.1.0.0.2.extract.i.i.i, 6 - %45 = getelementptr i64, ptr %.fca.1.0.0.1.extract.i.i.i, i64 %44 - %46 = load i64, ptr %45, align 4 - %47 = and i64 %.fca.1.0.0.2.extract.i.i.i, 63 - %48 = sub nuw nsw i64 64, %47 - %49 = lshr i64 -1, %48 - %50 = icmp eq i64 %47, 0 - %51 = select i1 %50, i64 0, i64 %49 - %52 = or i64 %46, %51 - store i64 %52, ptr %45, align 4 - %last_valid.i.i.i.i = add i64 %.fca.1.0.0.2.extract.i.i.i, 9 - %53 = lshr i64 %last_valid.i.i.i.i, 6 - %54 = getelementptr inbounds nuw i64, ptr %.fca.1.0.0.1.extract.i.i.i, i64 %53 - %55 = load i64, ptr %54, align 4 - %56 = and i64 %last_valid.i.i.i.i, 63 - %57 = shl nsw i64 -2, %56 - %58 = icmp eq i64 %56, 63 - %59 = select i1 %58, i64 0, i64 %57 - %60 = or i64 %55, %59 - store i64 %60, ptr %54, align 4 - %reass.sub.i.i.i.i = sub nsw i64 %53, %44 - %.not.i.i.i.i = icmp eq i64 %reass.sub.i.i.i.i, -1 - br i1 %.not.i.i.i.i, label %__hugr__.main.1.exit, label %mask_block_ok.i.i.i.i - -61: ; preds = %mask_block_ok.i.i.i.i - %62 = add nuw i64 %.02.i.i.i.i, 1 - %exitcond.not.i.i.i.i = icmp eq i64 %.02.i.i.i.i, %reass.sub.i.i.i.i - br i1 %exitcond.not.i.i.i.i, label %__hugr__.main.1.exit, label %mask_block_ok.i.i.i.i - -mask_block_ok.i.i.i.i: ; preds = %43, %61 - %.02.i.i.i.i = phi i64 [ %62, %61 ], [ 0, %43 ] - %gep.i.i.i.i = getelementptr i64, ptr %45, i64 %.02.i.i.i.i - %63 = load i64, ptr %gep.i.i.i.i, align 4 - %64 = icmp eq i64 %63, -1 - br i1 %64, label %61, label %mask_block_err.i.i.i.i - -mask_block_err.i.i.i.i: ; preds = %mask_block_ok.i.i.i.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit.i.i.i: ; preds = %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i", %cond_exit_20.i.9 - %.fca.2.extract82.i185.i.i = phi i64 [ 0, %cond_exit_20.i.9 ], [ %.fca.1.0.0.2.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %.fca.1.extract81.i184.i.i = phi ptr [ %2, %cond_exit_20.i.9 ], [ %.fca.1.0.0.1.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %.fca.0.extract80.i183.i.i = phi ptr [ %1, %cond_exit_20.i.9 ], [ %.fca.1.0.0.0.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %"294_0.0182.i.i" = phi i64 [ 0, %cond_exit_20.i.9 ], [ %72, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %.pn181.i.i = phi { { ptr, ptr, i64 }, i64 } [ %42, %cond_exit_20.i.9 ], [ %80, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %65 = add i64 %"294_0.0182.i.i", %.fca.2.extract82.i185.i.i - %66 = lshr i64 %65, 6 - %67 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i184.i.i, i64 %66 - %68 = load i64, ptr %67, align 4 - %69 = and i64 %65, 63 - %70 = lshr i64 %68, %69 - %71 = trunc i64 %70 to i1 - br i1 %71, label %panic.i.i.i.i, label %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" - -panic.i.i.i.i: ; preds = %__barray_check_bounds.exit.i.i.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i": ; preds = %__barray_check_bounds.exit.i.i.i - %72 = add nuw nsw i64 %"294_0.0182.i.i", 1 - %73 = shl nuw i64 1, %69 - %74 = xor i64 %73, %68 - store i64 %74, ptr %67, align 4 - %75 = getelementptr inbounds i64, ptr %.fca.0.extract80.i183.i.i, i64 %65 - %76 = load i64, ptr %75, align 4 - %.fca.1.0.0.0.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 0 - %.fca.1.0.0.1.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 1 - %.fca.1.0.0.2.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 2 - %77 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, i64 %72, 1 - %78 = insertvalue { { ptr, ptr, i64 }, i64 } %77, ptr %.fca.1.0.0.0.extract.i.i.i, 0, 0 - %79 = insertvalue { { ptr, ptr, i64 }, i64 } %78, ptr %.fca.1.0.0.1.extract.i.i.i, 0, 1 - %80 = insertvalue { { ptr, ptr, i64 }, i64 } %79, i64 %.fca.1.0.0.2.extract.i.i.i, 0, 2 - tail call void @___qfree(i64 %76) - %.not.i.i = icmp eq i64 %"294_0.0182.i.i", 9 - br i1 %.not.i.i, label %43, label %__barray_check_bounds.exit.i.i.i - -__hugr__.main.1.exit: ; preds = %61, %43 - tail call void @heap_free(ptr %.fca.1.0.0.0.extract.i.i.i) - tail call void @heap_free(ptr nonnull %.fca.1.0.0.1.extract.i.i.i) - %81 = tail call i64 @teardown() - ret i64 %81 + tail call void @setup(i64 %0), !dbg !32 + tail call void @"__hugr__.__main__.discard_qb_array..main.1"(), !dbg !32 + %1 = tail call i64 @teardown(), !dbg !32 + ret i64 %1, !dbg !32 } declare void @setup(i64) local_unnamed_addr @@ -290,6 +369,40 @@ declare i64 @teardown() local_unnamed_addr attributes #0 = { noreturn } -!name = !{!0} - -!0 = !{!"mainlib"} +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} +!name = !{!3} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v0.32.0)-v0.21.11", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "file:///Users/george.hodgkins/proj/clone-anduril") +!3 = !{!"mainlib"} +!4 = distinct !DISubprogram(name: "discard_qb_array..main", linkageName: "__hugr__.__main__.discard_qb_array..main.1", scope: null, file: !5, line: 92, type: !6, scopeLine: 93, spFlags: DISPFlagDefinition, unit: !1) +!5 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "") +!6 = !DISubroutineType(types: !7) +!7 = !{null} +!8 = !DILocation(line: 93, column: 13, scope: !4) +!9 = !DILocation(line: 93, column: 19, scope: !4) +!10 = !DILocation(line: 390, column: 15, scope: !11, inlinedAt: !19) +!11 = distinct !DISubprogram(name: "std.quantum.discard_array$10", linkageName: "__hugr__.guppylang.std.quantum.discard_array$10.113", scope: null, file: !12, line: 387, type: !13, scopeLine: 389, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!12 = !DIFile(filename: "/Users/george.hodgkins/proj/clone-anduril/.venv/lib/python3.10/site-packages/guppylang/std/quantum/__init__.py", directory: "") +!13 = !DISubroutineType(types: !14) +!14 = !{null, !15} +!15 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ ptr, ptr, i64 }", file: !2, size: 24, align: 8, elements: !16) +!16 = !{!17, !17, !18} +!17 = !DIBasicType(name: "ptr", size: 64, encoding: DW_ATE_address) +!18 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!19 = distinct !DILocation(line: 390, column: 15, scope: !11, inlinedAt: !20) +!20 = distinct !DILocation(line: 94, column: 8, scope: !4) +!21 = !DILocation(line: 391, column: 20, scope: !11, inlinedAt: !22) +!22 = distinct !DILocation(line: 391, column: 20, scope: !11, inlinedAt: !20) +!23 = !DILocation(line: 391, column: 20, scope: !11, inlinedAt: !20) +!24 = !DILocation(line: 391, column: 12, scope: !11, inlinedAt: !20) +!25 = !DILocation(line: 392, column: 4, scope: !11, inlinedAt: !26) +!26 = distinct !DILocation(line: 392, column: 4, scope: !11, inlinedAt: !20) +!27 = !DILocation(line: 392, column: 4, scope: !11, inlinedAt: !20) +!28 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !29, type: !30, spFlags: DISPFlagDefinition, unit: !1) +!29 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") +!30 = !DISubroutineType(types: !31) +!31 = !{!18, !18} +!32 = !DILocation(line: 0, scope: !28) diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-flip_some/flip_some_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-flip_some/flip_some_x86_64-apple-darwin index 692aab40e..734caf448 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-flip_some/flip_some_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-flip_some/flip_some_x86_64-apple-darwin @@ -9,6 +9,74 @@ target triple = "x86_64-apple-darwin" @res_c3.B223E16D.0 = private constant [13 x i8] c"\0CUSER:BOOL:c3" @"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." +define void @"__hugr__.__main__.flip_some..main.1"() local_unnamed_addr !dbg !4 { +alloca_block: + %qalloc.i = tail call i64 @___qalloc(), !dbg !8 + %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 + br i1 %not_max.not.not.i, label %cond_40_case_0.i, label %__hugr__.__tk2_qalloc.36.exit, !dbg !8 + +cond_40_case_0.i: ; preds = %alloca_block + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + unreachable, !dbg !8 + +__hugr__.__tk2_qalloc.36.exit: ; preds = %alloca_block + tail call void @___reset(i64 %qalloc.i), !dbg !8 + tail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00), !dbg !9 + %qalloc.i101 = tail call i64 @___qalloc(), !dbg !10 + %not_max.not.not.i102 = icmp eq i64 %qalloc.i101, -1, !dbg !10 + br i1 %not_max.not.not.i102, label %cond_54_case_0.i, label %__hugr__.__tk2_qalloc.50.exit, !dbg !10 + +cond_54_case_0.i: ; preds = %__hugr__.__tk2_qalloc.36.exit + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !10 + unreachable, !dbg !10 + +__hugr__.__tk2_qalloc.50.exit: ; preds = %__hugr__.__tk2_qalloc.36.exit + tail call void @___reset(i64 %qalloc.i101), !dbg !10 + %qalloc.i103 = tail call i64 @___qalloc(), !dbg !11 + %not_max.not.not.i104 = icmp eq i64 %qalloc.i103, -1, !dbg !11 + br i1 %not_max.not.not.i104, label %cond_68_case_0.i, label %__hugr__.__tk2_qalloc.64.exit, !dbg !11 + +cond_68_case_0.i: ; preds = %__hugr__.__tk2_qalloc.50.exit + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !11 + unreachable, !dbg !11 + +__hugr__.__tk2_qalloc.64.exit: ; preds = %__hugr__.__tk2_qalloc.50.exit + tail call void @___reset(i64 %qalloc.i103), !dbg !11 + tail call void @___rxy(i64 %qalloc.i103, double 0x400921FB54442D18, double 0.000000e+00), !dbg !12 + %qalloc.i105 = tail call i64 @___qalloc(), !dbg !13 + %not_max.not.not.i106 = icmp eq i64 %qalloc.i105, -1, !dbg !13 + br i1 %not_max.not.not.i106, label %cond_82_case_0.i, label %__hugr__.__tk2_qalloc.78.exit, !dbg !13 + +cond_82_case_0.i: ; preds = %__hugr__.__tk2_qalloc.64.exit + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !13 + unreachable, !dbg !13 + +__hugr__.__tk2_qalloc.78.exit: ; preds = %__hugr__.__tk2_qalloc.64.exit + tail call void @___reset(i64 %qalloc.i105), !dbg !13 + %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) + tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool), !dbg !14 + %lazy_measure22 = tail call i64 @___lazy_measure(i64 %qalloc.i101) + tail call void @___qfree(i64 %qalloc.i101) + %read_bool35 = 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_c1.1F7A6571.0, i64 12, i1 %read_bool35), !dbg !15 + %lazy_measure44 = tail call i64 @___lazy_measure(i64 %qalloc.i103) + tail call void @___qfree(i64 %qalloc.i103) + %read_bool57 = tail call i1 @___read_future_bool(i64 %lazy_measure44) + tail call void @___dec_future_refcount(i64 %lazy_measure44) + tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool57), !dbg !16 + tail call void @___rxy(i64 %qalloc.i105, double 0x400921FB54442D18, double 0.000000e+00), !dbg !17 + %lazy_measure67 = tail call i64 @___lazy_measure(i64 %qalloc.i105) + tail call void @___qfree(i64 %qalloc.i105) + %read_bool80 = tail call i1 @___read_future_bool(i64 %lazy_measure67) + tail call void @___dec_future_refcount(i64 %lazy_measure67) + tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool80), !dbg !18 + ret void +} + declare i64 @___lazy_measure(i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -28,74 +96,12 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @___rxy(i64, double, double) local_unnamed_addr -define i64 @qmain(i64 %0) local_unnamed_addr { +define i64 @qmain(i64 %0) local_unnamed_addr !dbg !19 { entry: - tail call void @setup(i64 %0) - %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.not.i.i, label %cond_40_case_0.i.i, label %__hugr__.__tk2_qalloc.36.exit.i - -cond_40_case_0.i.i: ; preds = %entry - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_qalloc.36.exit.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - tail call void @___rxy(i64 %qalloc.i.i, double 0x400921FB54442D18, double 0.000000e+00) - %qalloc.i101.i = tail call i64 @___qalloc() - %not_max.not.not.i102.i = icmp eq i64 %qalloc.i101.i, -1 - br i1 %not_max.not.not.i102.i, label %cond_54_case_0.i.i, label %__hugr__.__tk2_qalloc.50.exit.i - -cond_54_case_0.i.i: ; preds = %__hugr__.__tk2_qalloc.36.exit.i - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_qalloc.50.exit.i: ; preds = %__hugr__.__tk2_qalloc.36.exit.i - tail call void @___reset(i64 %qalloc.i101.i) - %qalloc.i103.i = tail call i64 @___qalloc() - %not_max.not.not.i104.i = icmp eq i64 %qalloc.i103.i, -1 - br i1 %not_max.not.not.i104.i, label %cond_68_case_0.i.i, label %__hugr__.__tk2_qalloc.64.exit.i - -cond_68_case_0.i.i: ; preds = %__hugr__.__tk2_qalloc.50.exit.i - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_qalloc.64.exit.i: ; preds = %__hugr__.__tk2_qalloc.50.exit.i - tail call void @___reset(i64 %qalloc.i103.i) - tail call void @___rxy(i64 %qalloc.i103.i, double 0x400921FB54442D18, double 0.000000e+00) - %qalloc.i105.i = tail call i64 @___qalloc() - %not_max.not.not.i106.i = icmp eq i64 %qalloc.i105.i, -1 - br i1 %not_max.not.not.i106.i, label %cond_82_case_0.i.i, label %__hugr__.main.1.exit - -cond_82_case_0.i.i: ; preds = %__hugr__.__tk2_qalloc.64.exit.i - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.main.1.exit: ; preds = %__hugr__.__tk2_qalloc.64.exit.i - tail call void @___reset(i64 %qalloc.i105.i) - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i.i) - tail call void @___qfree(i64 %qalloc.i.i) - %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) - tail call void @___dec_future_refcount(i64 %lazy_measure.i) - tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool.i) - %lazy_measure22.i = tail call i64 @___lazy_measure(i64 %qalloc.i101.i) - tail call void @___qfree(i64 %qalloc.i101.i) - %read_bool35.i = tail call i1 @___read_future_bool(i64 %lazy_measure22.i) - tail call void @___dec_future_refcount(i64 %lazy_measure22.i) - tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool35.i) - %lazy_measure44.i = tail call i64 @___lazy_measure(i64 %qalloc.i103.i) - tail call void @___qfree(i64 %qalloc.i103.i) - %read_bool57.i = tail call i1 @___read_future_bool(i64 %lazy_measure44.i) - tail call void @___dec_future_refcount(i64 %lazy_measure44.i) - tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool57.i) - tail call void @___rxy(i64 %qalloc.i105.i, double 0x400921FB54442D18, double 0.000000e+00) - %lazy_measure67.i = tail call i64 @___lazy_measure(i64 %qalloc.i105.i) - tail call void @___qfree(i64 %qalloc.i105.i) - %read_bool80.i = tail call i1 @___read_future_bool(i64 %lazy_measure67.i) - tail call void @___dec_future_refcount(i64 %lazy_measure67.i) - tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool80.i) - %1 = tail call i64 @teardown() - ret i64 %1 + tail call void @setup(i64 %0), !dbg !24 + tail call void @"__hugr__.__main__.flip_some..main.1"(), !dbg !24 + %1 = tail call i64 @teardown(), !dbg !24 + ret i64 %1, !dbg !24 } declare void @setup(i64) local_unnamed_addr @@ -104,6 +110,32 @@ declare i64 @teardown() local_unnamed_addr attributes #0 = { noreturn } -!name = !{!0} - -!0 = !{!"mainlib"} +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} +!name = !{!3} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v0.32.0)-v0.21.11", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "file:///Users/george.hodgkins/proj/clone-anduril") +!3 = !{!"mainlib"} +!4 = distinct !DISubprogram(name: "flip_some..main", linkageName: "__hugr__.__main__.flip_some..main.1", scope: null, file: !5, line: 74, type: !6, scopeLine: 75, spFlags: DISPFlagDefinition, unit: !1) +!5 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "") +!6 = !DISubroutineType(types: !7) +!7 = !{null} +!8 = !DILocation(line: 75, column: 20, scope: !4) +!9 = !DILocation(line: 79, column: 8, scope: !4) +!10 = !DILocation(line: 76, column: 20, scope: !4) +!11 = !DILocation(line: 77, column: 20, scope: !4) +!12 = !DILocation(line: 80, column: 8, scope: !4) +!13 = !DILocation(line: 78, column: 20, scope: !4) +!14 = !DILocation(line: 82, column: 8, scope: !4) +!15 = !DILocation(line: 83, column: 8, scope: !4) +!16 = !DILocation(line: 84, column: 8, scope: !4) +!17 = !DILocation(line: 81, column: 8, scope: !4) +!18 = !DILocation(line: 85, column: 8, scope: !4) +!19 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !20, type: !21, spFlags: DISPFlagDefinition, unit: !1) +!20 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") +!21 = !DISubroutineType(types: !22) +!22 = !{!23, !23} +!23 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!24 = !DILocation(line: 0, scope: !19) diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-measure_qb_array/measure_qb_array_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-measure_qb_array/measure_qb_array_x86_64-apple-darwin index e17eddfda..b00f92367 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-measure_qb_array/measure_qb_array_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-measure_qb_array/measure_qb_array_x86_64-apple-darwin @@ -8,6 +8,606 @@ target triple = "x86_64-apple-darwin" @"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" @"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." +define void @"__hugr__.__main__.measure_qb_array..main.1"() local_unnamed_addr !dbg !4 { +alloca_block: + %0 = tail call ptr @heap_alloc(i64 80), !dbg !8 + %1 = tail call ptr @heap_alloc(i64 8), !dbg !8 + store i64 -1, ptr %1, align 1, !dbg !8 + %qalloc.i = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !9 + br i1 %not_max.not.not.i, label %cond_299_case_0.i, label %__barray_check_bounds.exit, !dbg !9 + +cond_299_case_0.i: ; preds = %cond_exit_20.8, %cond_exit_20.7, %cond_exit_20.6, %cond_exit_20.5, %cond_exit_20.4, %cond_exit_20.3, %cond_exit_20.2, %cond_exit_20.1, %cond_exit_20, %alloca_block + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 + unreachable, !dbg !9 + +__barray_check_bounds.exit: ; preds = %alloca_block + tail call void @___reset(i64 %qalloc.i), !dbg !9 + %2 = load i64, ptr %1, align 4 + %3 = trunc i64 %2 to i1 + br i1 %3, label %cond_exit_20, 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_20: ; preds = %__barray_check_bounds.exit + %4 = and i64 %2, -2 + store i64 %4, ptr %1, align 4 + store i64 %qalloc.i, ptr %0, align 4 + %qalloc.i.1 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1, !dbg !9 + br i1 %not_max.not.not.i.1, label %cond_299_case_0.i, label %__barray_check_bounds.exit.1, !dbg !9 + +__barray_check_bounds.exit.1: ; preds = %cond_exit_20 + tail call void @___reset(i64 %qalloc.i.1), !dbg !9 + %5 = load i64, ptr %1, align 4 + %6 = and i64 %5, 2 + %.not299 = icmp eq i64 %6, 0 + br i1 %.not299, label %panic.i, label %cond_exit_20.1 + +cond_exit_20.1: ; preds = %__barray_check_bounds.exit.1 + %7 = and i64 %5, -3 + store i64 %7, ptr %1, align 4 + %8 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %qalloc.i.1, ptr %8, align 4 + %qalloc.i.2 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1, !dbg !9 + br i1 %not_max.not.not.i.2, label %cond_299_case_0.i, label %__barray_check_bounds.exit.2, !dbg !9 + +__barray_check_bounds.exit.2: ; preds = %cond_exit_20.1 + tail call void @___reset(i64 %qalloc.i.2), !dbg !9 + %9 = load i64, ptr %1, align 4 + %10 = and i64 %9, 4 + %.not300 = icmp eq i64 %10, 0 + br i1 %.not300, label %panic.i, label %cond_exit_20.2 + +cond_exit_20.2: ; preds = %__barray_check_bounds.exit.2 + %11 = and i64 %9, -5 + store i64 %11, ptr %1, align 4 + %12 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %qalloc.i.2, ptr %12, align 4 + %qalloc.i.3 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1, !dbg !9 + br i1 %not_max.not.not.i.3, label %cond_299_case_0.i, label %__barray_check_bounds.exit.3, !dbg !9 + +__barray_check_bounds.exit.3: ; preds = %cond_exit_20.2 + tail call void @___reset(i64 %qalloc.i.3), !dbg !9 + %13 = load i64, ptr %1, align 4 + %14 = and i64 %13, 8 + %.not301 = icmp eq i64 %14, 0 + br i1 %.not301, label %panic.i, label %cond_exit_20.3 + +cond_exit_20.3: ; preds = %__barray_check_bounds.exit.3 + %15 = and i64 %13, -9 + store i64 %15, ptr %1, align 4 + %16 = getelementptr inbounds nuw i8, ptr %0, i64 24 + store i64 %qalloc.i.3, ptr %16, align 4 + %qalloc.i.4 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1, !dbg !9 + br i1 %not_max.not.not.i.4, label %cond_299_case_0.i, label %__barray_check_bounds.exit.4, !dbg !9 + +__barray_check_bounds.exit.4: ; preds = %cond_exit_20.3 + tail call void @___reset(i64 %qalloc.i.4), !dbg !9 + %17 = load i64, ptr %1, align 4 + %18 = and i64 %17, 16 + %.not302 = icmp eq i64 %18, 0 + br i1 %.not302, label %panic.i, label %cond_exit_20.4 + +cond_exit_20.4: ; preds = %__barray_check_bounds.exit.4 + %19 = and i64 %17, -17 + store i64 %19, ptr %1, align 4 + %20 = getelementptr inbounds nuw i8, ptr %0, i64 32 + store i64 %qalloc.i.4, ptr %20, align 4 + %qalloc.i.5 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.5 = icmp eq i64 %qalloc.i.5, -1, !dbg !9 + br i1 %not_max.not.not.i.5, label %cond_299_case_0.i, label %__barray_check_bounds.exit.5, !dbg !9 + +__barray_check_bounds.exit.5: ; preds = %cond_exit_20.4 + tail call void @___reset(i64 %qalloc.i.5), !dbg !9 + %21 = load i64, ptr %1, align 4 + %22 = and i64 %21, 32 + %.not303 = icmp eq i64 %22, 0 + br i1 %.not303, label %panic.i, label %cond_exit_20.5 + +cond_exit_20.5: ; preds = %__barray_check_bounds.exit.5 + %23 = and i64 %21, -33 + store i64 %23, ptr %1, align 4 + %24 = getelementptr inbounds nuw i8, ptr %0, i64 40 + store i64 %qalloc.i.5, ptr %24, align 4 + %qalloc.i.6 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.6 = icmp eq i64 %qalloc.i.6, -1, !dbg !9 + br i1 %not_max.not.not.i.6, label %cond_299_case_0.i, label %__barray_check_bounds.exit.6, !dbg !9 + +__barray_check_bounds.exit.6: ; preds = %cond_exit_20.5 + tail call void @___reset(i64 %qalloc.i.6), !dbg !9 + %25 = load i64, ptr %1, align 4 + %26 = and i64 %25, 64 + %.not304 = icmp eq i64 %26, 0 + br i1 %.not304, label %panic.i, label %cond_exit_20.6 + +cond_exit_20.6: ; preds = %__barray_check_bounds.exit.6 + %27 = and i64 %25, -65 + store i64 %27, ptr %1, align 4 + %28 = getelementptr inbounds nuw i8, ptr %0, i64 48 + store i64 %qalloc.i.6, ptr %28, align 4 + %qalloc.i.7 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.7 = icmp eq i64 %qalloc.i.7, -1, !dbg !9 + br i1 %not_max.not.not.i.7, label %cond_299_case_0.i, label %__barray_check_bounds.exit.7, !dbg !9 + +__barray_check_bounds.exit.7: ; preds = %cond_exit_20.6 + tail call void @___reset(i64 %qalloc.i.7), !dbg !9 + %29 = load i64, ptr %1, align 4 + %30 = and i64 %29, 128 + %.not305 = icmp eq i64 %30, 0 + br i1 %.not305, label %panic.i, label %cond_exit_20.7 + +cond_exit_20.7: ; preds = %__barray_check_bounds.exit.7 + %31 = and i64 %29, -129 + store i64 %31, ptr %1, align 4 + %32 = getelementptr inbounds nuw i8, ptr %0, i64 56 + store i64 %qalloc.i.7, ptr %32, align 4 + %qalloc.i.8 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.8 = icmp eq i64 %qalloc.i.8, -1, !dbg !9 + br i1 %not_max.not.not.i.8, label %cond_299_case_0.i, label %__barray_check_bounds.exit.8, !dbg !9 + +__barray_check_bounds.exit.8: ; preds = %cond_exit_20.7 + tail call void @___reset(i64 %qalloc.i.8), !dbg !9 + %33 = load i64, ptr %1, align 4 + %34 = and i64 %33, 256 + %.not306 = icmp eq i64 %34, 0 + br i1 %.not306, label %panic.i, label %cond_exit_20.8 + +cond_exit_20.8: ; preds = %__barray_check_bounds.exit.8 + %35 = and i64 %33, -257 + store i64 %35, ptr %1, align 4 + %36 = getelementptr inbounds nuw i8, ptr %0, i64 64 + store i64 %qalloc.i.8, ptr %36, align 4 + %qalloc.i.9 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.9 = icmp eq i64 %qalloc.i.9, -1, !dbg !9 + br i1 %not_max.not.not.i.9, label %cond_299_case_0.i, label %__barray_check_bounds.exit.9, !dbg !9 + +__barray_check_bounds.exit.9: ; preds = %cond_exit_20.8 + tail call void @___reset(i64 %qalloc.i.9), !dbg !9 + %37 = load i64, ptr %1, align 4 + %38 = and i64 %37, 512 + %.not307 = icmp eq i64 %38, 0 + br i1 %.not307, label %panic.i, label %cond_exit_20.9 + +cond_exit_20.9: ; preds = %__barray_check_bounds.exit.9 + %39 = and i64 %37, -513 + store i64 %39, ptr %1, align 4 + %40 = getelementptr inbounds nuw i8, ptr %0, i64 72 + store i64 %qalloc.i.9, ptr %40, align 4 + %"116.fca.0.insert" = insertvalue { ptr, ptr, i64 } poison, ptr %0, 0 + %"116.fca.1.insert" = insertvalue { ptr, ptr, i64 } %"116.fca.0.insert", ptr %1, 1 + %"116.fca.2.insert" = insertvalue { ptr, ptr, i64 } %"116.fca.1.insert", i64 0, 2 + %41 = load i64, ptr %1, align 4, !dbg !10 + %42 = trunc i64 %41 to i1, !dbg !10 + br i1 %42, label %panic.i238, label %__barray_mask_borrow.exit, !dbg !10 + +panic.i238: ; preds = %cond_exit_20.9 + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !10 + unreachable, !dbg !10 + +__barray_mask_borrow.exit: ; preds = %cond_exit_20.9 + %43 = or disjoint i64 %41, 1, !dbg !10 + store i64 %43, ptr %1, align 4, !dbg !10 + %44 = load i64, ptr %0, align 4, !dbg !12 + tail call void @___rxy(i64 %44, double 0x400921FB54442D18, double 0.000000e+00), !dbg !13 + %45 = load i64, ptr %1, align 4, !dbg !12 + %46 = trunc i64 %45 to i1, !dbg !12 + br i1 %46, label %__barray_mask_return.exit240, label %panic.i239, !dbg !12 + +panic.i239: ; preds = %__barray_mask_borrow.exit + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !12 + unreachable, !dbg !12 + +__barray_mask_return.exit240: ; preds = %__barray_mask_borrow.exit + %47 = and i64 %45, -2, !dbg !12 + store i64 %47, ptr %1, align 4, !dbg !12 + store i64 %44, ptr %0, align 4, !dbg !12 + %48 = load i64, ptr %1, align 4, !dbg !14 + %49 = and i64 %48, 4, !dbg !14 + %.not = icmp eq i64 %49, 0, !dbg !14 + br i1 %.not, label %__barray_mask_borrow.exit242, label %panic.i241, !dbg !14 + +panic.i241: ; preds = %__barray_mask_return.exit240 + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !14 + unreachable, !dbg !14 + +__barray_mask_borrow.exit242: ; preds = %__barray_mask_return.exit240 + %50 = or disjoint i64 %48, 4, !dbg !14 + store i64 %50, ptr %1, align 4, !dbg !14 + %51 = getelementptr inbounds nuw i8, ptr %0, i64 16, !dbg !16 + %52 = load i64, ptr %51, align 4, !dbg !16 + tail call void @___rxy(i64 %52, double 0x400921FB54442D18, double 0.000000e+00), !dbg !17 + %53 = load i64, ptr %1, align 4, !dbg !16 + %54 = and i64 %53, 4, !dbg !16 + %.not268 = icmp eq i64 %54, 0, !dbg !16 + br i1 %.not268, label %panic.i243, label %__barray_mask_return.exit244, !dbg !16 + +panic.i243: ; preds = %__barray_mask_borrow.exit242 + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !16 + unreachable, !dbg !16 + +__barray_mask_return.exit244: ; preds = %__barray_mask_borrow.exit242 + %55 = and i64 %53, -5, !dbg !16 + store i64 %55, ptr %1, align 4, !dbg !16 + store i64 %52, ptr %51, align 4, !dbg !16 + %56 = load i64, ptr %1, align 4, !dbg !18 + %57 = and i64 %56, 8, !dbg !18 + %.not269 = icmp eq i64 %57, 0, !dbg !18 + br i1 %.not269, label %__barray_mask_borrow.exit246, label %panic.i245, !dbg !18 + +panic.i245: ; preds = %__barray_mask_return.exit244 + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !18 + unreachable, !dbg !18 + +__barray_mask_borrow.exit246: ; preds = %__barray_mask_return.exit244 + %58 = or disjoint i64 %56, 8, !dbg !18 + store i64 %58, ptr %1, align 4, !dbg !18 + %59 = getelementptr inbounds nuw i8, ptr %0, i64 24, !dbg !20 + %60 = load i64, ptr %59, align 4, !dbg !20 + tail call void @___rxy(i64 %60, double 0x400921FB54442D18, double 0.000000e+00), !dbg !21 + %61 = load i64, ptr %1, align 4, !dbg !20 + %62 = and i64 %61, 8, !dbg !20 + %.not270 = icmp eq i64 %62, 0, !dbg !20 + br i1 %.not270, label %panic.i247, label %__barray_mask_return.exit248, !dbg !20 + +panic.i247: ; preds = %__barray_mask_borrow.exit246 + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !20 + unreachable, !dbg !20 + +__barray_mask_return.exit248: ; preds = %__barray_mask_borrow.exit246 + %63 = and i64 %61, -9, !dbg !20 + store i64 %63, ptr %1, align 4, !dbg !20 + store i64 %60, ptr %59, align 4, !dbg !20 + %64 = load i64, ptr %1, align 4, !dbg !22 + %65 = and i64 %64, 512, !dbg !22 + %.not271 = icmp eq i64 %65, 0, !dbg !22 + br i1 %.not271, label %__barray_mask_borrow.exit250, label %panic.i249, !dbg !22 + +panic.i249: ; preds = %__barray_mask_return.exit248 + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !22 + unreachable, !dbg !22 + +__barray_mask_borrow.exit250: ; preds = %__barray_mask_return.exit248 + %66 = or disjoint i64 %64, 512, !dbg !22 + store i64 %66, ptr %1, align 4, !dbg !22 + %67 = getelementptr inbounds nuw i8, ptr %0, i64 72, !dbg !24 + %68 = load i64, ptr %67, align 4, !dbg !24 + tail call void @___rxy(i64 %68, double 0x400921FB54442D18, double 0.000000e+00), !dbg !25 + %69 = load i64, ptr %1, align 4, !dbg !24 + %70 = and i64 %69, 512, !dbg !24 + %.not272 = icmp eq i64 %70, 0, !dbg !24 + br i1 %.not272, label %panic.i251, label %__barray_mask_return.exit252, !dbg !24 + +panic.i251: ; preds = %__barray_mask_borrow.exit250 + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !24 + unreachable, !dbg !24 + +__barray_mask_return.exit252: ; preds = %__barray_mask_borrow.exit250 + %71 = and i64 %69, -513, !dbg !24 + store i64 %71, ptr %1, align 4, !dbg !24 + store i64 %68, ptr %67, align 4, !dbg !24 + %72 = insertvalue { { ptr, ptr, i64 }, i64 } poison, { ptr, ptr, i64 } %"116.fca.2.insert", 0, !dbg !26 + %73 = tail call ptr @heap_alloc(i64 240), !dbg !43 + %74 = tail call ptr @heap_alloc(i64 8), !dbg !43 + store i64 -1, ptr %74, align 1, !dbg !43 + br label %__barray_check_bounds.exit.i.i + +75: ; preds = %loop_body.i + %76 = lshr i64 %.fca.2.extract82.i.i, 6, !dbg !44 + %77 = getelementptr i64, ptr %.fca.1.extract81.i.i, i64 %76, !dbg !44 + %78 = load i64, ptr %77, align 4, !dbg !44 + %79 = and i64 %.fca.2.extract82.i.i, 63, !dbg !44 + %80 = sub nuw nsw i64 64, %79, !dbg !44 + %81 = lshr i64 -1, %80, !dbg !44 + %82 = icmp eq i64 %79, 0, !dbg !44 + %83 = select i1 %82, i64 0, i64 %81, !dbg !44 + %84 = or i64 %78, %83, !dbg !44 + store i64 %84, ptr %77, align 4, !dbg !44 + %last_valid.i.i.i = add i64 %.fca.2.extract82.i.i, 9, !dbg !44 + %85 = lshr i64 %last_valid.i.i.i, 6, !dbg !44 + %86 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i.i, i64 %85, !dbg !44 + %87 = load i64, ptr %86, align 4, !dbg !44 + %88 = and i64 %last_valid.i.i.i, 63, !dbg !44 + %89 = shl nsw i64 -2, %88, !dbg !44 + %90 = icmp eq i64 %88, 63, !dbg !44 + %91 = select i1 %90, i64 0, i64 %89, !dbg !44 + %92 = or i64 %87, %91, !dbg !44 + store i64 %92, ptr %86, align 4, !dbg !44 + %reass.sub.i.i.i = sub nsw i64 %85, %76, !dbg !44 + %.not.i.i.i = icmp eq i64 %reass.sub.i.i.i, -1, !dbg !44 + br i1 %.not.i.i.i, label %"__hugr__.guppylang.std.quantum.measure_array$10.149.exit", label %mask_block_ok.i.i.i, !dbg !44 + +93: ; preds = %mask_block_ok.i.i.i + %94 = add nuw i64 %.02.i.i.i, 1, !dbg !44 + %exitcond.not.i.i.i = icmp eq i64 %.02.i.i.i, %reass.sub.i.i.i, !dbg !44 + br i1 %exitcond.not.i.i.i, label %"__hugr__.guppylang.std.quantum.measure_array$10.149.exit", label %mask_block_ok.i.i.i, !dbg !44 + +mask_block_ok.i.i.i: ; preds = %75, %93 + %.02.i.i.i = phi i64 [ %94, %93 ], [ 0, %75 ], !dbg !44 + %gep.i.i.i = getelementptr i64, ptr %77, i64 %.02.i.i.i, !dbg !44 + %95 = load i64, ptr %gep.i.i.i, align 4, !dbg !44 + %96 = icmp eq i64 %95, -1, !dbg !44 + br i1 %96, label %93, label %mask_block_err.i.i.i, !dbg !44 + +mask_block_err.i.i.i: ; preds = %mask_block_ok.i.i.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0"), !dbg !44 + unreachable, !dbg !44 + +__barray_check_bounds.exit.i.i: ; preds = %loop_body.i, %__barray_mask_return.exit252 + %.fca.2.extract82.i187.i = phi i64 [ 0, %__barray_mask_return.exit252 ], [ %.fca.2.extract82.i.i, %loop_body.i ] + %.fca.1.extract81.i186.i = phi ptr [ %1, %__barray_mask_return.exit252 ], [ %.fca.1.extract81.i.i, %loop_body.i ] + %.fca.0.extract80.i185.i = phi ptr [ %0, %__barray_mask_return.exit252 ], [ %.fca.0.extract80.i.i, %loop_body.i ] + %"163_0.sroa.15.0184.i" = phi i64 [ 0, %__barray_mask_return.exit252 ], [ %97, %loop_body.i ] + %.pn165183.i = phi { { ptr, ptr, i64 }, i64 } [ %72, %__barray_mask_return.exit252 ], [ %112, %loop_body.i ] + %97 = add nuw nsw i64 %"163_0.sroa.15.0184.i", 1, !dbg !54 + %98 = add i64 %"163_0.sroa.15.0184.i", %.fca.2.extract82.i187.i, !dbg !55 + %99 = lshr i64 %98, 6, !dbg !56 + %100 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i186.i, i64 %99, !dbg !56 + %101 = load i64, ptr %100, align 4, !dbg !56 + %102 = and i64 %98, 63, !dbg !56 + %103 = lshr i64 %101, %102, !dbg !56 + %104 = trunc i64 %103 to i1, !dbg !56 + br i1 %104, label %panic.i.i.i, label %__barray_check_bounds.exit.i, !dbg !56 + +panic.i.i.i: ; preds = %__barray_check_bounds.exit.i.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !56 + unreachable, !dbg !56 + +__barray_check_bounds.exit.i: ; preds = %__barray_check_bounds.exit.i.i + %105 = shl nuw i64 1, %102, !dbg !56 + %106 = xor i64 %105, %101, !dbg !56 + store i64 %106, ptr %100, align 4, !dbg !56 + %107 = getelementptr inbounds i64, ptr %.fca.0.extract80.i185.i, i64 %98, !dbg !55 + %108 = load i64, ptr %107, align 4, !dbg !55 + %lazy_measure.i = tail call i64 @___lazy_measure(i64 %108) + tail call void @___qfree(i64 %108) + %109 = load i64, ptr %74, align 4 + %110 = lshr i64 %109, %"163_0.sroa.15.0184.i" + %111 = trunc i64 %110 to i1 + br i1 %111, label %loop_body.i, label %panic.i.i + +panic.i.i: ; preds = %__barray_check_bounds.exit.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") + unreachable + +loop_body.i: ; preds = %__barray_check_bounds.exit.i + %"182_054.fca.1.insert.i" = insertvalue { i1, i64, i1 } { i1 true, i64 poison, i1 undef }, i64 %lazy_measure.i, 1 + %"182_054.fca.2.insert.i" = insertvalue { i1, i64, i1 } %"182_054.fca.1.insert.i", i1 undef, 2 + %112 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn165183.i, i64 %97, 1 + %113 = shl nuw nsw i64 1, %"163_0.sroa.15.0184.i" + %114 = xor i64 %109, %113 + store i64 %114, ptr %74, align 4 + %115 = getelementptr inbounds nuw { i1, i64, i1 }, ptr %73, i64 %"163_0.sroa.15.0184.i" + store { i1, i64, i1 } %"182_054.fca.2.insert.i", ptr %115, align 4 + %116 = extractvalue { { ptr, ptr, i64 }, i64 } %.pn165183.i, 0 + %.fca.0.extract80.i.i = extractvalue { ptr, ptr, i64 } %116, 0 + %.fca.1.extract81.i.i = extractvalue { ptr, ptr, i64 } %116, 1 + %.fca.2.extract82.i.i = extractvalue { ptr, ptr, i64 } %116, 2 + %exitcond.not.i = icmp eq i64 %97, 10, !dbg !58 + br i1 %exitcond.not.i, label %75, label %__barray_check_bounds.exit.i.i + +"__hugr__.guppylang.std.quantum.measure_array$10.149.exit": ; preds = %93, %75 + tail call void @heap_free(ptr %.fca.0.extract80.i.i), !dbg !44 + tail call void @heap_free(ptr nonnull %.fca.1.extract81.i.i), !dbg !44 + %117 = load i64, ptr %74, align 4 + %118 = trunc i64 %117 to i1 + br i1 %118, label %cond_exit_369.thread, label %__barray_mask_borrow.exit259 + +cond_exit_369: ; preds = %cond_exit_369.thread.9 + tail call void @heap_free(ptr %73) + tail call void @heap_free(ptr nonnull %74) + ret void + +mask_block_err.i: ; preds = %cond_exit_369.thread.9 + tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") + unreachable + +__barray_mask_borrow.exit259: ; preds = %"__hugr__.guppylang.std.quantum.measure_array$10.149.exit" + %119 = or disjoint i64 %117, 1, !dbg !12 + store i64 %119, ptr %74, align 4, !dbg !12 + %120 = load { i1, i64, i1 }, ptr %73, align 4 + %.fca.0.extract167 = extractvalue { i1, i64, i1 } %120, 0 + br i1 %.fca.0.extract167, label %cond_392_case_1, label %cond_exit_369.thread + +cond_exit_369.thread: ; preds = %cond_392_case_1, %__barray_mask_borrow.exit259, %"__hugr__.guppylang.std.quantum.measure_array$10.149.exit" + %121 = phi i64 [ %.pre, %cond_392_case_1 ], [ %119, %__barray_mask_borrow.exit259 ], [ %117, %"__hugr__.guppylang.std.quantum.measure_array$10.149.exit" ] + %122 = and i64 %121, 2 + %.not290 = icmp eq i64 %122, 0 + br i1 %.not290, label %__barray_mask_borrow.exit259.1, label %cond_exit_369.thread.1 + +__barray_mask_borrow.exit259.1: ; preds = %cond_exit_369.thread + %123 = or disjoint i64 %121, 2, !dbg !12 + store i64 %123, ptr %74, align 4, !dbg !12 + %124 = getelementptr inbounds nuw i8, ptr %73, i64 24 + %125 = load { i1, i64, i1 }, ptr %124, align 4 + %.fca.0.extract167.1 = extractvalue { i1, i64, i1 } %125, 0 + br i1 %.fca.0.extract167.1, label %cond_392_case_1.1, label %cond_exit_369.thread.1 + +cond_392_case_1.1: ; preds = %__barray_mask_borrow.exit259.1 + %.fca.1.extract.1 = extractvalue { i1, i64, i1 } %125, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.1) + %.pre281 = load i64, ptr %74, align 4 + br label %cond_exit_369.thread.1 + +cond_exit_369.thread.1: ; preds = %cond_392_case_1.1, %__barray_mask_borrow.exit259.1, %cond_exit_369.thread + %126 = phi i64 [ %.pre281, %cond_392_case_1.1 ], [ %123, %__barray_mask_borrow.exit259.1 ], [ %121, %cond_exit_369.thread ] + %127 = and i64 %126, 4 + %.not291 = icmp eq i64 %127, 0 + br i1 %.not291, label %__barray_mask_borrow.exit259.2, label %cond_exit_369.thread.2 + +__barray_mask_borrow.exit259.2: ; preds = %cond_exit_369.thread.1 + %128 = or disjoint i64 %126, 4, !dbg !12 + store i64 %128, ptr %74, align 4, !dbg !12 + %129 = getelementptr inbounds nuw i8, ptr %73, i64 48 + %130 = load { i1, i64, i1 }, ptr %129, align 4 + %.fca.0.extract167.2 = extractvalue { i1, i64, i1 } %130, 0 + br i1 %.fca.0.extract167.2, label %cond_392_case_1.2, label %cond_exit_369.thread.2 + +cond_392_case_1.2: ; preds = %__barray_mask_borrow.exit259.2 + %.fca.1.extract.2 = extractvalue { i1, i64, i1 } %130, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.2) + %.pre282 = load i64, ptr %74, align 4 + br label %cond_exit_369.thread.2 + +cond_exit_369.thread.2: ; preds = %cond_392_case_1.2, %__barray_mask_borrow.exit259.2, %cond_exit_369.thread.1 + %131 = phi i64 [ %.pre282, %cond_392_case_1.2 ], [ %128, %__barray_mask_borrow.exit259.2 ], [ %126, %cond_exit_369.thread.1 ] + %132 = and i64 %131, 8 + %.not292 = icmp eq i64 %132, 0 + br i1 %.not292, label %__barray_mask_borrow.exit259.3, label %cond_exit_369.thread.3 + +__barray_mask_borrow.exit259.3: ; preds = %cond_exit_369.thread.2 + %133 = or disjoint i64 %131, 8, !dbg !12 + store i64 %133, ptr %74, align 4, !dbg !12 + %134 = getelementptr inbounds nuw i8, ptr %73, i64 72 + %135 = load { i1, i64, i1 }, ptr %134, align 4 + %.fca.0.extract167.3 = extractvalue { i1, i64, i1 } %135, 0 + br i1 %.fca.0.extract167.3, label %cond_392_case_1.3, label %cond_exit_369.thread.3 + +cond_392_case_1.3: ; preds = %__barray_mask_borrow.exit259.3 + %.fca.1.extract.3 = extractvalue { i1, i64, i1 } %135, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.3) + %.pre283 = load i64, ptr %74, align 4 + br label %cond_exit_369.thread.3 + +cond_exit_369.thread.3: ; preds = %cond_392_case_1.3, %__barray_mask_borrow.exit259.3, %cond_exit_369.thread.2 + %136 = phi i64 [ %.pre283, %cond_392_case_1.3 ], [ %133, %__barray_mask_borrow.exit259.3 ], [ %131, %cond_exit_369.thread.2 ] + %137 = and i64 %136, 16 + %.not293 = icmp eq i64 %137, 0 + br i1 %.not293, label %__barray_mask_borrow.exit259.4, label %cond_exit_369.thread.4 + +__barray_mask_borrow.exit259.4: ; preds = %cond_exit_369.thread.3 + %138 = or disjoint i64 %136, 16, !dbg !12 + store i64 %138, ptr %74, align 4, !dbg !12 + %139 = getelementptr inbounds nuw i8, ptr %73, i64 96 + %140 = load { i1, i64, i1 }, ptr %139, align 4 + %.fca.0.extract167.4 = extractvalue { i1, i64, i1 } %140, 0 + br i1 %.fca.0.extract167.4, label %cond_392_case_1.4, label %cond_exit_369.thread.4 + +cond_392_case_1.4: ; preds = %__barray_mask_borrow.exit259.4 + %.fca.1.extract.4 = extractvalue { i1, i64, i1 } %140, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.4) + %.pre284 = load i64, ptr %74, align 4 + br label %cond_exit_369.thread.4 + +cond_exit_369.thread.4: ; preds = %cond_392_case_1.4, %__barray_mask_borrow.exit259.4, %cond_exit_369.thread.3 + %141 = phi i64 [ %.pre284, %cond_392_case_1.4 ], [ %138, %__barray_mask_borrow.exit259.4 ], [ %136, %cond_exit_369.thread.3 ] + %142 = and i64 %141, 32 + %.not294 = icmp eq i64 %142, 0 + br i1 %.not294, label %__barray_mask_borrow.exit259.5, label %cond_exit_369.thread.5 + +__barray_mask_borrow.exit259.5: ; preds = %cond_exit_369.thread.4 + %143 = or disjoint i64 %141, 32, !dbg !12 + store i64 %143, ptr %74, align 4, !dbg !12 + %144 = getelementptr inbounds nuw i8, ptr %73, i64 120 + %145 = load { i1, i64, i1 }, ptr %144, align 4 + %.fca.0.extract167.5 = extractvalue { i1, i64, i1 } %145, 0 + br i1 %.fca.0.extract167.5, label %cond_392_case_1.5, label %cond_exit_369.thread.5 + +cond_392_case_1.5: ; preds = %__barray_mask_borrow.exit259.5 + %.fca.1.extract.5 = extractvalue { i1, i64, i1 } %145, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.5) + %.pre285 = load i64, ptr %74, align 4 + br label %cond_exit_369.thread.5 + +cond_exit_369.thread.5: ; preds = %cond_392_case_1.5, %__barray_mask_borrow.exit259.5, %cond_exit_369.thread.4 + %146 = phi i64 [ %.pre285, %cond_392_case_1.5 ], [ %143, %__barray_mask_borrow.exit259.5 ], [ %141, %cond_exit_369.thread.4 ] + %147 = and i64 %146, 64 + %.not295 = icmp eq i64 %147, 0 + br i1 %.not295, label %__barray_mask_borrow.exit259.6, label %cond_exit_369.thread.6 + +__barray_mask_borrow.exit259.6: ; preds = %cond_exit_369.thread.5 + %148 = or disjoint i64 %146, 64, !dbg !12 + store i64 %148, ptr %74, align 4, !dbg !12 + %149 = getelementptr inbounds nuw i8, ptr %73, i64 144 + %150 = load { i1, i64, i1 }, ptr %149, align 4 + %.fca.0.extract167.6 = extractvalue { i1, i64, i1 } %150, 0 + br i1 %.fca.0.extract167.6, label %cond_392_case_1.6, label %cond_exit_369.thread.6 + +cond_392_case_1.6: ; preds = %__barray_mask_borrow.exit259.6 + %.fca.1.extract.6 = extractvalue { i1, i64, i1 } %150, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.6) + %.pre286 = load i64, ptr %74, align 4 + br label %cond_exit_369.thread.6 + +cond_exit_369.thread.6: ; preds = %cond_392_case_1.6, %__barray_mask_borrow.exit259.6, %cond_exit_369.thread.5 + %151 = phi i64 [ %.pre286, %cond_392_case_1.6 ], [ %148, %__barray_mask_borrow.exit259.6 ], [ %146, %cond_exit_369.thread.5 ] + %152 = and i64 %151, 128 + %.not296 = icmp eq i64 %152, 0 + br i1 %.not296, label %__barray_mask_borrow.exit259.7, label %cond_exit_369.thread.7 + +__barray_mask_borrow.exit259.7: ; preds = %cond_exit_369.thread.6 + %153 = or disjoint i64 %151, 128, !dbg !12 + store i64 %153, ptr %74, align 4, !dbg !12 + %154 = getelementptr inbounds nuw i8, ptr %73, i64 168 + %155 = load { i1, i64, i1 }, ptr %154, align 4 + %.fca.0.extract167.7 = extractvalue { i1, i64, i1 } %155, 0 + br i1 %.fca.0.extract167.7, label %cond_392_case_1.7, label %cond_exit_369.thread.7 + +cond_392_case_1.7: ; preds = %__barray_mask_borrow.exit259.7 + %.fca.1.extract.7 = extractvalue { i1, i64, i1 } %155, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.7) + %.pre287 = load i64, ptr %74, align 4 + br label %cond_exit_369.thread.7 + +cond_exit_369.thread.7: ; preds = %cond_392_case_1.7, %__barray_mask_borrow.exit259.7, %cond_exit_369.thread.6 + %156 = phi i64 [ %.pre287, %cond_392_case_1.7 ], [ %153, %__barray_mask_borrow.exit259.7 ], [ %151, %cond_exit_369.thread.6 ] + %157 = and i64 %156, 256 + %.not297 = icmp eq i64 %157, 0 + br i1 %.not297, label %__barray_mask_borrow.exit259.8, label %cond_exit_369.thread.8 + +__barray_mask_borrow.exit259.8: ; preds = %cond_exit_369.thread.7 + %158 = or disjoint i64 %156, 256, !dbg !12 + store i64 %158, ptr %74, align 4, !dbg !12 + %159 = getelementptr inbounds nuw i8, ptr %73, i64 192 + %160 = load { i1, i64, i1 }, ptr %159, align 4 + %.fca.0.extract167.8 = extractvalue { i1, i64, i1 } %160, 0 + br i1 %.fca.0.extract167.8, label %cond_392_case_1.8, label %cond_exit_369.thread.8 + +cond_392_case_1.8: ; preds = %__barray_mask_borrow.exit259.8 + %.fca.1.extract.8 = extractvalue { i1, i64, i1 } %160, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.8) + %.pre288 = load i64, ptr %74, align 4 + br label %cond_exit_369.thread.8 + +cond_exit_369.thread.8: ; preds = %cond_392_case_1.8, %__barray_mask_borrow.exit259.8, %cond_exit_369.thread.7 + %161 = phi i64 [ %.pre288, %cond_392_case_1.8 ], [ %158, %__barray_mask_borrow.exit259.8 ], [ %156, %cond_exit_369.thread.7 ] + %162 = and i64 %161, 512 + %.not298 = icmp eq i64 %162, 0 + br i1 %.not298, label %__barray_mask_borrow.exit259.9, label %cond_exit_369.thread.9 + +__barray_mask_borrow.exit259.9: ; preds = %cond_exit_369.thread.8 + %163 = or disjoint i64 %161, 512, !dbg !12 + store i64 %163, ptr %74, align 4, !dbg !12 + %164 = getelementptr inbounds nuw i8, ptr %73, i64 216 + %165 = load { i1, i64, i1 }, ptr %164, align 4 + %.fca.0.extract167.9 = extractvalue { i1, i64, i1 } %165, 0 + br i1 %.fca.0.extract167.9, label %cond_392_case_1.9, label %cond_exit_369.thread.9 + +cond_392_case_1.9: ; preds = %__barray_mask_borrow.exit259.9 + %.fca.1.extract.9 = extractvalue { i1, i64, i1 } %165, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.9) + %.pre289 = load i64, ptr %74, align 4 + br label %cond_exit_369.thread.9 + +cond_exit_369.thread.9: ; preds = %cond_392_case_1.9, %__barray_mask_borrow.exit259.9, %cond_exit_369.thread.8 + %166 = phi i64 [ %.pre289, %cond_392_case_1.9 ], [ %163, %__barray_mask_borrow.exit259.9 ], [ %161, %cond_exit_369.thread.8 ] + %167 = or i64 %166, -1024 + store i64 %167, ptr %74, align 4 + %168 = icmp eq i64 %167, -1 + br i1 %168, label %cond_exit_369, label %mask_block_err.i + +cond_392_case_1: ; preds = %__barray_mask_borrow.exit259 + %.fca.1.extract = extractvalue { i1, i64, i1 } %120, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract) + %.pre = load i64, ptr %74, align 4 + br label %cond_exit_369.thread +} + declare ptr @heap_alloc(i64) local_unnamed_addr ; Function Attrs: noreturn @@ -27,603 +627,12 @@ declare i64 @___qalloc() local_unnamed_addr declare void @___reset(i64) local_unnamed_addr -define i64 @qmain(i64 %0) local_unnamed_addr { +define i64 @qmain(i64 %0) local_unnamed_addr !dbg !59 { entry: - tail call void @setup(i64 %0) - %1 = tail call ptr @heap_alloc(i64 80) - %2 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %2, align 1 - %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.not.i.i, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i - -cond_207_case_0.i.i: ; preds = %cond_exit_20.i.8, %cond_exit_20.i.7, %cond_exit_20.i.6, %cond_exit_20.i.5, %cond_exit_20.i.4, %cond_exit_20.i.3, %cond_exit_20.i.2, %cond_exit_20.i.1, %cond_exit_20.i, %entry - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__barray_check_bounds.exit.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - %3 = load i64, ptr %2, align 4 - %4 = trunc i64 %3 to i1 - br i1 %4, label %cond_exit_20.i, label %panic.i.i - -panic.i.i: ; preds = %__barray_check_bounds.exit.i.9, %__barray_check_bounds.exit.i.8, %__barray_check_bounds.exit.i.7, %__barray_check_bounds.exit.i.6, %__barray_check_bounds.exit.i.5, %__barray_check_bounds.exit.i.4, %__barray_check_bounds.exit.i.3, %__barray_check_bounds.exit.i.2, %__barray_check_bounds.exit.i.1, %__barray_check_bounds.exit.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_exit_20.i: ; preds = %__barray_check_bounds.exit.i - %5 = and i64 %3, -2 - store i64 %5, ptr %2, align 4 - store i64 %qalloc.i.i, ptr %1, align 4 - %qalloc.i.i.1 = tail call i64 @___qalloc() - %not_max.not.not.i.i.1 = icmp eq i64 %qalloc.i.i.1, -1 - br i1 %not_max.not.not.i.i.1, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.1 - -__barray_check_bounds.exit.i.1: ; preds = %cond_exit_20.i - tail call void @___reset(i64 %qalloc.i.i.1) - %6 = load i64, ptr %2, align 4 - %7 = and i64 %6, 2 - %.not = icmp eq i64 %7, 0 - br i1 %.not, label %panic.i.i, label %cond_exit_20.i.1 - -cond_exit_20.i.1: ; preds = %__barray_check_bounds.exit.i.1 - %8 = and i64 %6, -3 - store i64 %8, ptr %2, align 4 - %9 = getelementptr inbounds nuw i8, ptr %1, i64 8 - store i64 %qalloc.i.i.1, ptr %9, align 4 - %qalloc.i.i.2 = tail call i64 @___qalloc() - %not_max.not.not.i.i.2 = icmp eq i64 %qalloc.i.i.2, -1 - br i1 %not_max.not.not.i.i.2, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.2 - -__barray_check_bounds.exit.i.2: ; preds = %cond_exit_20.i.1 - tail call void @___reset(i64 %qalloc.i.i.2) - %10 = load i64, ptr %2, align 4 - %11 = and i64 %10, 4 - %.not1 = icmp eq i64 %11, 0 - br i1 %.not1, label %panic.i.i, label %cond_exit_20.i.2 - -cond_exit_20.i.2: ; preds = %__barray_check_bounds.exit.i.2 - %12 = and i64 %10, -5 - store i64 %12, ptr %2, align 4 - %13 = getelementptr inbounds nuw i8, ptr %1, i64 16 - store i64 %qalloc.i.i.2, ptr %13, align 4 - %qalloc.i.i.3 = tail call i64 @___qalloc() - %not_max.not.not.i.i.3 = icmp eq i64 %qalloc.i.i.3, -1 - br i1 %not_max.not.not.i.i.3, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.3 - -__barray_check_bounds.exit.i.3: ; preds = %cond_exit_20.i.2 - tail call void @___reset(i64 %qalloc.i.i.3) - %14 = load i64, ptr %2, align 4 - %15 = and i64 %14, 8 - %.not2 = icmp eq i64 %15, 0 - br i1 %.not2, label %panic.i.i, label %cond_exit_20.i.3 - -cond_exit_20.i.3: ; preds = %__barray_check_bounds.exit.i.3 - %16 = and i64 %14, -9 - store i64 %16, ptr %2, align 4 - %17 = getelementptr inbounds nuw i8, ptr %1, i64 24 - store i64 %qalloc.i.i.3, ptr %17, align 4 - %qalloc.i.i.4 = tail call i64 @___qalloc() - %not_max.not.not.i.i.4 = icmp eq i64 %qalloc.i.i.4, -1 - br i1 %not_max.not.not.i.i.4, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.4 - -__barray_check_bounds.exit.i.4: ; preds = %cond_exit_20.i.3 - tail call void @___reset(i64 %qalloc.i.i.4) - %18 = load i64, ptr %2, align 4 - %19 = and i64 %18, 16 - %.not3 = icmp eq i64 %19, 0 - br i1 %.not3, label %panic.i.i, label %cond_exit_20.i.4 - -cond_exit_20.i.4: ; preds = %__barray_check_bounds.exit.i.4 - %20 = and i64 %18, -17 - store i64 %20, ptr %2, align 4 - %21 = getelementptr inbounds nuw i8, ptr %1, i64 32 - store i64 %qalloc.i.i.4, ptr %21, align 4 - %qalloc.i.i.5 = tail call i64 @___qalloc() - %not_max.not.not.i.i.5 = icmp eq i64 %qalloc.i.i.5, -1 - br i1 %not_max.not.not.i.i.5, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.5 - -__barray_check_bounds.exit.i.5: ; preds = %cond_exit_20.i.4 - tail call void @___reset(i64 %qalloc.i.i.5) - %22 = load i64, ptr %2, align 4 - %23 = and i64 %22, 32 - %.not4 = icmp eq i64 %23, 0 - br i1 %.not4, label %panic.i.i, label %cond_exit_20.i.5 - -cond_exit_20.i.5: ; preds = %__barray_check_bounds.exit.i.5 - %24 = and i64 %22, -33 - store i64 %24, ptr %2, align 4 - %25 = getelementptr inbounds nuw i8, ptr %1, i64 40 - store i64 %qalloc.i.i.5, ptr %25, align 4 - %qalloc.i.i.6 = tail call i64 @___qalloc() - %not_max.not.not.i.i.6 = icmp eq i64 %qalloc.i.i.6, -1 - br i1 %not_max.not.not.i.i.6, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.6 - -__barray_check_bounds.exit.i.6: ; preds = %cond_exit_20.i.5 - tail call void @___reset(i64 %qalloc.i.i.6) - %26 = load i64, ptr %2, align 4 - %27 = and i64 %26, 64 - %.not5 = icmp eq i64 %27, 0 - br i1 %.not5, label %panic.i.i, label %cond_exit_20.i.6 - -cond_exit_20.i.6: ; preds = %__barray_check_bounds.exit.i.6 - %28 = and i64 %26, -65 - store i64 %28, ptr %2, align 4 - %29 = getelementptr inbounds nuw i8, ptr %1, i64 48 - store i64 %qalloc.i.i.6, ptr %29, align 4 - %qalloc.i.i.7 = tail call i64 @___qalloc() - %not_max.not.not.i.i.7 = icmp eq i64 %qalloc.i.i.7, -1 - br i1 %not_max.not.not.i.i.7, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.7 - -__barray_check_bounds.exit.i.7: ; preds = %cond_exit_20.i.6 - tail call void @___reset(i64 %qalloc.i.i.7) - %30 = load i64, ptr %2, align 4 - %31 = and i64 %30, 128 - %.not6 = icmp eq i64 %31, 0 - br i1 %.not6, label %panic.i.i, label %cond_exit_20.i.7 - -cond_exit_20.i.7: ; preds = %__barray_check_bounds.exit.i.7 - %32 = and i64 %30, -129 - store i64 %32, ptr %2, align 4 - %33 = getelementptr inbounds nuw i8, ptr %1, i64 56 - store i64 %qalloc.i.i.7, ptr %33, align 4 - %qalloc.i.i.8 = tail call i64 @___qalloc() - %not_max.not.not.i.i.8 = icmp eq i64 %qalloc.i.i.8, -1 - br i1 %not_max.not.not.i.i.8, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.8 - -__barray_check_bounds.exit.i.8: ; preds = %cond_exit_20.i.7 - tail call void @___reset(i64 %qalloc.i.i.8) - %34 = load i64, ptr %2, align 4 - %35 = and i64 %34, 256 - %.not7 = icmp eq i64 %35, 0 - br i1 %.not7, label %panic.i.i, label %cond_exit_20.i.8 - -cond_exit_20.i.8: ; preds = %__barray_check_bounds.exit.i.8 - %36 = and i64 %34, -257 - store i64 %36, ptr %2, align 4 - %37 = getelementptr inbounds nuw i8, ptr %1, i64 64 - store i64 %qalloc.i.i.8, ptr %37, align 4 - %qalloc.i.i.9 = tail call i64 @___qalloc() - %not_max.not.not.i.i.9 = icmp eq i64 %qalloc.i.i.9, -1 - br i1 %not_max.not.not.i.i.9, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.9 - -__barray_check_bounds.exit.i.9: ; preds = %cond_exit_20.i.8 - tail call void @___reset(i64 %qalloc.i.i.9) - %38 = load i64, ptr %2, align 4 - %39 = and i64 %38, 512 - %.not8 = icmp eq i64 %39, 0 - br i1 %.not8, label %panic.i.i, label %cond_exit_20.i.9 - -cond_exit_20.i.9: ; preds = %__barray_check_bounds.exit.i.9 - %40 = and i64 %38, -513 - store i64 %40, ptr %2, align 4 - %41 = getelementptr inbounds nuw i8, ptr %1, i64 72 - store i64 %qalloc.i.i.9, ptr %41, align 4 - %"116.fca.0.insert.i" = insertvalue { ptr, ptr, i64 } poison, ptr %1, 0 - %"116.fca.1.insert.i" = insertvalue { ptr, ptr, i64 } %"116.fca.0.insert.i", ptr %2, 1 - %"116.fca.2.insert.i" = insertvalue { ptr, ptr, i64 } %"116.fca.1.insert.i", i64 0, 2 - %42 = load i64, ptr %2, align 4 - %43 = trunc i64 %42 to i1 - br i1 %43, label %panic.i238.i, label %__barray_mask_borrow.exit.i - -panic.i238.i: ; preds = %cond_exit_20.i.9 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit.i: ; preds = %cond_exit_20.i.9 - %44 = or disjoint i64 %42, 1 - store i64 %44, ptr %2, align 4 - %45 = load i64, ptr %1, align 4 - tail call void @___rxy(i64 %45, double 0x400921FB54442D18, double 0.000000e+00) - %46 = load i64, ptr %2, align 4 - %47 = trunc i64 %46 to i1 - br i1 %47, label %__barray_mask_return.exit240.i, label %panic.i239.i - -panic.i239.i: ; preds = %__barray_mask_borrow.exit.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit240.i: ; preds = %__barray_mask_borrow.exit.i - %48 = and i64 %46, -2 - store i64 %48, ptr %2, align 4 - store i64 %45, ptr %1, align 4 - %49 = load i64, ptr %2, align 4 - %50 = and i64 %49, 4 - %.not.i = icmp eq i64 %50, 0 - br i1 %.not.i, label %__barray_mask_borrow.exit242.i, label %panic.i241.i - -panic.i241.i: ; preds = %__barray_mask_return.exit240.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit242.i: ; preds = %__barray_mask_return.exit240.i - %51 = or disjoint i64 %49, 4 - store i64 %51, ptr %2, align 4 - %52 = load i64, ptr %13, align 4 - tail call void @___rxy(i64 %52, double 0x400921FB54442D18, double 0.000000e+00) - %53 = load i64, ptr %2, align 4 - %54 = and i64 %53, 4 - %.not268.i = icmp eq i64 %54, 0 - br i1 %.not268.i, label %panic.i243.i, label %__barray_mask_return.exit244.i - -panic.i243.i: ; preds = %__barray_mask_borrow.exit242.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit244.i: ; preds = %__barray_mask_borrow.exit242.i - %55 = and i64 %53, -5 - store i64 %55, ptr %2, align 4 - store i64 %52, ptr %13, align 4 - %56 = load i64, ptr %2, align 4 - %57 = and i64 %56, 8 - %.not269.i = icmp eq i64 %57, 0 - br i1 %.not269.i, label %__barray_mask_borrow.exit246.i, label %panic.i245.i - -panic.i245.i: ; preds = %__barray_mask_return.exit244.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit246.i: ; preds = %__barray_mask_return.exit244.i - %58 = or disjoint i64 %56, 8 - store i64 %58, ptr %2, align 4 - %59 = load i64, ptr %17, align 4 - tail call void @___rxy(i64 %59, double 0x400921FB54442D18, double 0.000000e+00) - %60 = load i64, ptr %2, align 4 - %61 = and i64 %60, 8 - %.not270.i = icmp eq i64 %61, 0 - br i1 %.not270.i, label %panic.i247.i, label %__barray_mask_return.exit248.i - -panic.i247.i: ; preds = %__barray_mask_borrow.exit246.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit248.i: ; preds = %__barray_mask_borrow.exit246.i - %62 = and i64 %60, -9 - store i64 %62, ptr %2, align 4 - store i64 %59, ptr %17, align 4 - %63 = load i64, ptr %2, align 4 - %64 = and i64 %63, 512 - %.not271.i = icmp eq i64 %64, 0 - br i1 %.not271.i, label %__barray_mask_borrow.exit250.i, label %panic.i249.i - -panic.i249.i: ; preds = %__barray_mask_return.exit248.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit250.i: ; preds = %__barray_mask_return.exit248.i - %65 = or disjoint i64 %63, 512 - store i64 %65, ptr %2, align 4 - %66 = load i64, ptr %41, align 4 - tail call void @___rxy(i64 %66, double 0x400921FB54442D18, double 0.000000e+00) - %67 = load i64, ptr %2, align 4 - %68 = and i64 %67, 512 - %.not272.i = icmp eq i64 %68, 0 - br i1 %.not272.i, label %panic.i251.i, label %__barray_mask_return.exit252.i - -panic.i251.i: ; preds = %__barray_mask_borrow.exit250.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit252.i: ; preds = %__barray_mask_borrow.exit250.i - %69 = and i64 %67, -513 - store i64 %69, ptr %2, align 4 - store i64 %66, ptr %41, align 4 - %70 = insertvalue { { ptr, ptr, i64 }, i64 } poison, { ptr, ptr, i64 } %"116.fca.2.insert.i", 0 - %71 = tail call ptr @heap_alloc(i64 240) - %72 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %72, align 1 - br label %__barray_check_bounds.exit.i.i.i - -73: ; preds = %loop_body.i.i - %74 = lshr i64 %.fca.2.extract82.i.i.i, 6 - %75 = getelementptr i64, ptr %.fca.1.extract81.i.i.i, i64 %74 - %76 = load i64, ptr %75, align 4 - %77 = and i64 %.fca.2.extract82.i.i.i, 63 - %78 = sub nuw nsw i64 64, %77 - %79 = lshr i64 -1, %78 - %80 = icmp eq i64 %77, 0 - %81 = select i1 %80, i64 0, i64 %79 - %82 = or i64 %76, %81 - store i64 %82, ptr %75, align 4 - %last_valid.i.i.i.i = add i64 %.fca.2.extract82.i.i.i, 9 - %83 = lshr i64 %last_valid.i.i.i.i, 6 - %84 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i.i.i, i64 %83 - %85 = load i64, ptr %84, align 4 - %86 = and i64 %last_valid.i.i.i.i, 63 - %87 = shl nsw i64 -2, %86 - %88 = icmp eq i64 %86, 63 - %89 = select i1 %88, i64 0, i64 %87 - %90 = or i64 %85, %89 - store i64 %90, ptr %84, align 4 - %reass.sub.i.i.i.i = sub nsw i64 %83, %74 - %.not.i.i.i.i = icmp eq i64 %reass.sub.i.i.i.i, -1 - br i1 %.not.i.i.i.i, label %"__hugr__.$measure_array$$n(10).280.exit.i", label %mask_block_ok.i.i.i.i - -91: ; preds = %mask_block_ok.i.i.i.i - %92 = add nuw i64 %.02.i.i.i.i, 1 - %exitcond.not.i.i.i.i = icmp eq i64 %.02.i.i.i.i, %reass.sub.i.i.i.i - br i1 %exitcond.not.i.i.i.i, label %"__hugr__.$measure_array$$n(10).280.exit.i", label %mask_block_ok.i.i.i.i - -mask_block_ok.i.i.i.i: ; preds = %73, %91 - %.02.i.i.i.i = phi i64 [ %92, %91 ], [ 0, %73 ] - %gep.i.i.i.i = getelementptr i64, ptr %75, i64 %.02.i.i.i.i - %93 = load i64, ptr %gep.i.i.i.i, align 4 - %94 = icmp eq i64 %93, -1 - br i1 %94, label %91, label %mask_block_err.i.i.i.i - -mask_block_err.i.i.i.i: ; preds = %mask_block_ok.i.i.i.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit.i.i.i: ; preds = %loop_body.i.i, %__barray_mask_return.exit252.i - %.fca.2.extract82.i187.i.i = phi i64 [ 0, %__barray_mask_return.exit252.i ], [ %.fca.2.extract82.i.i.i, %loop_body.i.i ] - %.fca.1.extract81.i186.i.i = phi ptr [ %2, %__barray_mask_return.exit252.i ], [ %.fca.1.extract81.i.i.i, %loop_body.i.i ] - %.fca.0.extract80.i185.i.i = phi ptr [ %1, %__barray_mask_return.exit252.i ], [ %.fca.0.extract80.i.i.i, %loop_body.i.i ] - %"306_0.sroa.15.0184.i.i" = phi i64 [ 0, %__barray_mask_return.exit252.i ], [ %95, %loop_body.i.i ] - %.pn165183.i.i = phi { { ptr, ptr, i64 }, i64 } [ %70, %__barray_mask_return.exit252.i ], [ %110, %loop_body.i.i ] - %95 = add nuw nsw i64 %"306_0.sroa.15.0184.i.i", 1 - %96 = add i64 %"306_0.sroa.15.0184.i.i", %.fca.2.extract82.i187.i.i - %97 = lshr i64 %96, 6 - %98 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i186.i.i, i64 %97 - %99 = load i64, ptr %98, align 4 - %100 = and i64 %96, 63 - %101 = lshr i64 %99, %100 - %102 = trunc i64 %101 to i1 - br i1 %102, label %panic.i.i.i.i, label %__barray_check_bounds.exit.i.i - -panic.i.i.i.i: ; preds = %__barray_check_bounds.exit.i.i.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit.i.i: ; preds = %__barray_check_bounds.exit.i.i.i - %103 = shl nuw i64 1, %100 - %104 = xor i64 %103, %99 - store i64 %104, ptr %98, align 4 - %105 = getelementptr inbounds i64, ptr %.fca.0.extract80.i185.i.i, i64 %96 - %106 = load i64, ptr %105, align 4 - %lazy_measure.i.i = tail call i64 @___lazy_measure(i64 %106) - tail call void @___qfree(i64 %106) - %107 = load i64, ptr %72, align 4 - %108 = lshr i64 %107, %"306_0.sroa.15.0184.i.i" - %109 = trunc i64 %108 to i1 - br i1 %109, label %loop_body.i.i, label %panic.i.i.i - -panic.i.i.i: ; preds = %__barray_check_bounds.exit.i.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -loop_body.i.i: ; preds = %__barray_check_bounds.exit.i.i - %"371_054.fca.1.insert.i.i" = insertvalue { i1, i64, i1 } { i1 true, i64 poison, i1 undef }, i64 %lazy_measure.i.i, 1 - %"371_054.fca.2.insert.i.i" = insertvalue { i1, i64, i1 } %"371_054.fca.1.insert.i.i", i1 undef, 2 - %110 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn165183.i.i, i64 %95, 1 - %111 = shl nuw nsw i64 1, %"306_0.sroa.15.0184.i.i" - %112 = xor i64 %107, %111 - store i64 %112, ptr %72, align 4 - %113 = getelementptr inbounds nuw { i1, i64, i1 }, ptr %71, i64 %"306_0.sroa.15.0184.i.i" - store { i1, i64, i1 } %"371_054.fca.2.insert.i.i", ptr %113, align 4 - %114 = extractvalue { { ptr, ptr, i64 }, i64 } %.pn165183.i.i, 0 - %.fca.0.extract80.i.i.i = extractvalue { ptr, ptr, i64 } %114, 0 - %.fca.1.extract81.i.i.i = extractvalue { ptr, ptr, i64 } %114, 1 - %.fca.2.extract82.i.i.i = extractvalue { ptr, ptr, i64 } %114, 2 - %exitcond.not.i.i = icmp eq i64 %95, 10 - br i1 %exitcond.not.i.i, label %73, label %__barray_check_bounds.exit.i.i.i - -"__hugr__.$measure_array$$n(10).280.exit.i": ; preds = %91, %73 - tail call void @heap_free(ptr %.fca.0.extract80.i.i.i) - tail call void @heap_free(ptr nonnull %.fca.1.extract81.i.i.i) - %115 = load i64, ptr %72, align 4 - %116 = trunc i64 %115 to i1 - br i1 %116, label %cond_exit_89.thread.i, label %__barray_mask_borrow.exit259.i - -mask_block_err.i.i: ; preds = %cond_exit_89.thread.9.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_mask_borrow.exit259.i: ; preds = %"__hugr__.$measure_array$$n(10).280.exit.i" - %117 = or disjoint i64 %115, 1 - store i64 %117, ptr %72, align 4 - %118 = load { i1, i64, i1 }, ptr %71, align 4 - %.fca.0.extract167.i = extractvalue { i1, i64, i1 } %118, 0 - br i1 %.fca.0.extract167.i, label %cond_392_case_1.i, label %cond_exit_89.thread.i - -cond_exit_89.thread.i: ; preds = %cond_392_case_1.i, %__barray_mask_borrow.exit259.i, %"__hugr__.$measure_array$$n(10).280.exit.i" - %119 = phi i64 [ %.pre.i, %cond_392_case_1.i ], [ %117, %__barray_mask_borrow.exit259.i ], [ %115, %"__hugr__.$measure_array$$n(10).280.exit.i" ] - %120 = and i64 %119, 2 - %.not290.i = icmp eq i64 %120, 0 - br i1 %.not290.i, label %__barray_mask_borrow.exit259.1.i, label %cond_exit_89.thread.1.i - -__barray_mask_borrow.exit259.1.i: ; preds = %cond_exit_89.thread.i - %121 = or disjoint i64 %119, 2 - store i64 %121, ptr %72, align 4 - %122 = getelementptr inbounds nuw i8, ptr %71, i64 24 - %123 = load { i1, i64, i1 }, ptr %122, align 4 - %.fca.0.extract167.1.i = extractvalue { i1, i64, i1 } %123, 0 - br i1 %.fca.0.extract167.1.i, label %cond_392_case_1.1.i, label %cond_exit_89.thread.1.i - -cond_392_case_1.1.i: ; preds = %__barray_mask_borrow.exit259.1.i - %.fca.1.extract.1.i = extractvalue { i1, i64, i1 } %123, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.1.i) - %.pre281.i = load i64, ptr %72, align 4 - br label %cond_exit_89.thread.1.i - -cond_exit_89.thread.1.i: ; preds = %cond_392_case_1.1.i, %__barray_mask_borrow.exit259.1.i, %cond_exit_89.thread.i - %124 = phi i64 [ %.pre281.i, %cond_392_case_1.1.i ], [ %121, %__barray_mask_borrow.exit259.1.i ], [ %119, %cond_exit_89.thread.i ] - %125 = and i64 %124, 4 - %.not291.i = icmp eq i64 %125, 0 - br i1 %.not291.i, label %__barray_mask_borrow.exit259.2.i, label %cond_exit_89.thread.2.i - -__barray_mask_borrow.exit259.2.i: ; preds = %cond_exit_89.thread.1.i - %126 = or disjoint i64 %124, 4 - store i64 %126, ptr %72, align 4 - %127 = getelementptr inbounds nuw i8, ptr %71, i64 48 - %128 = load { i1, i64, i1 }, ptr %127, align 4 - %.fca.0.extract167.2.i = extractvalue { i1, i64, i1 } %128, 0 - br i1 %.fca.0.extract167.2.i, label %cond_392_case_1.2.i, label %cond_exit_89.thread.2.i - -cond_392_case_1.2.i: ; preds = %__barray_mask_borrow.exit259.2.i - %.fca.1.extract.2.i = extractvalue { i1, i64, i1 } %128, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.2.i) - %.pre282.i = load i64, ptr %72, align 4 - br label %cond_exit_89.thread.2.i - -cond_exit_89.thread.2.i: ; preds = %cond_392_case_1.2.i, %__barray_mask_borrow.exit259.2.i, %cond_exit_89.thread.1.i - %129 = phi i64 [ %.pre282.i, %cond_392_case_1.2.i ], [ %126, %__barray_mask_borrow.exit259.2.i ], [ %124, %cond_exit_89.thread.1.i ] - %130 = and i64 %129, 8 - %.not292.i = icmp eq i64 %130, 0 - br i1 %.not292.i, label %__barray_mask_borrow.exit259.3.i, label %cond_exit_89.thread.3.i - -__barray_mask_borrow.exit259.3.i: ; preds = %cond_exit_89.thread.2.i - %131 = or disjoint i64 %129, 8 - store i64 %131, ptr %72, align 4 - %132 = getelementptr inbounds nuw i8, ptr %71, i64 72 - %133 = load { i1, i64, i1 }, ptr %132, align 4 - %.fca.0.extract167.3.i = extractvalue { i1, i64, i1 } %133, 0 - br i1 %.fca.0.extract167.3.i, label %cond_392_case_1.3.i, label %cond_exit_89.thread.3.i - -cond_392_case_1.3.i: ; preds = %__barray_mask_borrow.exit259.3.i - %.fca.1.extract.3.i = extractvalue { i1, i64, i1 } %133, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.3.i) - %.pre283.i = load i64, ptr %72, align 4 - br label %cond_exit_89.thread.3.i - -cond_exit_89.thread.3.i: ; preds = %cond_392_case_1.3.i, %__barray_mask_borrow.exit259.3.i, %cond_exit_89.thread.2.i - %134 = phi i64 [ %.pre283.i, %cond_392_case_1.3.i ], [ %131, %__barray_mask_borrow.exit259.3.i ], [ %129, %cond_exit_89.thread.2.i ] - %135 = and i64 %134, 16 - %.not293.i = icmp eq i64 %135, 0 - br i1 %.not293.i, label %__barray_mask_borrow.exit259.4.i, label %cond_exit_89.thread.4.i - -__barray_mask_borrow.exit259.4.i: ; preds = %cond_exit_89.thread.3.i - %136 = or disjoint i64 %134, 16 - store i64 %136, ptr %72, align 4 - %137 = getelementptr inbounds nuw i8, ptr %71, i64 96 - %138 = load { i1, i64, i1 }, ptr %137, align 4 - %.fca.0.extract167.4.i = extractvalue { i1, i64, i1 } %138, 0 - br i1 %.fca.0.extract167.4.i, label %cond_392_case_1.4.i, label %cond_exit_89.thread.4.i - -cond_392_case_1.4.i: ; preds = %__barray_mask_borrow.exit259.4.i - %.fca.1.extract.4.i = extractvalue { i1, i64, i1 } %138, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.4.i) - %.pre284.i = load i64, ptr %72, align 4 - br label %cond_exit_89.thread.4.i - -cond_exit_89.thread.4.i: ; preds = %cond_392_case_1.4.i, %__barray_mask_borrow.exit259.4.i, %cond_exit_89.thread.3.i - %139 = phi i64 [ %.pre284.i, %cond_392_case_1.4.i ], [ %136, %__barray_mask_borrow.exit259.4.i ], [ %134, %cond_exit_89.thread.3.i ] - %140 = and i64 %139, 32 - %.not294.i = icmp eq i64 %140, 0 - br i1 %.not294.i, label %__barray_mask_borrow.exit259.5.i, label %cond_exit_89.thread.5.i - -__barray_mask_borrow.exit259.5.i: ; preds = %cond_exit_89.thread.4.i - %141 = or disjoint i64 %139, 32 - store i64 %141, ptr %72, align 4 - %142 = getelementptr inbounds nuw i8, ptr %71, i64 120 - %143 = load { i1, i64, i1 }, ptr %142, align 4 - %.fca.0.extract167.5.i = extractvalue { i1, i64, i1 } %143, 0 - br i1 %.fca.0.extract167.5.i, label %cond_392_case_1.5.i, label %cond_exit_89.thread.5.i - -cond_392_case_1.5.i: ; preds = %__barray_mask_borrow.exit259.5.i - %.fca.1.extract.5.i = extractvalue { i1, i64, i1 } %143, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.5.i) - %.pre285.i = load i64, ptr %72, align 4 - br label %cond_exit_89.thread.5.i - -cond_exit_89.thread.5.i: ; preds = %cond_392_case_1.5.i, %__barray_mask_borrow.exit259.5.i, %cond_exit_89.thread.4.i - %144 = phi i64 [ %.pre285.i, %cond_392_case_1.5.i ], [ %141, %__barray_mask_borrow.exit259.5.i ], [ %139, %cond_exit_89.thread.4.i ] - %145 = and i64 %144, 64 - %.not295.i = icmp eq i64 %145, 0 - br i1 %.not295.i, label %__barray_mask_borrow.exit259.6.i, label %cond_exit_89.thread.6.i - -__barray_mask_borrow.exit259.6.i: ; preds = %cond_exit_89.thread.5.i - %146 = or disjoint i64 %144, 64 - store i64 %146, ptr %72, align 4 - %147 = getelementptr inbounds nuw i8, ptr %71, i64 144 - %148 = load { i1, i64, i1 }, ptr %147, align 4 - %.fca.0.extract167.6.i = extractvalue { i1, i64, i1 } %148, 0 - br i1 %.fca.0.extract167.6.i, label %cond_392_case_1.6.i, label %cond_exit_89.thread.6.i - -cond_392_case_1.6.i: ; preds = %__barray_mask_borrow.exit259.6.i - %.fca.1.extract.6.i = extractvalue { i1, i64, i1 } %148, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.6.i) - %.pre286.i = load i64, ptr %72, align 4 - br label %cond_exit_89.thread.6.i - -cond_exit_89.thread.6.i: ; preds = %cond_392_case_1.6.i, %__barray_mask_borrow.exit259.6.i, %cond_exit_89.thread.5.i - %149 = phi i64 [ %.pre286.i, %cond_392_case_1.6.i ], [ %146, %__barray_mask_borrow.exit259.6.i ], [ %144, %cond_exit_89.thread.5.i ] - %150 = and i64 %149, 128 - %.not296.i = icmp eq i64 %150, 0 - br i1 %.not296.i, label %__barray_mask_borrow.exit259.7.i, label %cond_exit_89.thread.7.i - -__barray_mask_borrow.exit259.7.i: ; preds = %cond_exit_89.thread.6.i - %151 = or disjoint i64 %149, 128 - store i64 %151, ptr %72, align 4 - %152 = getelementptr inbounds nuw i8, ptr %71, i64 168 - %153 = load { i1, i64, i1 }, ptr %152, align 4 - %.fca.0.extract167.7.i = extractvalue { i1, i64, i1 } %153, 0 - br i1 %.fca.0.extract167.7.i, label %cond_392_case_1.7.i, label %cond_exit_89.thread.7.i - -cond_392_case_1.7.i: ; preds = %__barray_mask_borrow.exit259.7.i - %.fca.1.extract.7.i = extractvalue { i1, i64, i1 } %153, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.7.i) - %.pre287.i = load i64, ptr %72, align 4 - br label %cond_exit_89.thread.7.i - -cond_exit_89.thread.7.i: ; preds = %cond_392_case_1.7.i, %__barray_mask_borrow.exit259.7.i, %cond_exit_89.thread.6.i - %154 = phi i64 [ %.pre287.i, %cond_392_case_1.7.i ], [ %151, %__barray_mask_borrow.exit259.7.i ], [ %149, %cond_exit_89.thread.6.i ] - %155 = and i64 %154, 256 - %.not297.i = icmp eq i64 %155, 0 - br i1 %.not297.i, label %__barray_mask_borrow.exit259.8.i, label %cond_exit_89.thread.8.i - -__barray_mask_borrow.exit259.8.i: ; preds = %cond_exit_89.thread.7.i - %156 = or disjoint i64 %154, 256 - store i64 %156, ptr %72, align 4 - %157 = getelementptr inbounds nuw i8, ptr %71, i64 192 - %158 = load { i1, i64, i1 }, ptr %157, align 4 - %.fca.0.extract167.8.i = extractvalue { i1, i64, i1 } %158, 0 - br i1 %.fca.0.extract167.8.i, label %cond_392_case_1.8.i, label %cond_exit_89.thread.8.i - -cond_392_case_1.8.i: ; preds = %__barray_mask_borrow.exit259.8.i - %.fca.1.extract.8.i = extractvalue { i1, i64, i1 } %158, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.8.i) - %.pre288.i = load i64, ptr %72, align 4 - br label %cond_exit_89.thread.8.i - -cond_exit_89.thread.8.i: ; preds = %cond_392_case_1.8.i, %__barray_mask_borrow.exit259.8.i, %cond_exit_89.thread.7.i - %159 = phi i64 [ %.pre288.i, %cond_392_case_1.8.i ], [ %156, %__barray_mask_borrow.exit259.8.i ], [ %154, %cond_exit_89.thread.7.i ] - %160 = and i64 %159, 512 - %.not298.i = icmp eq i64 %160, 0 - br i1 %.not298.i, label %__barray_mask_borrow.exit259.9.i, label %cond_exit_89.thread.9.i - -__barray_mask_borrow.exit259.9.i: ; preds = %cond_exit_89.thread.8.i - %161 = or disjoint i64 %159, 512 - store i64 %161, ptr %72, align 4 - %162 = getelementptr inbounds nuw i8, ptr %71, i64 216 - %163 = load { i1, i64, i1 }, ptr %162, align 4 - %.fca.0.extract167.9.i = extractvalue { i1, i64, i1 } %163, 0 - br i1 %.fca.0.extract167.9.i, label %cond_392_case_1.9.i, label %cond_exit_89.thread.9.i - -cond_392_case_1.9.i: ; preds = %__barray_mask_borrow.exit259.9.i - %.fca.1.extract.9.i = extractvalue { i1, i64, i1 } %163, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.9.i) - %.pre289.i = load i64, ptr %72, align 4 - br label %cond_exit_89.thread.9.i - -cond_exit_89.thread.9.i: ; preds = %cond_392_case_1.9.i, %__barray_mask_borrow.exit259.9.i, %cond_exit_89.thread.8.i - %164 = phi i64 [ %.pre289.i, %cond_392_case_1.9.i ], [ %161, %__barray_mask_borrow.exit259.9.i ], [ %159, %cond_exit_89.thread.8.i ] - %165 = or i64 %164, -1024 - store i64 %165, ptr %72, align 4 - %166 = icmp eq i64 %165, -1 - br i1 %166, label %__hugr__.main.1.exit, label %mask_block_err.i.i - -cond_392_case_1.i: ; preds = %__barray_mask_borrow.exit259.i - %.fca.1.extract.i = extractvalue { i1, i64, i1 } %118, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.i) - %.pre.i = load i64, ptr %72, align 4 - br label %cond_exit_89.thread.i - -__hugr__.main.1.exit: ; preds = %cond_exit_89.thread.9.i - tail call void @heap_free(ptr %71) - tail call void @heap_free(ptr nonnull %72) - %167 = tail call i64 @teardown() - ret i64 %167 + tail call void @setup(i64 %0), !dbg !63 + tail call void @"__hugr__.__main__.measure_qb_array..main.1"(), !dbg !63 + %1 = tail call i64 @teardown(), !dbg !63 + ret i64 %1, !dbg !63 } declare void @setup(i64) local_unnamed_addr @@ -632,6 +641,71 @@ declare i64 @teardown() local_unnamed_addr attributes #0 = { noreturn } -!name = !{!0} - -!0 = !{!"mainlib"} +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} +!name = !{!3} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v0.32.0)-v0.21.11", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "file:///Users/george.hodgkins/proj/clone-anduril") +!3 = !{!"mainlib"} +!4 = distinct !DISubprogram(name: "measure_qb_array..main", linkageName: "__hugr__.__main__.measure_qb_array..main.1", scope: null, file: !5, line: 101, type: !6, scopeLine: 102, spFlags: DISPFlagDefinition, unit: !1) +!5 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "") +!6 = !DISubroutineType(types: !7) +!7 = !{null} +!8 = !DILocation(line: 102, column: 13, scope: !4) +!9 = !DILocation(line: 102, column: 19, scope: !4) +!10 = !DILocation(line: 103, column: 10, scope: !4, inlinedAt: !11) +!11 = distinct !DILocation(line: 103, column: 10, scope: !4) +!12 = !DILocation(line: 103, column: 10, scope: !4) +!13 = !DILocation(line: 103, column: 8, scope: !4) +!14 = !DILocation(line: 103, column: 10, scope: !4, inlinedAt: !15) +!15 = distinct !DILocation(line: 104, column: 10, scope: !4) +!16 = !DILocation(line: 104, column: 10, scope: !4) +!17 = !DILocation(line: 104, column: 8, scope: !4) +!18 = !DILocation(line: 103, column: 10, scope: !4, inlinedAt: !19) +!19 = distinct !DILocation(line: 105, column: 10, scope: !4) +!20 = !DILocation(line: 105, column: 10, scope: !4) +!21 = !DILocation(line: 105, column: 8, scope: !4) +!22 = !DILocation(line: 103, column: 10, scope: !4, inlinedAt: !23) +!23 = distinct !DILocation(line: 106, column: 10, scope: !4) +!24 = !DILocation(line: 106, column: 10, scope: !4) +!25 = !DILocation(line: 106, column: 8, scope: !4) +!26 = !DILocation(line: 84, column: 25, scope: !27, inlinedAt: !37) +!27 = distinct !DISubprogram(name: "std.array.array.__iter__$qubit&10", linkageName: "__hugr__.guppylang.std.array.array.__iter__$qubit&10.190", scope: null, file: !28, line: 83, type: !29, scopeLine: 84, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!28 = !DIFile(filename: "/Users/george.hodgkins/proj/clone-anduril/.venv/lib/python3.10/site-packages/guppylang/std/array.py", directory: "") +!29 = !DISubroutineType(types: !30) +!30 = !{!31, !33} +!31 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ { ptr, ptr, i64 }, i64 }", file: !2, size: 32, align: 8, elements: !32) +!32 = !{!33, !36} +!33 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ ptr, ptr, i64 }", file: !2, size: 24, align: 8, elements: !34) +!34 = !{!35, !35, !36} +!35 = !DIBasicType(name: "ptr", size: 64, encoding: DW_ATE_address) +!36 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!37 = distinct !DILocation(line: 382, column: 37, scope: !38, inlinedAt: !42) +!38 = distinct !DISubprogram(name: "std.quantum.measure_array$10", linkageName: "__hugr__.guppylang.std.quantum.measure_array$10.149", scope: null, file: !39, line: 380, type: !40, scopeLine: 382, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!39 = !DIFile(filename: "/Users/george.hodgkins/proj/clone-anduril/.venv/lib/python3.10/site-packages/guppylang/std/quantum/__init__.py", directory: "") +!40 = !DISubroutineType(types: !41) +!41 = !{!33, !33} +!42 = distinct !DILocation(line: 107, column: 8, scope: !4) +!43 = !DILocation(line: 382, column: 11, scope: !38, inlinedAt: !42) +!44 = !DILocation(line: 276, column: 8, scope: !45, inlinedAt: !53) +!45 = distinct !DISubprogram(name: "std.array.ArrayIter.__next__$qubit&10", linkageName: "__hugr__.guppylang.std.array.ArrayIter.__next__$qubit&10.202", scope: null, file: !28, line: 270, type: !46, scopeLine: 273, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!46 = !DISubroutineType(types: !47) +!47 = !{!48, !31} +!48 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i1, { { { ptr, ptr, i64 }, i64 }, i64 } }", file: !2, size: 40, align: 8, elements: !49) +!49 = !{!50, !51} +!50 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) +!51 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ { { ptr, ptr, i64 }, i64 }, i64 }", file: !2, size: 40, align: 8, elements: !52) +!52 = !{!31, !36} +!53 = distinct !DILocation(line: 382, column: 37, scope: !38, inlinedAt: !42) +!54 = !DILocation(line: 275, column: 50, scope: !45, inlinedAt: !53) +!55 = !DILocation(line: 274, column: 19, scope: !45, inlinedAt: !53) +!56 = !DILocation(line: 103, column: 10, scope: !4, inlinedAt: !57) +!57 = distinct !DILocation(line: 274, column: 19, scope: !45, inlinedAt: !53) +!58 = !DILocation(line: 273, column: 11, scope: !45, inlinedAt: !53) +!59 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !60, type: !61, spFlags: DISPFlagDefinition, unit: !1) +!60 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") +!61 = !DISubroutineType(types: !62) +!62 = !{!36, !36} +!63 = !DILocation(line: 0, scope: !59) diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-no_results/no_results_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-no_results/no_results_x86_64-apple-darwin index ee3bf9879..c803dc3ff 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-no_results/no_results_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-no_results/no_results_x86_64-apple-darwin @@ -5,6 +5,26 @@ target triple = "x86_64-apple-darwin" @"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." +define void @"__hugr__.__main__.no_results..bar.1"() local_unnamed_addr !dbg !4 { +alloca_block: + %qalloc.i = tail call i64 @___qalloc(), !dbg !8 + %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 + br i1 %not_max.not.not.i, label %cond_18_case_0.i, label %__hugr__.__tk2_qalloc.14.exit, !dbg !8 + +cond_18_case_0.i: ; preds = %alloca_block + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + unreachable, !dbg !8 + +__hugr__.__tk2_qalloc.14.exit: ; preds = %alloca_block + tail call void @___reset(i64 %qalloc.i), !dbg !8 + tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 + tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 + %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) + ret void +} + declare i64 @___lazy_measure(i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -22,26 +42,12 @@ declare void @___rxy(i64, double, double) local_unnamed_addr declare void @___rz(i64, double) local_unnamed_addr -define i64 @qmain(i64 %0) local_unnamed_addr { +define i64 @qmain(i64 %0) local_unnamed_addr !dbg !10 { entry: - tail call void @setup(i64 %0) - %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.not.i.i, label %cond_18_case_0.i.i, label %__hugr__.bar.1.exit - -cond_18_case_0.i.i: ; preds = %entry - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.bar.1.exit: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - tail call void @___rxy(i64 %qalloc.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i.i, double 0x400921FB54442D18) - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i.i) - tail call void @___qfree(i64 %qalloc.i.i) - tail call void @___dec_future_refcount(i64 %lazy_measure.i) - %1 = tail call i64 @teardown() - ret i64 %1 + tail call void @setup(i64 %0), !dbg !15 + tail call void @"__hugr__.__main__.no_results..bar.1"(), !dbg !15 + %1 = tail call i64 @teardown(), !dbg !15 + ret i64 %1, !dbg !15 } declare void @setup(i64) local_unnamed_addr @@ -50,6 +56,23 @@ declare i64 @teardown() local_unnamed_addr attributes #0 = { noreturn } -!name = !{!0} - -!0 = !{!"mainlib"} +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} +!name = !{!3} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v0.32.0)-v0.21.11", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "file:///Users/george.hodgkins/proj/clone-anduril") +!3 = !{!"mainlib"} +!4 = distinct !DISubprogram(name: "no_results..bar", linkageName: "__hugr__.__main__.no_results..bar.1", scope: null, file: !5, line: 64, type: !6, scopeLine: 65, spFlags: DISPFlagDefinition, unit: !1) +!5 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "") +!6 = !DISubroutineType(types: !7) +!7 = !{null} +!8 = !DILocation(line: 65, column: 20, scope: !4) +!9 = !DILocation(line: 66, column: 8, scope: !4) +!10 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !11, type: !12, spFlags: DISPFlagDefinition, unit: !1) +!11 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") +!12 = !DISubroutineType(types: !13) +!13 = !{!14, !14} +!14 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!15 = !DILocation(line: 0, scope: !10) diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-postselect_exit/postselect_exit_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-postselect_exit/postselect_exit_x86_64-apple-darwin index dc9f382c5..dbdd8a2e2 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-postselect_exit/postselect_exit_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-postselect_exit/postselect_exit_x86_64-apple-darwin @@ -7,6 +7,38 @@ target triple = "x86_64-apple-darwin" @res_c.1C9EF4D1.0 = private constant [12 x i8] c"\0BUSER:BOOL:c" @"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." +define void @"__hugr__.__main__.postselect_exit..main.1"() local_unnamed_addr !dbg !4 { +alloca_block: + %qalloc.i = tail call i64 @___qalloc(), !dbg !8 + %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 + br i1 %not_max.not.not.i, label %cond_45_case_0.i, label %__hugr__.__tk2_qalloc.41.exit, !dbg !8 + +cond_45_case_0.i: ; preds = %alloca_block + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + unreachable, !dbg !8 + +__hugr__.__tk2_qalloc.41.exit: ; preds = %alloca_block + tail call void @___reset(i64 %qalloc.i), !dbg !8 + tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 + tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 + %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + tail call void @___qfree(i64 %qalloc.i) + tail call void @___inc_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 %0, label %cond_98_case_1 + +cond_98_case_1: ; preds = %__hugr__.__tk2_qalloc.41.exit + %read_bool66 = 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_c.1C9EF4D1.0, i64 11, i1 %read_bool66), !dbg !10 + ret void + +0: ; preds = %__hugr__.__tk2_qalloc.41.exit + tail call void @panic(i32 42, ptr nonnull @s_Postselect.13DF1CD0.0), !dbg !11 + unreachable +} + declare i64 @___lazy_measure(i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -30,38 +62,12 @@ declare void @___rxy(i64, double, double) local_unnamed_addr declare void @___rz(i64, double) local_unnamed_addr -define i64 @qmain(i64 %0) local_unnamed_addr { +define i64 @qmain(i64 %0) local_unnamed_addr !dbg !12 { entry: - tail call void @setup(i64 %0) - %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.not.i.i, label %cond_45_case_0.i.i, label %__hugr__.__tk2_qalloc.41.exit.i - -cond_45_case_0.i.i: ; preds = %entry - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_qalloc.41.exit.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - tail call void @___rxy(i64 %qalloc.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i.i, double 0x400921FB54442D18) - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i.i) - tail call void @___qfree(i64 %qalloc.i.i) - tail call void @___inc_future_refcount(i64 %lazy_measure.i) - %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) - tail call void @___dec_future_refcount(i64 %lazy_measure.i) - br i1 %read_bool.i, label %1, label %__hugr__.main.1.exit - -1: ; preds = %__hugr__.__tk2_qalloc.41.exit.i - tail call void @panic(i32 42, ptr nonnull @s_Postselect.13DF1CD0.0) - unreachable - -__hugr__.main.1.exit: ; preds = %__hugr__.__tk2_qalloc.41.exit.i - %read_bool66.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_bool66.i) - %2 = tail call i64 @teardown() - ret i64 %2 + tail call void @setup(i64 %0), !dbg !17 + tail call void @"__hugr__.__main__.postselect_exit..main.1"(), !dbg !17 + %1 = tail call i64 @teardown(), !dbg !17 + ret i64 %1, !dbg !17 } declare void @setup(i64) local_unnamed_addr @@ -70,6 +76,25 @@ declare i64 @teardown() local_unnamed_addr attributes #0 = { noreturn } -!name = !{!0} - -!0 = !{!"mainlib"} +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} +!name = !{!3} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v0.32.0)-v0.21.11", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "file:///Users/george.hodgkins/proj/clone-anduril") +!3 = !{!"mainlib"} +!4 = distinct !DISubprogram(name: "postselect_exit..main", linkageName: "__hugr__.__main__.postselect_exit..main.1", scope: null, file: !5, line: 131, type: !6, scopeLine: 132, spFlags: DISPFlagDefinition, unit: !1) +!5 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "") +!6 = !DISubroutineType(types: !7) +!7 = !{null} +!8 = !DILocation(line: 132, column: 12, scope: !4) +!9 = !DILocation(line: 133, column: 8, scope: !4) +!10 = !DILocation(line: 137, column: 8, scope: !4) +!11 = !DILocation(line: 136, column: 12, scope: !4) +!12 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !13, type: !14, spFlags: DISPFlagDefinition, unit: !1) +!13 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") +!14 = !DISubroutineType(types: !15) +!15 = !{!16, !16} +!16 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!17 = !DILocation(line: 0, scope: !12) diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-postselect_panic/postselect_panic_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-postselect_panic/postselect_panic_x86_64-apple-darwin index dd808af13..d8b99f675 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-postselect_panic/postselect_panic_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-postselect_panic/postselect_panic_x86_64-apple-darwin @@ -7,6 +7,38 @@ target triple = "x86_64-apple-darwin" @res_c.1C9EF4D1.0 = private constant [12 x i8] c"\0BUSER:BOOL:c" @"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." +define void @"__hugr__.__main__.postselect_panic..main.1"() local_unnamed_addr !dbg !4 { +alloca_block: + %qalloc.i = tail call i64 @___qalloc(), !dbg !8 + %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 + br i1 %not_max.not.not.i, label %cond_43_case_0.i, label %__hugr__.__tk2_qalloc.39.exit, !dbg !8 + +cond_43_case_0.i: ; preds = %alloca_block + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + unreachable, !dbg !8 + +__hugr__.__tk2_qalloc.39.exit: ; preds = %alloca_block + tail call void @___reset(i64 %qalloc.i), !dbg !8 + tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 + tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 + %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + tail call void @___qfree(i64 %qalloc.i) + tail call void @___inc_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 %0, label %cond_96_case_1 + +cond_96_case_1: ; preds = %__hugr__.__tk2_qalloc.39.exit + %read_bool65 = 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_c.1C9EF4D1.0, i64 11, i1 %read_bool65), !dbg !10 + ret void + +0: ; preds = %__hugr__.__tk2_qalloc.39.exit + tail call void @panic(i32 1001, ptr nonnull @s_Postselect.13DF1CD0.0), !dbg !11 + unreachable +} + declare i64 @___lazy_measure(i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -30,38 +62,12 @@ declare void @___rxy(i64, double, double) local_unnamed_addr declare void @___rz(i64, double) local_unnamed_addr -define i64 @qmain(i64 %0) local_unnamed_addr { +define i64 @qmain(i64 %0) local_unnamed_addr !dbg !12 { entry: - tail call void @setup(i64 %0) - %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.not.i.i, label %cond_43_case_0.i.i, label %__hugr__.__tk2_qalloc.39.exit.i - -cond_43_case_0.i.i: ; preds = %entry - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_qalloc.39.exit.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - tail call void @___rxy(i64 %qalloc.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i.i, double 0x400921FB54442D18) - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i.i) - tail call void @___qfree(i64 %qalloc.i.i) - tail call void @___inc_future_refcount(i64 %lazy_measure.i) - %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) - tail call void @___dec_future_refcount(i64 %lazy_measure.i) - br i1 %read_bool.i, label %1, label %__hugr__.main.1.exit - -1: ; preds = %__hugr__.__tk2_qalloc.39.exit.i - tail call void @panic(i32 1001, ptr nonnull @s_Postselect.13DF1CD0.0) - unreachable - -__hugr__.main.1.exit: ; preds = %__hugr__.__tk2_qalloc.39.exit.i - %read_bool65.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_bool65.i) - %2 = tail call i64 @teardown() - ret i64 %2 + tail call void @setup(i64 %0), !dbg !17 + tail call void @"__hugr__.__main__.postselect_panic..main.1"(), !dbg !17 + %1 = tail call i64 @teardown(), !dbg !17 + ret i64 %1, !dbg !17 } declare void @setup(i64) local_unnamed_addr @@ -70,6 +76,25 @@ declare i64 @teardown() local_unnamed_addr attributes #0 = { noreturn } -!name = !{!0} - -!0 = !{!"mainlib"} +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} +!name = !{!3} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v0.32.0)-v0.21.11", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "file:///Users/george.hodgkins/proj/clone-anduril") +!3 = !{!"mainlib"} +!4 = distinct !DISubprogram(name: "postselect_panic..main", linkageName: "__hugr__.__main__.postselect_panic..main.1", scope: null, file: !5, line: 144, type: !6, scopeLine: 145, spFlags: DISPFlagDefinition, unit: !1) +!5 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "") +!6 = !DISubroutineType(types: !7) +!7 = !{null} +!8 = !DILocation(line: 145, column: 12, scope: !4) +!9 = !DILocation(line: 146, column: 8, scope: !4) +!10 = !DILocation(line: 150, column: 8, scope: !4) +!11 = !DILocation(line: 149, column: 12, scope: !4) +!12 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !13, type: !14, spFlags: DISPFlagDefinition, unit: !1) +!13 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") +!14 = !DISubroutineType(types: !15) +!15 = !{!16, !16} +!16 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!17 = !DILocation(line: 0, scope: !12) diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-print_current_shot/print_current_shot_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-print_current_shot/print_current_shot_x86_64-apple-darwin index 2f2765e7d..954cbffb7 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-print_current_shot/print_current_shot_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-print_current_shot/print_current_shot_x86_64-apple-darwin @@ -5,23 +5,50 @@ target triple = "x86_64-apple-darwin" @res_shot.6D86EAF7.0 = private constant [14 x i8] c"\0DUSER:INT:shot" +define void @"__hugr__.__main__.print_current_shot..main.1"() local_unnamed_addr !dbg !4 { +alloca_block: + %shot = tail call i64 @get_current_shot(), !dbg !8 + tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot), !dbg !9 + ret void +} + declare i64 @get_current_shot() local_unnamed_addr declare void @print_int(ptr, i64, i64) local_unnamed_addr -define i64 @qmain(i64 %0) local_unnamed_addr { +define i64 @qmain(i64 %0) local_unnamed_addr !dbg !10 { entry: - tail call void @setup(i64 %0) - %shot.i = tail call i64 @get_current_shot() - tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot.i) - %1 = tail call i64 @teardown() - ret i64 %1 + tail call void @setup(i64 %0), !dbg !15 + %shot.i = tail call i64 @get_current_shot(), !dbg !16 + tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot.i), !dbg !18 + %1 = tail call i64 @teardown(), !dbg !15 + ret i64 %1, !dbg !15 } declare void @setup(i64) local_unnamed_addr declare i64 @teardown() local_unnamed_addr -!name = !{!0} - -!0 = !{!"mainlib"} +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} +!name = !{!3} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v0.32.0)-v0.21.11", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "file:///Users/george.hodgkins/proj/clone-anduril") +!3 = !{!"mainlib"} +!4 = distinct !DISubprogram(name: "print_current_shot..main", linkageName: "__hugr__.__main__.print_current_shot..main.1", scope: null, file: !5, line: 194, type: !6, scopeLine: 195, spFlags: DISPFlagDefinition, unit: !1) +!5 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "") +!6 = !DISubroutineType(types: !7) +!7 = !{null} +!8 = !DILocation(line: 195, column: 23, scope: !4) +!9 = !DILocation(line: 195, column: 8, scope: !4) +!10 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !11, type: !12, spFlags: DISPFlagDefinition, unit: !1) +!11 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") +!12 = !DISubroutineType(types: !13) +!13 = !{!14, !14} +!14 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!15 = !DILocation(line: 0, scope: !10) +!16 = !DILocation(line: 195, column: 23, scope: !4, inlinedAt: !17) +!17 = distinct !DILocation(line: 0, scope: !10) +!18 = !DILocation(line: 195, column: 8, scope: !4, inlinedAt: !17) diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-rng/rng_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-rng/rng_x86_64-apple-darwin index 015a87c68..8d3201680 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-rng/rng_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-rng/rng_x86_64-apple-darwin @@ -11,6 +11,32 @@ target triple = "x86_64-apple-darwin" @res_rfloat2.4DAB941F.0 = private constant [19 x i8] c"\12USER:FLOAT:rfloat2" @res_rint_bnd2.169DE399.0 = private constant [19 x i8] c"\12USER:INT:rint_bnd2" +define void @"__hugr__.__main__.rng..main.1"() local_unnamed_addr !dbg !4 { +alloca_block: + tail call void @random_seed(i64 42), !dbg !8 + %rint = tail call i32 @random_int(), !dbg !17 + %rint14 = tail call i32 @random_int(), !dbg !18 + %rfloat = tail call double @random_float(), !dbg !19 + %rintb = tail call i32 @random_rng(i32 100), !dbg !20 + %0 = sext i32 %rintb to i64, !dbg !20 + %1 = sext i32 %rint14 to i64, !dbg !18 + %2 = sext i32 %rint to i64, !dbg !17 + tail call void @print_int(ptr nonnull @res_rint.B928E41E.0, i64 13, i64 %2), !dbg !21 + tail call void @print_int(ptr nonnull @res_rint1.0884EC03.0, i64 14, i64 %1), !dbg !22 + tail call void @print_float(ptr nonnull @res_rfloat.F0E4DD2C.0, i64 17, double %rfloat), !dbg !23 + tail call void @print_int(ptr nonnull @res_rint_bnd.CB1E6B0D.0, i64 17, i64 %0), !dbg !24 + tail call void @random_seed(i64 84), !dbg !25 + %rint47 = tail call i32 @random_int(), !dbg !27 + %rfloat49 = tail call double @random_float(), !dbg !28 + %rintb52 = tail call i32 @random_rng(i32 200), !dbg !29 + %3 = sext i32 %rintb52 to i64, !dbg !29 + %4 = sext i32 %rint47 to i64, !dbg !27 + tail call void @print_int(ptr nonnull @res_rint2.F0335598.0, i64 14, i64 %4), !dbg !30 + tail call void @print_float(ptr nonnull @res_rfloat2.4DAB941F.0, i64 18, double %rfloat49), !dbg !31 + tail call void @print_int(ptr nonnull @res_rint_bnd2.169DE399.0, i64 18, i64 %3), !dbg !32 + ret void +} + declare i32 @random_int() local_unnamed_addr declare double @random_float() local_unnamed_addr @@ -23,38 +49,57 @@ declare void @print_float(ptr, i64, double) local_unnamed_addr declare void @random_seed(i64) local_unnamed_addr -define i64 @qmain(i64 %0) local_unnamed_addr { +define i64 @qmain(i64 %0) local_unnamed_addr !dbg !33 { entry: - tail call void @setup(i64 %0) - tail call void @random_seed(i64 42) - %rint.i = tail call i32 @random_int() - %rint14.i = tail call i32 @random_int() - %rfloat.i = tail call double @random_float() - %rintb.i = tail call i32 @random_rng(i32 100) - %1 = sext i32 %rintb.i to i64 - %2 = sext i32 %rint14.i to i64 - %3 = sext i32 %rint.i to i64 - tail call void @print_int(ptr nonnull @res_rint.B928E41E.0, i64 13, i64 %3) - tail call void @print_int(ptr nonnull @res_rint1.0884EC03.0, i64 14, i64 %2) - tail call void @print_float(ptr nonnull @res_rfloat.F0E4DD2C.0, i64 17, double %rfloat.i) - tail call void @print_int(ptr nonnull @res_rint_bnd.CB1E6B0D.0, i64 17, i64 %1) - tail call void @random_seed(i64 84) - %rint47.i = tail call i32 @random_int() - %rfloat49.i = tail call double @random_float() - %rintb52.i = tail call i32 @random_rng(i32 200) - %4 = sext i32 %rintb52.i to i64 - %5 = sext i32 %rint47.i to i64 - tail call void @print_int(ptr nonnull @res_rint2.F0335598.0, i64 14, i64 %5) - tail call void @print_float(ptr nonnull @res_rfloat2.4DAB941F.0, i64 18, double %rfloat49.i) - tail call void @print_int(ptr nonnull @res_rint_bnd2.169DE399.0, i64 18, i64 %4) - %6 = tail call i64 @teardown() - ret i64 %6 + tail call void @setup(i64 %0), !dbg !37 + tail call void @"__hugr__.__main__.rng..main.1"(), !dbg !37 + %1 = tail call i64 @teardown(), !dbg !37 + ret i64 %1, !dbg !37 } declare void @setup(i64) local_unnamed_addr declare i64 @teardown() local_unnamed_addr -!name = !{!0} +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} +!name = !{!3} -!0 = !{!"mainlib"} +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v0.32.0)-v0.21.11", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "file:///Users/george.hodgkins/proj/clone-anduril") +!3 = !{!"mainlib"} +!4 = distinct !DISubprogram(name: "rng..main", linkageName: "__hugr__.__main__.rng..main.1", scope: null, file: !5, line: 202, type: !6, scopeLine: 203, spFlags: DISPFlagDefinition, unit: !1) +!5 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "") +!6 = !DISubroutineType(types: !7) +!7 = !{null} +!8 = !DILocation(line: 44, column: 15, scope: !9, inlinedAt: !16) +!9 = distinct !DISubprogram(name: "std.qsystem.random.RNG.__new__", linkageName: "__hugr__.guppylang.std.qsystem.random.RNG.__new__.72", scope: null, file: !10, line: 42, type: !11, scopeLine: 44, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!10 = !DIFile(filename: "/Users/george.hodgkins/proj/clone-anduril/.venv/lib/python3.10/site-packages/guppylang/std/qsystem/random.py", directory: "") +!11 = !DISubroutineType(types: !12) +!12 = !{!13, !15} +!13 = !DICompositeType(tag: DW_TAG_structure_type, name: "{}", file: !2, align: 8, elements: !14) +!14 = !{} +!15 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!16 = distinct !DILocation(line: 203, column: 14, scope: !4) +!17 = !DILocation(line: 204, column: 15, scope: !4) +!18 = !DILocation(line: 205, column: 16, scope: !4) +!19 = !DILocation(line: 206, column: 17, scope: !4) +!20 = !DILocation(line: 207, column: 19, scope: !4) +!21 = !DILocation(line: 209, column: 8, scope: !4) +!22 = !DILocation(line: 210, column: 8, scope: !4) +!23 = !DILocation(line: 211, column: 8, scope: !4) +!24 = !DILocation(line: 212, column: 8, scope: !4) +!25 = !DILocation(line: 44, column: 15, scope: !9, inlinedAt: !26) +!26 = distinct !DILocation(line: 213, column: 14, scope: !4) +!27 = !DILocation(line: 214, column: 15, scope: !4) +!28 = !DILocation(line: 215, column: 17, scope: !4) +!29 = !DILocation(line: 216, column: 19, scope: !4) +!30 = !DILocation(line: 218, column: 8, scope: !4) +!31 = !DILocation(line: 219, column: 8, scope: !4) +!32 = !DILocation(line: 220, column: 8, scope: !4) +!33 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !34, type: !35, spFlags: DISPFlagDefinition, unit: !1) +!34 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") +!35 = !DISubroutineType(types: !36) +!36 = !{!15, !15} +!37 = !DILocation(line: 0, scope: !33) diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-rus/rus_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-rus/rus_x86_64-apple-darwin index 77f401c44..edf1ec6e7 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-rus/rus_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-rus/rus_x86_64-apple-darwin @@ -6,6 +6,93 @@ target triple = "x86_64-apple-darwin" @res_result.457DE32D.0 = private constant [17 x i8] c"\10USER:BOOL:result" @"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." +define void @"__hugr__.__main__.rus..main.1"() local_unnamed_addr !dbg !4 { +alloca_block: + %qalloc.i = tail call i64 @___qalloc(), !dbg !8 + %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 + br i1 %not_max.not.not.i, label %cond_87_case_0.i, label %__hugr__.__tk2_qalloc.83.exit, !dbg !8 + +cond_87_case_0.i: ; preds = %alloca_block + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + unreachable, !dbg !8 + +__hugr__.__tk2_qalloc.83.exit: ; preds = %alloca_block + tail call void @___reset(i64 %qalloc.i), !dbg !8 + %qalloc.i132.i = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i133.i = icmp eq i64 %qalloc.i132.i, -1, !dbg !9 + br i1 %not_max.not.not.i133.i, label %cond_101_case_0.i.i, label %__hugr__.__tk2_qalloc.97.exit.i, !dbg !9 + +cond_101_case_0.i.i: ; preds = %cond_242_case_1.backedge.i, %__hugr__.__tk2_qalloc.83.exit + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 + unreachable, !dbg !9 + +__hugr__.__tk2_qalloc.97.exit.i: ; preds = %__hugr__.__tk2_qalloc.83.exit, %cond_242_case_1.backedge.i + %qalloc.i134.i = phi i64 [ %qalloc.i.i, %cond_242_case_1.backedge.i ], [ %qalloc.i132.i, %__hugr__.__tk2_qalloc.83.exit ] + tail call void @___reset(i64 %qalloc.i134.i), !dbg !9 + %qalloc.i128.i = tail call i64 @___qalloc(), !dbg !15 + %not_max.not.not.i129.i = icmp eq i64 %qalloc.i128.i, -1, !dbg !15 + br i1 %not_max.not.not.i129.i, label %cond_115_case_0.i.i, label %__hugr__.__tk2_qalloc.111.exit.i, !dbg !15 + +cond_115_case_0.i.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !15 + unreachable, !dbg !15 + +__hugr__.__tk2_qalloc.111.exit.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i + tail call void @___reset(i64 %qalloc.i128.i), !dbg !15 + tail call void @___rxy(i64 %qalloc.i128.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !16 + tail call void @___rz(i64 %qalloc.i128.i, double 0x400921FB54442D18), !dbg !16 + tail call void @___rxy(i64 %qalloc.i134.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !17 + tail call void @___rz(i64 %qalloc.i134.i, double 0x400921FB54442D18), !dbg !17 + tail call void @___rz(i64 %qalloc.i134.i, double 0xBFE921FB54442D18), !dbg !18 + tail call void @___rxy(i64 %qalloc.i134.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18), !dbg !19 + tail call void @___rzz(i64 %qalloc.i128.i, i64 %qalloc.i134.i, double 0x3FF921FB54442D18), !dbg !19 + tail call void @___rz(i64 %qalloc.i128.i, double 0xBFF921FB54442D18), !dbg !19 + tail call void @___rxy(i64 %qalloc.i134.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18), !dbg !19 + tail call void @___rz(i64 %qalloc.i134.i, double 0xBFF921FB54442D18), !dbg !19 + tail call void @___rz(i64 %qalloc.i134.i, double 0x3FE921FB54442D18), !dbg !20 + %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i134.i) + tail call void @___qfree(i64 %qalloc.i134.i) + %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) + tail call void @___dec_future_refcount(i64 %lazy_measure.i) + br i1 %read_bool.i, label %cond_256_case_1.i, label %0 + +0: ; preds = %__hugr__.__tk2_qalloc.111.exit.i + tail call void @___qfree(i64 %qalloc.i128.i), !dbg !21 + br label %cond_242_case_1.backedge.i + +cond_242_case_1.backedge.i: ; preds = %1, %0 + %qalloc.i.i = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1, !dbg !9 + br i1 %not_max.not.not.i.i, label %cond_101_case_0.i.i, label %__hugr__.__tk2_qalloc.97.exit.i, !dbg !9 + +cond_256_case_1.i: ; preds = %__hugr__.__tk2_qalloc.111.exit.i + tail call void @___rz(i64 %qalloc.i, double 0x3FE921FB54442D18), !dbg !22 + tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !23 + tail call void @___rxy(i64 %qalloc.i128.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18), !dbg !24 + tail call void @___rzz(i64 %qalloc.i, i64 %qalloc.i128.i, double 0x3FF921FB54442D18), !dbg !24 + tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18), !dbg !24 + tail call void @___rxy(i64 %qalloc.i128.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18), !dbg !24 + tail call void @___rz(i64 %qalloc.i128.i, double 0xBFF921FB54442D18), !dbg !24 + tail call void @___rz(i64 %qalloc.i128.i, double 0x3FE921FB54442D18), !dbg !25 + %lazy_measure67.i = tail call i64 @___lazy_measure(i64 %qalloc.i128.i) + tail call void @___qfree(i64 %qalloc.i128.i) + %read_bool80.i = tail call i1 @___read_future_bool(i64 %lazy_measure67.i) + tail call void @___dec_future_refcount(i64 %lazy_measure67.i) + br i1 %read_bool80.i, label %"__hugr__.__main__.rus..rus.17.exit", label %1 + +1: ; preds = %cond_256_case_1.i + tail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00), !dbg !26 + br label %cond_242_case_1.backedge.i + +"__hugr__.__main__.rus..rus.17.exit": ; preds = %cond_256_case_1.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) + tail call void @print_bool(ptr nonnull @res_result.457DE32D.0, i64 16, i1 %read_bool), !dbg !27 + ret void +} + declare i64 @___lazy_measure(i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -29,93 +116,12 @@ 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 { +define i64 @qmain(i64 %0) local_unnamed_addr !dbg !28 { entry: - tail call void @setup(i64 %0) - %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.not.i.i, label %cond_87_case_0.i.i, label %__hugr__.__tk2_qalloc.83.exit.i - -cond_87_case_0.i.i: ; preds = %entry - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_qalloc.83.exit.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - %qalloc.i132.i.i = tail call i64 @___qalloc() - %not_max.not.not.i133.i.i = icmp eq i64 %qalloc.i132.i.i, -1 - br i1 %not_max.not.not.i133.i.i, label %cond_101_case_0.i.i.i, label %__hugr__.__tk2_qalloc.97.exit.i.i - -cond_101_case_0.i.i.i: ; preds = %cond_242_case_1.backedge.i.i, %__hugr__.__tk2_qalloc.83.exit.i - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_qalloc.97.exit.i.i: ; preds = %__hugr__.__tk2_qalloc.83.exit.i, %cond_242_case_1.backedge.i.i - %qalloc.i134.i.i = phi i64 [ %qalloc.i.i.i, %cond_242_case_1.backedge.i.i ], [ %qalloc.i132.i.i, %__hugr__.__tk2_qalloc.83.exit.i ] - tail call void @___reset(i64 %qalloc.i134.i.i) - %qalloc.i128.i.i = tail call i64 @___qalloc() - %not_max.not.not.i129.i.i = icmp eq i64 %qalloc.i128.i.i, -1 - br i1 %not_max.not.not.i129.i.i, label %cond_115_case_0.i.i.i, label %__hugr__.__tk2_qalloc.111.exit.i.i - -cond_115_case_0.i.i.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i.i - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_qalloc.111.exit.i.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i.i - tail call void @___reset(i64 %qalloc.i128.i.i) - tail call void @___rxy(i64 %qalloc.i128.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i128.i.i, double 0x400921FB54442D18) - tail call void @___rxy(i64 %qalloc.i134.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i134.i.i, double 0x400921FB54442D18) - tail call void @___rz(i64 %qalloc.i134.i.i, double 0xBFE921FB54442D18) - tail call void @___rxy(i64 %qalloc.i134.i.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rzz(i64 %qalloc.i128.i.i, i64 %qalloc.i134.i.i, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i128.i.i, double 0xBFF921FB54442D18) - tail call void @___rxy(i64 %qalloc.i134.i.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18) - tail call void @___rz(i64 %qalloc.i134.i.i, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i134.i.i, double 0x3FE921FB54442D18) - %lazy_measure.i.i = tail call i64 @___lazy_measure(i64 %qalloc.i134.i.i) - tail call void @___qfree(i64 %qalloc.i134.i.i) - %read_bool.i.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i.i) - tail call void @___dec_future_refcount(i64 %lazy_measure.i.i) - br i1 %read_bool.i.i, label %cond_256_case_1.i.i, label %1 - -1: ; preds = %__hugr__.__tk2_qalloc.111.exit.i.i - tail call void @___qfree(i64 %qalloc.i128.i.i) - br label %cond_242_case_1.backedge.i.i - -cond_242_case_1.backedge.i.i: ; preds = %2, %1 - %qalloc.i.i.i = tail call i64 @___qalloc() - %not_max.not.not.i.i.i = icmp eq i64 %qalloc.i.i.i, -1 - br i1 %not_max.not.not.i.i.i, label %cond_101_case_0.i.i.i, label %__hugr__.__tk2_qalloc.97.exit.i.i - -cond_256_case_1.i.i: ; preds = %__hugr__.__tk2_qalloc.111.exit.i.i - tail call void @___rz(i64 %qalloc.i.i, double 0x3FE921FB54442D18) - tail call void @___rz(i64 %qalloc.i.i, double 0x400921FB54442D18) - tail call void @___rxy(i64 %qalloc.i128.i.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rzz(i64 %qalloc.i.i, i64 %qalloc.i128.i.i, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i.i, double 0xBFF921FB54442D18) - tail call void @___rxy(i64 %qalloc.i128.i.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18) - tail call void @___rz(i64 %qalloc.i128.i.i, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i128.i.i, double 0x3FE921FB54442D18) - %lazy_measure67.i.i = tail call i64 @___lazy_measure(i64 %qalloc.i128.i.i) - tail call void @___qfree(i64 %qalloc.i128.i.i) - %read_bool80.i.i = tail call i1 @___read_future_bool(i64 %lazy_measure67.i.i) - tail call void @___dec_future_refcount(i64 %lazy_measure67.i.i) - br i1 %read_bool80.i.i, label %__hugr__.main.1.exit, label %2 - -2: ; preds = %cond_256_case_1.i.i - tail call void @___rxy(i64 %qalloc.i.i, double 0x400921FB54442D18, double 0.000000e+00) - br label %cond_242_case_1.backedge.i.i - -__hugr__.main.1.exit: ; preds = %cond_256_case_1.i.i - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i.i) - tail call void @___qfree(i64 %qalloc.i.i) - %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) - tail call void @___dec_future_refcount(i64 %lazy_measure.i) - tail call void @print_bool(ptr nonnull @res_result.457DE32D.0, i64 16, i1 %read_bool.i) - %3 = tail call i64 @teardown() - ret i64 %3 + tail call void @setup(i64 %0), !dbg !30 + tail call void @"__hugr__.__main__.rus..main.1"(), !dbg !30 + %1 = tail call i64 @teardown(), !dbg !30 + ret i64 %1, !dbg !30 } declare void @setup(i64) local_unnamed_addr @@ -124,6 +130,38 @@ declare i64 @teardown() local_unnamed_addr attributes #0 = { noreturn } -!name = !{!0} - -!0 = !{!"mainlib"} +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} +!name = !{!3} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v0.32.0)-v0.21.11", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "file:///Users/george.hodgkins/proj/clone-anduril") +!3 = !{!"mainlib"} +!4 = distinct !DISubprogram(name: "rus..main", linkageName: "__hugr__.__main__.rus..main.1", scope: null, file: !5, line: 184, type: !6, scopeLine: 185, spFlags: DISPFlagDefinition, unit: !1) +!5 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "") +!6 = !DISubroutineType(types: !7) +!7 = !{null} +!8 = !DILocation(line: 185, column: 12, scope: !4) +!9 = !DILocation(line: 160, column: 19, scope: !10, inlinedAt: !14) +!10 = distinct !DISubprogram(name: "rus..rus", linkageName: "__hugr__.__main__.rus..rus.17", scope: null, file: !5, line: 157, type: !11, scopeLine: 158, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!11 = !DISubroutineType(types: !12) +!12 = !{!13, !13} +!13 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!14 = distinct !DILocation(line: 186, column: 8, scope: !4) +!15 = !DILocation(line: 160, column: 28, scope: !10, inlinedAt: !14) +!16 = !DILocation(line: 162, column: 12, scope: !10, inlinedAt: !14) +!17 = !DILocation(line: 161, column: 12, scope: !10, inlinedAt: !14) +!18 = !DILocation(line: 164, column: 12, scope: !10, inlinedAt: !14) +!19 = !DILocation(line: 165, column: 12, scope: !10, inlinedAt: !14) +!20 = !DILocation(line: 166, column: 12, scope: !10, inlinedAt: !14) +!21 = !DILocation(line: 169, column: 16, scope: !10, inlinedAt: !14) +!22 = !DILocation(line: 172, column: 12, scope: !10, inlinedAt: !14) +!23 = !DILocation(line: 173, column: 12, scope: !10, inlinedAt: !14) +!24 = !DILocation(line: 174, column: 12, scope: !10, inlinedAt: !14) +!25 = !DILocation(line: 175, column: 12, scope: !10, inlinedAt: !14) +!26 = !DILocation(line: 181, column: 12, scope: !10, inlinedAt: !14) +!27 = !DILocation(line: 187, column: 8, scope: !4) +!28 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !29, type: !11, spFlags: DISPFlagDefinition, unit: !1) +!29 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") +!30 = !DILocation(line: 0, scope: !28) diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-discard_qb_array/discard_qb_array_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-discard_qb_array/discard_qb_array_x86_64-unknown-linux-gnu index 9d0d0dbab..e250e09b1 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-discard_qb_array/discard_qb_array_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-discard_qb_array/discard_qb_array_x86_64-unknown-linux-gnu @@ -4,284 +4,363 @@ target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80: 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" @"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." +define void @"__hugr__.__main__.discard_qb_array..main.1"() local_unnamed_addr !dbg !4 { +alloca_block: + %0 = tail call ptr @heap_alloc(i64 80), !dbg !8 + %1 = tail call ptr @heap_alloc(i64 8), !dbg !8 + store i64 -1, ptr %1, align 1, !dbg !8 + %qalloc.i = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !9 + br i1 %not_max.not.not.i, label %cond_233_case_0.i, label %__barray_check_bounds.exit, !dbg !9 + +cond_233_case_0.i: ; preds = %cond_exit_20.8, %cond_exit_20.7, %cond_exit_20.6, %cond_exit_20.5, %cond_exit_20.4, %cond_exit_20.3, %cond_exit_20.2, %cond_exit_20.1, %cond_exit_20, %alloca_block + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 + unreachable, !dbg !9 + +__barray_check_bounds.exit: ; preds = %alloca_block + tail call void @___reset(i64 %qalloc.i), !dbg !9 + %2 = load i64, ptr %1, align 4 + %3 = trunc i64 %2 to i1 + br i1 %3, label %cond_exit_20, 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_20: ; preds = %__barray_check_bounds.exit + %4 = and i64 %2, -2 + store i64 %4, ptr %1, align 4 + store i64 %qalloc.i, ptr %0, align 4 + %qalloc.i.1 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1, !dbg !9 + br i1 %not_max.not.not.i.1, label %cond_233_case_0.i, label %__barray_check_bounds.exit.1, !dbg !9 + +__barray_check_bounds.exit.1: ; preds = %cond_exit_20 + tail call void @___reset(i64 %qalloc.i.1), !dbg !9 + %5 = load i64, ptr %1, align 4 + %6 = and i64 %5, 2 + %.not = icmp eq i64 %6, 0 + br i1 %.not, label %panic.i, label %cond_exit_20.1 + +cond_exit_20.1: ; preds = %__barray_check_bounds.exit.1 + %7 = and i64 %5, -3 + store i64 %7, ptr %1, align 4 + %8 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %qalloc.i.1, ptr %8, align 4 + %qalloc.i.2 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1, !dbg !9 + br i1 %not_max.not.not.i.2, label %cond_233_case_0.i, label %__barray_check_bounds.exit.2, !dbg !9 + +__barray_check_bounds.exit.2: ; preds = %cond_exit_20.1 + tail call void @___reset(i64 %qalloc.i.2), !dbg !9 + %9 = load i64, ptr %1, align 4 + %10 = and i64 %9, 4 + %.not108 = icmp eq i64 %10, 0 + br i1 %.not108, label %panic.i, label %cond_exit_20.2 + +cond_exit_20.2: ; preds = %__barray_check_bounds.exit.2 + %11 = and i64 %9, -5 + store i64 %11, ptr %1, align 4 + %12 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %qalloc.i.2, ptr %12, align 4 + %qalloc.i.3 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1, !dbg !9 + br i1 %not_max.not.not.i.3, label %cond_233_case_0.i, label %__barray_check_bounds.exit.3, !dbg !9 + +__barray_check_bounds.exit.3: ; preds = %cond_exit_20.2 + tail call void @___reset(i64 %qalloc.i.3), !dbg !9 + %13 = load i64, ptr %1, align 4 + %14 = and i64 %13, 8 + %.not109 = icmp eq i64 %14, 0 + br i1 %.not109, label %panic.i, label %cond_exit_20.3 + +cond_exit_20.3: ; preds = %__barray_check_bounds.exit.3 + %15 = and i64 %13, -9 + store i64 %15, ptr %1, align 4 + %16 = getelementptr inbounds nuw i8, ptr %0, i64 24 + store i64 %qalloc.i.3, ptr %16, align 4 + %qalloc.i.4 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1, !dbg !9 + br i1 %not_max.not.not.i.4, label %cond_233_case_0.i, label %__barray_check_bounds.exit.4, !dbg !9 + +__barray_check_bounds.exit.4: ; preds = %cond_exit_20.3 + tail call void @___reset(i64 %qalloc.i.4), !dbg !9 + %17 = load i64, ptr %1, align 4 + %18 = and i64 %17, 16 + %.not110 = icmp eq i64 %18, 0 + br i1 %.not110, label %panic.i, label %cond_exit_20.4 + +cond_exit_20.4: ; preds = %__barray_check_bounds.exit.4 + %19 = and i64 %17, -17 + store i64 %19, ptr %1, align 4 + %20 = getelementptr inbounds nuw i8, ptr %0, i64 32 + store i64 %qalloc.i.4, ptr %20, align 4 + %qalloc.i.5 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.5 = icmp eq i64 %qalloc.i.5, -1, !dbg !9 + br i1 %not_max.not.not.i.5, label %cond_233_case_0.i, label %__barray_check_bounds.exit.5, !dbg !9 + +__barray_check_bounds.exit.5: ; preds = %cond_exit_20.4 + tail call void @___reset(i64 %qalloc.i.5), !dbg !9 + %21 = load i64, ptr %1, align 4 + %22 = and i64 %21, 32 + %.not111 = icmp eq i64 %22, 0 + br i1 %.not111, label %panic.i, label %cond_exit_20.5 + +cond_exit_20.5: ; preds = %__barray_check_bounds.exit.5 + %23 = and i64 %21, -33 + store i64 %23, ptr %1, align 4 + %24 = getelementptr inbounds nuw i8, ptr %0, i64 40 + store i64 %qalloc.i.5, ptr %24, align 4 + %qalloc.i.6 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.6 = icmp eq i64 %qalloc.i.6, -1, !dbg !9 + br i1 %not_max.not.not.i.6, label %cond_233_case_0.i, label %__barray_check_bounds.exit.6, !dbg !9 + +__barray_check_bounds.exit.6: ; preds = %cond_exit_20.5 + tail call void @___reset(i64 %qalloc.i.6), !dbg !9 + %25 = load i64, ptr %1, align 4 + %26 = and i64 %25, 64 + %.not112 = icmp eq i64 %26, 0 + br i1 %.not112, label %panic.i, label %cond_exit_20.6 + +cond_exit_20.6: ; preds = %__barray_check_bounds.exit.6 + %27 = and i64 %25, -65 + store i64 %27, ptr %1, align 4 + %28 = getelementptr inbounds nuw i8, ptr %0, i64 48 + store i64 %qalloc.i.6, ptr %28, align 4 + %qalloc.i.7 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.7 = icmp eq i64 %qalloc.i.7, -1, !dbg !9 + br i1 %not_max.not.not.i.7, label %cond_233_case_0.i, label %__barray_check_bounds.exit.7, !dbg !9 + +__barray_check_bounds.exit.7: ; preds = %cond_exit_20.6 + tail call void @___reset(i64 %qalloc.i.7), !dbg !9 + %29 = load i64, ptr %1, align 4 + %30 = and i64 %29, 128 + %.not113 = icmp eq i64 %30, 0 + br i1 %.not113, label %panic.i, label %cond_exit_20.7 + +cond_exit_20.7: ; preds = %__barray_check_bounds.exit.7 + %31 = and i64 %29, -129 + store i64 %31, ptr %1, align 4 + %32 = getelementptr inbounds nuw i8, ptr %0, i64 56 + store i64 %qalloc.i.7, ptr %32, align 4 + %qalloc.i.8 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.8 = icmp eq i64 %qalloc.i.8, -1, !dbg !9 + br i1 %not_max.not.not.i.8, label %cond_233_case_0.i, label %__barray_check_bounds.exit.8, !dbg !9 + +__barray_check_bounds.exit.8: ; preds = %cond_exit_20.7 + tail call void @___reset(i64 %qalloc.i.8), !dbg !9 + %33 = load i64, ptr %1, align 4 + %34 = and i64 %33, 256 + %.not114 = icmp eq i64 %34, 0 + br i1 %.not114, label %panic.i, label %cond_exit_20.8 + +cond_exit_20.8: ; preds = %__barray_check_bounds.exit.8 + %35 = and i64 %33, -257 + store i64 %35, ptr %1, align 4 + %36 = getelementptr inbounds nuw i8, ptr %0, i64 64 + store i64 %qalloc.i.8, ptr %36, align 4 + %qalloc.i.9 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.9 = icmp eq i64 %qalloc.i.9, -1, !dbg !9 + br i1 %not_max.not.not.i.9, label %cond_233_case_0.i, label %__barray_check_bounds.exit.9, !dbg !9 + +__barray_check_bounds.exit.9: ; preds = %cond_exit_20.8 + tail call void @___reset(i64 %qalloc.i.9), !dbg !9 + %37 = load i64, ptr %1, align 4 + %38 = and i64 %37, 512 + %.not115 = icmp eq i64 %38, 0 + br i1 %.not115, label %panic.i, label %cond_exit_20.9 + +cond_exit_20.9: ; preds = %__barray_check_bounds.exit.9 + %39 = and i64 %37, -513 + store i64 %39, ptr %1, align 4 + %40 = getelementptr inbounds nuw i8, ptr %0, i64 72 + store i64 %qalloc.i.9, ptr %40, align 4 + %41 = load i64, ptr %1, align 4, !dbg !10 + %42 = trunc i64 %41 to i1, !dbg !10 + br i1 %42, label %cond_171_case_1.1.i, label %__barray_mask_borrow.exit.i + +cond_171_case_1.1.i: ; preds = %__barray_mask_borrow.exit.i, %cond_exit_20.9 + %43 = phi i64 [ %41, %cond_exit_20.9 ], [ %.pre.i, %__barray_mask_borrow.exit.i ], !dbg !10 + %44 = and i64 %43, 2, !dbg !10 + %.not.i = icmp eq i64 %44, 0, !dbg !10 + br i1 %.not.i, label %__barray_mask_borrow.exit.1.i, label %cond_171_case_1.2.i + +__barray_mask_borrow.exit.1.i: ; preds = %cond_171_case_1.1.i + %45 = or disjoint i64 %43, 2, !dbg !21 + store i64 %45, ptr %1, align 4, !dbg !21 + %46 = getelementptr inbounds nuw i8, ptr %0, i64 8, !dbg !23 + %47 = load i64, ptr %46, align 4, !dbg !23 + tail call void @___qfree(i64 %47), !dbg !24 + %.pre337.i = load i64, ptr %1, align 4, !dbg !10 + br label %cond_171_case_1.2.i + +cond_171_case_1.2.i: ; preds = %__barray_mask_borrow.exit.1.i, %cond_171_case_1.1.i + %48 = phi i64 [ %.pre337.i, %__barray_mask_borrow.exit.1.i ], [ %43, %cond_171_case_1.1.i ], !dbg !10 + %49 = and i64 %48, 4, !dbg !10 + %.not345.i = icmp eq i64 %49, 0, !dbg !10 + br i1 %.not345.i, label %__barray_mask_borrow.exit.2.i, label %cond_171_case_1.3.i + +__barray_mask_borrow.exit.2.i: ; preds = %cond_171_case_1.2.i + %50 = or disjoint i64 %48, 4, !dbg !21 + store i64 %50, ptr %1, align 4, !dbg !21 + %51 = getelementptr inbounds nuw i8, ptr %0, i64 16, !dbg !23 + %52 = load i64, ptr %51, align 4, !dbg !23 + tail call void @___qfree(i64 %52), !dbg !24 + %.pre338.i = load i64, ptr %1, align 4, !dbg !10 + br label %cond_171_case_1.3.i + +cond_171_case_1.3.i: ; preds = %__barray_mask_borrow.exit.2.i, %cond_171_case_1.2.i + %53 = phi i64 [ %.pre338.i, %__barray_mask_borrow.exit.2.i ], [ %48, %cond_171_case_1.2.i ], !dbg !10 + %54 = and i64 %53, 8, !dbg !10 + %.not346.i = icmp eq i64 %54, 0, !dbg !10 + br i1 %.not346.i, label %__barray_mask_borrow.exit.3.i, label %cond_171_case_1.4.i + +__barray_mask_borrow.exit.3.i: ; preds = %cond_171_case_1.3.i + %55 = or disjoint i64 %53, 8, !dbg !21 + store i64 %55, ptr %1, align 4, !dbg !21 + %56 = getelementptr inbounds nuw i8, ptr %0, i64 24, !dbg !23 + %57 = load i64, ptr %56, align 4, !dbg !23 + tail call void @___qfree(i64 %57), !dbg !24 + %.pre339.i = load i64, ptr %1, align 4, !dbg !10 + br label %cond_171_case_1.4.i + +cond_171_case_1.4.i: ; preds = %__barray_mask_borrow.exit.3.i, %cond_171_case_1.3.i + %58 = phi i64 [ %.pre339.i, %__barray_mask_borrow.exit.3.i ], [ %53, %cond_171_case_1.3.i ], !dbg !10 + %59 = and i64 %58, 16, !dbg !10 + %.not347.i = icmp eq i64 %59, 0, !dbg !10 + br i1 %.not347.i, label %__barray_mask_borrow.exit.4.i, label %cond_171_case_1.5.i + +__barray_mask_borrow.exit.4.i: ; preds = %cond_171_case_1.4.i + %60 = or disjoint i64 %58, 16, !dbg !21 + store i64 %60, ptr %1, align 4, !dbg !21 + %61 = getelementptr inbounds nuw i8, ptr %0, i64 32, !dbg !23 + %62 = load i64, ptr %61, align 4, !dbg !23 + tail call void @___qfree(i64 %62), !dbg !24 + %.pre340.i = load i64, ptr %1, align 4, !dbg !10 + br label %cond_171_case_1.5.i + +cond_171_case_1.5.i: ; preds = %__barray_mask_borrow.exit.4.i, %cond_171_case_1.4.i + %63 = phi i64 [ %.pre340.i, %__barray_mask_borrow.exit.4.i ], [ %58, %cond_171_case_1.4.i ], !dbg !10 + %64 = and i64 %63, 32, !dbg !10 + %.not348.i = icmp eq i64 %64, 0, !dbg !10 + br i1 %.not348.i, label %__barray_mask_borrow.exit.5.i, label %cond_171_case_1.6.i + +__barray_mask_borrow.exit.5.i: ; preds = %cond_171_case_1.5.i + %65 = or disjoint i64 %63, 32, !dbg !21 + store i64 %65, ptr %1, align 4, !dbg !21 + %66 = getelementptr inbounds nuw i8, ptr %0, i64 40, !dbg !23 + %67 = load i64, ptr %66, align 4, !dbg !23 + tail call void @___qfree(i64 %67), !dbg !24 + %.pre341.i = load i64, ptr %1, align 4, !dbg !10 + br label %cond_171_case_1.6.i + +cond_171_case_1.6.i: ; preds = %__barray_mask_borrow.exit.5.i, %cond_171_case_1.5.i + %68 = phi i64 [ %.pre341.i, %__barray_mask_borrow.exit.5.i ], [ %63, %cond_171_case_1.5.i ], !dbg !10 + %69 = and i64 %68, 64, !dbg !10 + %.not349.i = icmp eq i64 %69, 0, !dbg !10 + br i1 %.not349.i, label %__barray_mask_borrow.exit.6.i, label %cond_171_case_1.7.i + +__barray_mask_borrow.exit.6.i: ; preds = %cond_171_case_1.6.i + %70 = or disjoint i64 %68, 64, !dbg !21 + store i64 %70, ptr %1, align 4, !dbg !21 + %71 = getelementptr inbounds nuw i8, ptr %0, i64 48, !dbg !23 + %72 = load i64, ptr %71, align 4, !dbg !23 + tail call void @___qfree(i64 %72), !dbg !24 + %.pre342.i = load i64, ptr %1, align 4, !dbg !10 + br label %cond_171_case_1.7.i + +cond_171_case_1.7.i: ; preds = %__barray_mask_borrow.exit.6.i, %cond_171_case_1.6.i + %73 = phi i64 [ %.pre342.i, %__barray_mask_borrow.exit.6.i ], [ %68, %cond_171_case_1.6.i ], !dbg !10 + %74 = and i64 %73, 128, !dbg !10 + %.not350.i = icmp eq i64 %74, 0, !dbg !10 + br i1 %.not350.i, label %__barray_mask_borrow.exit.7.i, label %cond_171_case_1.8.i + +__barray_mask_borrow.exit.7.i: ; preds = %cond_171_case_1.7.i + %75 = or disjoint i64 %73, 128, !dbg !21 + store i64 %75, ptr %1, align 4, !dbg !21 + %76 = getelementptr inbounds nuw i8, ptr %0, i64 56, !dbg !23 + %77 = load i64, ptr %76, align 4, !dbg !23 + tail call void @___qfree(i64 %77), !dbg !24 + %.pre343.i = load i64, ptr %1, align 4, !dbg !10 + br label %cond_171_case_1.8.i + +cond_171_case_1.8.i: ; preds = %__barray_mask_borrow.exit.7.i, %cond_171_case_1.7.i + %78 = phi i64 [ %.pre343.i, %__barray_mask_borrow.exit.7.i ], [ %73, %cond_171_case_1.7.i ], !dbg !10 + %79 = and i64 %78, 256, !dbg !10 + %.not351.i = icmp eq i64 %79, 0, !dbg !10 + br i1 %.not351.i, label %__barray_mask_borrow.exit.8.i, label %__barray_check_bounds.exit.9.i + +__barray_mask_borrow.exit.8.i: ; preds = %cond_171_case_1.8.i + %80 = or disjoint i64 %78, 256, !dbg !21 + store i64 %80, ptr %1, align 4, !dbg !21 + %81 = getelementptr inbounds nuw i8, ptr %0, i64 64, !dbg !23 + %82 = load i64, ptr %81, align 4, !dbg !23 + tail call void @___qfree(i64 %82), !dbg !24 + %.pre = load i64, ptr %1, align 4, !dbg !10 + br label %__barray_check_bounds.exit.9.i + +__barray_check_bounds.exit.9.i: ; preds = %__barray_mask_borrow.exit.8.i, %cond_171_case_1.8.i + %83 = phi i64 [ %.pre, %__barray_mask_borrow.exit.8.i ], [ %78, %cond_171_case_1.8.i ], !dbg !10 + %84 = and i64 %83, 512, !dbg !10 + %.not352.i = icmp eq i64 %84, 0, !dbg !10 + br i1 %.not352.i, label %__barray_mask_borrow.exit.9.i, label %cond_exit_156.i + +__barray_mask_borrow.exit.9.i: ; preds = %__barray_check_bounds.exit.9.i + %85 = or disjoint i64 %83, 512, !dbg !21 + store i64 %85, ptr %1, align 4, !dbg !21 + %86 = getelementptr inbounds nuw i8, ptr %0, i64 72, !dbg !23 + %87 = load i64, ptr %86, align 4, !dbg !23 + tail call void @___qfree(i64 %87), !dbg !24 + %.pre344.i = load i64, ptr %1, align 4, !dbg !25 + br label %cond_exit_156.i + +cond_exit_156.i: ; preds = %__barray_mask_borrow.exit.9.i, %__barray_check_bounds.exit.9.i + %88 = phi i64 [ %.pre344.i, %__barray_mask_borrow.exit.9.i ], [ %83, %__barray_check_bounds.exit.9.i ], !dbg !25 + %89 = or i64 %88, -1024, !dbg !25 + store i64 %89, ptr %1, align 4, !dbg !25 + %90 = icmp eq i64 %89, -1, !dbg !25 + br i1 %90, label %"__hugr__.guppylang.std.quantum.discard_array$10.113.exit", label %mask_block_err.i.i, !dbg !25 + +mask_block_err.i.i: ; preds = %cond_exit_156.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0"), !dbg !25 + unreachable, !dbg !25 + +__barray_mask_borrow.exit.i: ; preds = %cond_exit_20.9 + %91 = or disjoint i64 %41, 1, !dbg !21 + store i64 %91, ptr %1, align 4, !dbg !21 + %92 = load i64, ptr %0, align 4, !dbg !23 + tail call void @___qfree(i64 %92), !dbg !24 + %.pre.i = load i64, ptr %1, align 4, !dbg !10 + br label %cond_171_case_1.1.i + +"__hugr__.guppylang.std.quantum.discard_array$10.113.exit": ; preds = %cond_exit_156.i + tail call void @heap_free(ptr nonnull %0), !dbg !27 + tail call void @heap_free(ptr nonnull %1), !dbg !27 + ret void +} + declare ptr @heap_alloc(i64) local_unnamed_addr ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #0 -declare void @___qfree(i64) local_unnamed_addr - declare void @heap_free(ptr) local_unnamed_addr +declare void @___qfree(i64) local_unnamed_addr + declare i64 @___qalloc() local_unnamed_addr declare void @___reset(i64) local_unnamed_addr -define i64 @qmain(i64 %0) local_unnamed_addr { +define i64 @qmain(i64 %0) local_unnamed_addr !dbg !28 { entry: - tail call void @setup(i64 %0) - %1 = tail call ptr @heap_alloc(i64 80) - %2 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %2, align 1 - %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.not.i.i, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i - -cond_213_case_0.i.i: ; preds = %cond_exit_20.i.8, %cond_exit_20.i.7, %cond_exit_20.i.6, %cond_exit_20.i.5, %cond_exit_20.i.4, %cond_exit_20.i.3, %cond_exit_20.i.2, %cond_exit_20.i.1, %cond_exit_20.i, %entry - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__barray_check_bounds.exit.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - %3 = load i64, ptr %2, align 4 - %4 = trunc i64 %3 to i1 - br i1 %4, label %cond_exit_20.i, label %panic.i.i - -panic.i.i: ; preds = %__barray_check_bounds.exit.i.9, %__barray_check_bounds.exit.i.8, %__barray_check_bounds.exit.i.7, %__barray_check_bounds.exit.i.6, %__barray_check_bounds.exit.i.5, %__barray_check_bounds.exit.i.4, %__barray_check_bounds.exit.i.3, %__barray_check_bounds.exit.i.2, %__barray_check_bounds.exit.i.1, %__barray_check_bounds.exit.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_exit_20.i: ; preds = %__barray_check_bounds.exit.i - %5 = and i64 %3, -2 - store i64 %5, ptr %2, align 4 - store i64 %qalloc.i.i, ptr %1, align 4 - %qalloc.i.i.1 = tail call i64 @___qalloc() - %not_max.not.not.i.i.1 = icmp eq i64 %qalloc.i.i.1, -1 - br i1 %not_max.not.not.i.i.1, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.1 - -__barray_check_bounds.exit.i.1: ; preds = %cond_exit_20.i - tail call void @___reset(i64 %qalloc.i.i.1) - %6 = load i64, ptr %2, align 4 - %7 = and i64 %6, 2 - %.not = icmp eq i64 %7, 0 - br i1 %.not, label %panic.i.i, label %cond_exit_20.i.1 - -cond_exit_20.i.1: ; preds = %__barray_check_bounds.exit.i.1 - %8 = and i64 %6, -3 - store i64 %8, ptr %2, align 4 - %9 = getelementptr inbounds nuw i8, ptr %1, i64 8 - store i64 %qalloc.i.i.1, ptr %9, align 4 - %qalloc.i.i.2 = tail call i64 @___qalloc() - %not_max.not.not.i.i.2 = icmp eq i64 %qalloc.i.i.2, -1 - br i1 %not_max.not.not.i.i.2, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.2 - -__barray_check_bounds.exit.i.2: ; preds = %cond_exit_20.i.1 - tail call void @___reset(i64 %qalloc.i.i.2) - %10 = load i64, ptr %2, align 4 - %11 = and i64 %10, 4 - %.not1 = icmp eq i64 %11, 0 - br i1 %.not1, label %panic.i.i, label %cond_exit_20.i.2 - -cond_exit_20.i.2: ; preds = %__barray_check_bounds.exit.i.2 - %12 = and i64 %10, -5 - store i64 %12, ptr %2, align 4 - %13 = getelementptr inbounds nuw i8, ptr %1, i64 16 - store i64 %qalloc.i.i.2, ptr %13, align 4 - %qalloc.i.i.3 = tail call i64 @___qalloc() - %not_max.not.not.i.i.3 = icmp eq i64 %qalloc.i.i.3, -1 - br i1 %not_max.not.not.i.i.3, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.3 - -__barray_check_bounds.exit.i.3: ; preds = %cond_exit_20.i.2 - tail call void @___reset(i64 %qalloc.i.i.3) - %14 = load i64, ptr %2, align 4 - %15 = and i64 %14, 8 - %.not2 = icmp eq i64 %15, 0 - br i1 %.not2, label %panic.i.i, label %cond_exit_20.i.3 - -cond_exit_20.i.3: ; preds = %__barray_check_bounds.exit.i.3 - %16 = and i64 %14, -9 - store i64 %16, ptr %2, align 4 - %17 = getelementptr inbounds nuw i8, ptr %1, i64 24 - store i64 %qalloc.i.i.3, ptr %17, align 4 - %qalloc.i.i.4 = tail call i64 @___qalloc() - %not_max.not.not.i.i.4 = icmp eq i64 %qalloc.i.i.4, -1 - br i1 %not_max.not.not.i.i.4, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.4 - -__barray_check_bounds.exit.i.4: ; preds = %cond_exit_20.i.3 - tail call void @___reset(i64 %qalloc.i.i.4) - %18 = load i64, ptr %2, align 4 - %19 = and i64 %18, 16 - %.not3 = icmp eq i64 %19, 0 - br i1 %.not3, label %panic.i.i, label %cond_exit_20.i.4 - -cond_exit_20.i.4: ; preds = %__barray_check_bounds.exit.i.4 - %20 = and i64 %18, -17 - store i64 %20, ptr %2, align 4 - %21 = getelementptr inbounds nuw i8, ptr %1, i64 32 - store i64 %qalloc.i.i.4, ptr %21, align 4 - %qalloc.i.i.5 = tail call i64 @___qalloc() - %not_max.not.not.i.i.5 = icmp eq i64 %qalloc.i.i.5, -1 - br i1 %not_max.not.not.i.i.5, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.5 - -__barray_check_bounds.exit.i.5: ; preds = %cond_exit_20.i.4 - tail call void @___reset(i64 %qalloc.i.i.5) - %22 = load i64, ptr %2, align 4 - %23 = and i64 %22, 32 - %.not4 = icmp eq i64 %23, 0 - br i1 %.not4, label %panic.i.i, label %cond_exit_20.i.5 - -cond_exit_20.i.5: ; preds = %__barray_check_bounds.exit.i.5 - %24 = and i64 %22, -33 - store i64 %24, ptr %2, align 4 - %25 = getelementptr inbounds nuw i8, ptr %1, i64 40 - store i64 %qalloc.i.i.5, ptr %25, align 4 - %qalloc.i.i.6 = tail call i64 @___qalloc() - %not_max.not.not.i.i.6 = icmp eq i64 %qalloc.i.i.6, -1 - br i1 %not_max.not.not.i.i.6, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.6 - -__barray_check_bounds.exit.i.6: ; preds = %cond_exit_20.i.5 - tail call void @___reset(i64 %qalloc.i.i.6) - %26 = load i64, ptr %2, align 4 - %27 = and i64 %26, 64 - %.not5 = icmp eq i64 %27, 0 - br i1 %.not5, label %panic.i.i, label %cond_exit_20.i.6 - -cond_exit_20.i.6: ; preds = %__barray_check_bounds.exit.i.6 - %28 = and i64 %26, -65 - store i64 %28, ptr %2, align 4 - %29 = getelementptr inbounds nuw i8, ptr %1, i64 48 - store i64 %qalloc.i.i.6, ptr %29, align 4 - %qalloc.i.i.7 = tail call i64 @___qalloc() - %not_max.not.not.i.i.7 = icmp eq i64 %qalloc.i.i.7, -1 - br i1 %not_max.not.not.i.i.7, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.7 - -__barray_check_bounds.exit.i.7: ; preds = %cond_exit_20.i.6 - tail call void @___reset(i64 %qalloc.i.i.7) - %30 = load i64, ptr %2, align 4 - %31 = and i64 %30, 128 - %.not6 = icmp eq i64 %31, 0 - br i1 %.not6, label %panic.i.i, label %cond_exit_20.i.7 - -cond_exit_20.i.7: ; preds = %__barray_check_bounds.exit.i.7 - %32 = and i64 %30, -129 - store i64 %32, ptr %2, align 4 - %33 = getelementptr inbounds nuw i8, ptr %1, i64 56 - store i64 %qalloc.i.i.7, ptr %33, align 4 - %qalloc.i.i.8 = tail call i64 @___qalloc() - %not_max.not.not.i.i.8 = icmp eq i64 %qalloc.i.i.8, -1 - br i1 %not_max.not.not.i.i.8, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.8 - -__barray_check_bounds.exit.i.8: ; preds = %cond_exit_20.i.7 - tail call void @___reset(i64 %qalloc.i.i.8) - %34 = load i64, ptr %2, align 4 - %35 = and i64 %34, 256 - %.not7 = icmp eq i64 %35, 0 - br i1 %.not7, label %panic.i.i, label %cond_exit_20.i.8 - -cond_exit_20.i.8: ; preds = %__barray_check_bounds.exit.i.8 - %36 = and i64 %34, -257 - store i64 %36, ptr %2, align 4 - %37 = getelementptr inbounds nuw i8, ptr %1, i64 64 - store i64 %qalloc.i.i.8, ptr %37, align 4 - %qalloc.i.i.9 = tail call i64 @___qalloc() - %not_max.not.not.i.i.9 = icmp eq i64 %qalloc.i.i.9, -1 - br i1 %not_max.not.not.i.i.9, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.9 - -__barray_check_bounds.exit.i.9: ; preds = %cond_exit_20.i.8 - tail call void @___reset(i64 %qalloc.i.i.9) - %38 = load i64, ptr %2, align 4 - %39 = and i64 %38, 512 - %.not8 = icmp eq i64 %39, 0 - br i1 %.not8, label %panic.i.i, label %cond_exit_20.i.9 - -cond_exit_20.i.9: ; preds = %__barray_check_bounds.exit.i.9 - %40 = and i64 %38, -513 - store i64 %40, ptr %2, align 4 - %41 = getelementptr inbounds nuw i8, ptr %1, i64 72 - store i64 %qalloc.i.i.9, ptr %41, align 4 - %"116.fca.0.insert.i" = insertvalue { ptr, ptr, i64 } poison, ptr %1, 0 - %"116.fca.1.insert.i" = insertvalue { ptr, ptr, i64 } %"116.fca.0.insert.i", ptr %2, 1 - %"116.fca.2.insert.i" = insertvalue { ptr, ptr, i64 } %"116.fca.1.insert.i", i64 0, 2 - %42 = insertvalue { { ptr, ptr, i64 }, i64 } poison, { ptr, ptr, i64 } %"116.fca.2.insert.i", 0 - br label %__barray_check_bounds.exit.i.i.i - -43: ; preds = %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" - %44 = lshr i64 %.fca.1.0.0.2.extract.i.i.i, 6 - %45 = getelementptr i64, ptr %.fca.1.0.0.1.extract.i.i.i, i64 %44 - %46 = load i64, ptr %45, align 4 - %47 = and i64 %.fca.1.0.0.2.extract.i.i.i, 63 - %48 = sub nuw nsw i64 64, %47 - %49 = lshr i64 -1, %48 - %50 = icmp eq i64 %47, 0 - %51 = select i1 %50, i64 0, i64 %49 - %52 = or i64 %46, %51 - store i64 %52, ptr %45, align 4 - %last_valid.i.i.i.i = add i64 %.fca.1.0.0.2.extract.i.i.i, 9 - %53 = lshr i64 %last_valid.i.i.i.i, 6 - %54 = getelementptr inbounds nuw i64, ptr %.fca.1.0.0.1.extract.i.i.i, i64 %53 - %55 = load i64, ptr %54, align 4 - %56 = and i64 %last_valid.i.i.i.i, 63 - %57 = shl nsw i64 -2, %56 - %58 = icmp eq i64 %56, 63 - %59 = select i1 %58, i64 0, i64 %57 - %60 = or i64 %55, %59 - store i64 %60, ptr %54, align 4 - %reass.sub.i.i.i.i = sub nsw i64 %53, %44 - %.not.i.i.i.i = icmp eq i64 %reass.sub.i.i.i.i, -1 - br i1 %.not.i.i.i.i, label %__hugr__.main.1.exit, label %mask_block_ok.i.i.i.i - -61: ; preds = %mask_block_ok.i.i.i.i - %62 = add nuw i64 %.02.i.i.i.i, 1 - %exitcond.not.i.i.i.i = icmp eq i64 %.02.i.i.i.i, %reass.sub.i.i.i.i - br i1 %exitcond.not.i.i.i.i, label %__hugr__.main.1.exit, label %mask_block_ok.i.i.i.i - -mask_block_ok.i.i.i.i: ; preds = %43, %61 - %.02.i.i.i.i = phi i64 [ %62, %61 ], [ 0, %43 ] - %gep.i.i.i.i = getelementptr i64, ptr %45, i64 %.02.i.i.i.i - %63 = load i64, ptr %gep.i.i.i.i, align 4 - %64 = icmp eq i64 %63, -1 - br i1 %64, label %61, label %mask_block_err.i.i.i.i - -mask_block_err.i.i.i.i: ; preds = %mask_block_ok.i.i.i.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit.i.i.i: ; preds = %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i", %cond_exit_20.i.9 - %.fca.2.extract82.i185.i.i = phi i64 [ 0, %cond_exit_20.i.9 ], [ %.fca.1.0.0.2.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %.fca.1.extract81.i184.i.i = phi ptr [ %2, %cond_exit_20.i.9 ], [ %.fca.1.0.0.1.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %.fca.0.extract80.i183.i.i = phi ptr [ %1, %cond_exit_20.i.9 ], [ %.fca.1.0.0.0.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %"294_0.0182.i.i" = phi i64 [ 0, %cond_exit_20.i.9 ], [ %72, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %.pn181.i.i = phi { { ptr, ptr, i64 }, i64 } [ %42, %cond_exit_20.i.9 ], [ %80, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %65 = add i64 %"294_0.0182.i.i", %.fca.2.extract82.i185.i.i - %66 = lshr i64 %65, 6 - %67 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i184.i.i, i64 %66 - %68 = load i64, ptr %67, align 4 - %69 = and i64 %65, 63 - %70 = lshr i64 %68, %69 - %71 = trunc i64 %70 to i1 - br i1 %71, label %panic.i.i.i.i, label %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" - -panic.i.i.i.i: ; preds = %__barray_check_bounds.exit.i.i.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i": ; preds = %__barray_check_bounds.exit.i.i.i - %72 = add nuw nsw i64 %"294_0.0182.i.i", 1 - %73 = shl nuw i64 1, %69 - %74 = xor i64 %73, %68 - store i64 %74, ptr %67, align 4 - %75 = getelementptr inbounds i64, ptr %.fca.0.extract80.i183.i.i, i64 %65 - %76 = load i64, ptr %75, align 4 - %.fca.1.0.0.0.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 0 - %.fca.1.0.0.1.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 1 - %.fca.1.0.0.2.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 2 - %77 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, i64 %72, 1 - %78 = insertvalue { { ptr, ptr, i64 }, i64 } %77, ptr %.fca.1.0.0.0.extract.i.i.i, 0, 0 - %79 = insertvalue { { ptr, ptr, i64 }, i64 } %78, ptr %.fca.1.0.0.1.extract.i.i.i, 0, 1 - %80 = insertvalue { { ptr, ptr, i64 }, i64 } %79, i64 %.fca.1.0.0.2.extract.i.i.i, 0, 2 - tail call void @___qfree(i64 %76) - %.not.i.i = icmp eq i64 %"294_0.0182.i.i", 9 - br i1 %.not.i.i, label %43, label %__barray_check_bounds.exit.i.i.i - -__hugr__.main.1.exit: ; preds = %61, %43 - tail call void @heap_free(ptr %.fca.1.0.0.0.extract.i.i.i) - tail call void @heap_free(ptr nonnull %.fca.1.0.0.1.extract.i.i.i) - %81 = tail call i64 @teardown() - ret i64 %81 + tail call void @setup(i64 %0), !dbg !32 + tail call void @"__hugr__.__main__.discard_qb_array..main.1"(), !dbg !32 + %1 = tail call i64 @teardown(), !dbg !32 + ret i64 %1, !dbg !32 } declare void @setup(i64) local_unnamed_addr @@ -290,6 +369,40 @@ declare i64 @teardown() local_unnamed_addr attributes #0 = { noreturn } -!name = !{!0} - -!0 = !{!"mainlib"} +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} +!name = !{!3} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v0.32.0)-v0.21.11", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "file:///Users/george.hodgkins/proj/clone-anduril") +!3 = !{!"mainlib"} +!4 = distinct !DISubprogram(name: "discard_qb_array..main", linkageName: "__hugr__.__main__.discard_qb_array..main.1", scope: null, file: !5, line: 92, type: !6, scopeLine: 93, spFlags: DISPFlagDefinition, unit: !1) +!5 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "") +!6 = !DISubroutineType(types: !7) +!7 = !{null} +!8 = !DILocation(line: 93, column: 13, scope: !4) +!9 = !DILocation(line: 93, column: 19, scope: !4) +!10 = !DILocation(line: 390, column: 15, scope: !11, inlinedAt: !19) +!11 = distinct !DISubprogram(name: "std.quantum.discard_array$10", linkageName: "__hugr__.guppylang.std.quantum.discard_array$10.113", scope: null, file: !12, line: 387, type: !13, scopeLine: 389, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!12 = !DIFile(filename: "/Users/george.hodgkins/proj/clone-anduril/.venv/lib/python3.10/site-packages/guppylang/std/quantum/__init__.py", directory: "") +!13 = !DISubroutineType(types: !14) +!14 = !{null, !15} +!15 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ ptr, ptr, i64 }", file: !2, size: 24, align: 8, elements: !16) +!16 = !{!17, !17, !18} +!17 = !DIBasicType(name: "ptr", size: 64, encoding: DW_ATE_address) +!18 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!19 = distinct !DILocation(line: 390, column: 15, scope: !11, inlinedAt: !20) +!20 = distinct !DILocation(line: 94, column: 8, scope: !4) +!21 = !DILocation(line: 391, column: 20, scope: !11, inlinedAt: !22) +!22 = distinct !DILocation(line: 391, column: 20, scope: !11, inlinedAt: !20) +!23 = !DILocation(line: 391, column: 20, scope: !11, inlinedAt: !20) +!24 = !DILocation(line: 391, column: 12, scope: !11, inlinedAt: !20) +!25 = !DILocation(line: 392, column: 4, scope: !11, inlinedAt: !26) +!26 = distinct !DILocation(line: 392, column: 4, scope: !11, inlinedAt: !20) +!27 = !DILocation(line: 392, column: 4, scope: !11, inlinedAt: !20) +!28 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !29, type: !30, spFlags: DISPFlagDefinition, unit: !1) +!29 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") +!30 = !DISubroutineType(types: !31) +!31 = !{!18, !18} +!32 = !DILocation(line: 0, scope: !28) diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-flip_some/flip_some_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-flip_some/flip_some_x86_64-unknown-linux-gnu index 9dced28f8..be123ff59 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-flip_some/flip_some_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-flip_some/flip_some_x86_64-unknown-linux-gnu @@ -9,6 +9,74 @@ target triple = "x86_64-unknown-linux-gnu" @res_c3.B223E16D.0 = private constant [13 x i8] c"\0CUSER:BOOL:c3" @"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." +define void @"__hugr__.__main__.flip_some..main.1"() local_unnamed_addr !dbg !4 { +alloca_block: + %qalloc.i = tail call i64 @___qalloc(), !dbg !8 + %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 + br i1 %not_max.not.not.i, label %cond_40_case_0.i, label %__hugr__.__tk2_qalloc.36.exit, !dbg !8 + +cond_40_case_0.i: ; preds = %alloca_block + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + unreachable, !dbg !8 + +__hugr__.__tk2_qalloc.36.exit: ; preds = %alloca_block + tail call void @___reset(i64 %qalloc.i), !dbg !8 + tail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00), !dbg !9 + %qalloc.i101 = tail call i64 @___qalloc(), !dbg !10 + %not_max.not.not.i102 = icmp eq i64 %qalloc.i101, -1, !dbg !10 + br i1 %not_max.not.not.i102, label %cond_54_case_0.i, label %__hugr__.__tk2_qalloc.50.exit, !dbg !10 + +cond_54_case_0.i: ; preds = %__hugr__.__tk2_qalloc.36.exit + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !10 + unreachable, !dbg !10 + +__hugr__.__tk2_qalloc.50.exit: ; preds = %__hugr__.__tk2_qalloc.36.exit + tail call void @___reset(i64 %qalloc.i101), !dbg !10 + %qalloc.i103 = tail call i64 @___qalloc(), !dbg !11 + %not_max.not.not.i104 = icmp eq i64 %qalloc.i103, -1, !dbg !11 + br i1 %not_max.not.not.i104, label %cond_68_case_0.i, label %__hugr__.__tk2_qalloc.64.exit, !dbg !11 + +cond_68_case_0.i: ; preds = %__hugr__.__tk2_qalloc.50.exit + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !11 + unreachable, !dbg !11 + +__hugr__.__tk2_qalloc.64.exit: ; preds = %__hugr__.__tk2_qalloc.50.exit + tail call void @___reset(i64 %qalloc.i103), !dbg !11 + tail call void @___rxy(i64 %qalloc.i103, double 0x400921FB54442D18, double 0.000000e+00), !dbg !12 + %qalloc.i105 = tail call i64 @___qalloc(), !dbg !13 + %not_max.not.not.i106 = icmp eq i64 %qalloc.i105, -1, !dbg !13 + br i1 %not_max.not.not.i106, label %cond_82_case_0.i, label %__hugr__.__tk2_qalloc.78.exit, !dbg !13 + +cond_82_case_0.i: ; preds = %__hugr__.__tk2_qalloc.64.exit + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !13 + unreachable, !dbg !13 + +__hugr__.__tk2_qalloc.78.exit: ; preds = %__hugr__.__tk2_qalloc.64.exit + tail call void @___reset(i64 %qalloc.i105), !dbg !13 + %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) + tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool), !dbg !14 + %lazy_measure22 = tail call i64 @___lazy_measure(i64 %qalloc.i101) + tail call void @___qfree(i64 %qalloc.i101) + %read_bool35 = 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_c1.1F7A6571.0, i64 12, i1 %read_bool35), !dbg !15 + %lazy_measure44 = tail call i64 @___lazy_measure(i64 %qalloc.i103) + tail call void @___qfree(i64 %qalloc.i103) + %read_bool57 = tail call i1 @___read_future_bool(i64 %lazy_measure44) + tail call void @___dec_future_refcount(i64 %lazy_measure44) + tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool57), !dbg !16 + tail call void @___rxy(i64 %qalloc.i105, double 0x400921FB54442D18, double 0.000000e+00), !dbg !17 + %lazy_measure67 = tail call i64 @___lazy_measure(i64 %qalloc.i105) + tail call void @___qfree(i64 %qalloc.i105) + %read_bool80 = tail call i1 @___read_future_bool(i64 %lazy_measure67) + tail call void @___dec_future_refcount(i64 %lazy_measure67) + tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool80), !dbg !18 + ret void +} + declare i64 @___lazy_measure(i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -28,74 +96,12 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @___rxy(i64, double, double) local_unnamed_addr -define i64 @qmain(i64 %0) local_unnamed_addr { +define i64 @qmain(i64 %0) local_unnamed_addr !dbg !19 { entry: - tail call void @setup(i64 %0) - %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.not.i.i, label %cond_40_case_0.i.i, label %__hugr__.__tk2_qalloc.36.exit.i - -cond_40_case_0.i.i: ; preds = %entry - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_qalloc.36.exit.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - tail call void @___rxy(i64 %qalloc.i.i, double 0x400921FB54442D18, double 0.000000e+00) - %qalloc.i101.i = tail call i64 @___qalloc() - %not_max.not.not.i102.i = icmp eq i64 %qalloc.i101.i, -1 - br i1 %not_max.not.not.i102.i, label %cond_54_case_0.i.i, label %__hugr__.__tk2_qalloc.50.exit.i - -cond_54_case_0.i.i: ; preds = %__hugr__.__tk2_qalloc.36.exit.i - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_qalloc.50.exit.i: ; preds = %__hugr__.__tk2_qalloc.36.exit.i - tail call void @___reset(i64 %qalloc.i101.i) - %qalloc.i103.i = tail call i64 @___qalloc() - %not_max.not.not.i104.i = icmp eq i64 %qalloc.i103.i, -1 - br i1 %not_max.not.not.i104.i, label %cond_68_case_0.i.i, label %__hugr__.__tk2_qalloc.64.exit.i - -cond_68_case_0.i.i: ; preds = %__hugr__.__tk2_qalloc.50.exit.i - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_qalloc.64.exit.i: ; preds = %__hugr__.__tk2_qalloc.50.exit.i - tail call void @___reset(i64 %qalloc.i103.i) - tail call void @___rxy(i64 %qalloc.i103.i, double 0x400921FB54442D18, double 0.000000e+00) - %qalloc.i105.i = tail call i64 @___qalloc() - %not_max.not.not.i106.i = icmp eq i64 %qalloc.i105.i, -1 - br i1 %not_max.not.not.i106.i, label %cond_82_case_0.i.i, label %__hugr__.main.1.exit - -cond_82_case_0.i.i: ; preds = %__hugr__.__tk2_qalloc.64.exit.i - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.main.1.exit: ; preds = %__hugr__.__tk2_qalloc.64.exit.i - tail call void @___reset(i64 %qalloc.i105.i) - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i.i) - tail call void @___qfree(i64 %qalloc.i.i) - %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) - tail call void @___dec_future_refcount(i64 %lazy_measure.i) - tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool.i) - %lazy_measure22.i = tail call i64 @___lazy_measure(i64 %qalloc.i101.i) - tail call void @___qfree(i64 %qalloc.i101.i) - %read_bool35.i = tail call i1 @___read_future_bool(i64 %lazy_measure22.i) - tail call void @___dec_future_refcount(i64 %lazy_measure22.i) - tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool35.i) - %lazy_measure44.i = tail call i64 @___lazy_measure(i64 %qalloc.i103.i) - tail call void @___qfree(i64 %qalloc.i103.i) - %read_bool57.i = tail call i1 @___read_future_bool(i64 %lazy_measure44.i) - tail call void @___dec_future_refcount(i64 %lazy_measure44.i) - tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool57.i) - tail call void @___rxy(i64 %qalloc.i105.i, double 0x400921FB54442D18, double 0.000000e+00) - %lazy_measure67.i = tail call i64 @___lazy_measure(i64 %qalloc.i105.i) - tail call void @___qfree(i64 %qalloc.i105.i) - %read_bool80.i = tail call i1 @___read_future_bool(i64 %lazy_measure67.i) - tail call void @___dec_future_refcount(i64 %lazy_measure67.i) - tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool80.i) - %1 = tail call i64 @teardown() - ret i64 %1 + tail call void @setup(i64 %0), !dbg !24 + tail call void @"__hugr__.__main__.flip_some..main.1"(), !dbg !24 + %1 = tail call i64 @teardown(), !dbg !24 + ret i64 %1, !dbg !24 } declare void @setup(i64) local_unnamed_addr @@ -104,6 +110,32 @@ declare i64 @teardown() local_unnamed_addr attributes #0 = { noreturn } -!name = !{!0} - -!0 = !{!"mainlib"} +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} +!name = !{!3} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v0.32.0)-v0.21.11", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "file:///Users/george.hodgkins/proj/clone-anduril") +!3 = !{!"mainlib"} +!4 = distinct !DISubprogram(name: "flip_some..main", linkageName: "__hugr__.__main__.flip_some..main.1", scope: null, file: !5, line: 74, type: !6, scopeLine: 75, spFlags: DISPFlagDefinition, unit: !1) +!5 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "") +!6 = !DISubroutineType(types: !7) +!7 = !{null} +!8 = !DILocation(line: 75, column: 20, scope: !4) +!9 = !DILocation(line: 79, column: 8, scope: !4) +!10 = !DILocation(line: 76, column: 20, scope: !4) +!11 = !DILocation(line: 77, column: 20, scope: !4) +!12 = !DILocation(line: 80, column: 8, scope: !4) +!13 = !DILocation(line: 78, column: 20, scope: !4) +!14 = !DILocation(line: 82, column: 8, scope: !4) +!15 = !DILocation(line: 83, column: 8, scope: !4) +!16 = !DILocation(line: 84, column: 8, scope: !4) +!17 = !DILocation(line: 81, column: 8, scope: !4) +!18 = !DILocation(line: 85, column: 8, scope: !4) +!19 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !20, type: !21, spFlags: DISPFlagDefinition, unit: !1) +!20 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") +!21 = !DISubroutineType(types: !22) +!22 = !{!23, !23} +!23 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!24 = !DILocation(line: 0, scope: !19) diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-measure_qb_array/measure_qb_array_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-measure_qb_array/measure_qb_array_x86_64-unknown-linux-gnu index a61cea991..3b702ad35 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-measure_qb_array/measure_qb_array_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-measure_qb_array/measure_qb_array_x86_64-unknown-linux-gnu @@ -8,6 +8,606 @@ target triple = "x86_64-unknown-linux-gnu" @"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" @"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." +define void @"__hugr__.__main__.measure_qb_array..main.1"() local_unnamed_addr !dbg !4 { +alloca_block: + %0 = tail call ptr @heap_alloc(i64 80), !dbg !8 + %1 = tail call ptr @heap_alloc(i64 8), !dbg !8 + store i64 -1, ptr %1, align 1, !dbg !8 + %qalloc.i = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !9 + br i1 %not_max.not.not.i, label %cond_299_case_0.i, label %__barray_check_bounds.exit, !dbg !9 + +cond_299_case_0.i: ; preds = %cond_exit_20.8, %cond_exit_20.7, %cond_exit_20.6, %cond_exit_20.5, %cond_exit_20.4, %cond_exit_20.3, %cond_exit_20.2, %cond_exit_20.1, %cond_exit_20, %alloca_block + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 + unreachable, !dbg !9 + +__barray_check_bounds.exit: ; preds = %alloca_block + tail call void @___reset(i64 %qalloc.i), !dbg !9 + %2 = load i64, ptr %1, align 4 + %3 = trunc i64 %2 to i1 + br i1 %3, label %cond_exit_20, 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_20: ; preds = %__barray_check_bounds.exit + %4 = and i64 %2, -2 + store i64 %4, ptr %1, align 4 + store i64 %qalloc.i, ptr %0, align 4 + %qalloc.i.1 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1, !dbg !9 + br i1 %not_max.not.not.i.1, label %cond_299_case_0.i, label %__barray_check_bounds.exit.1, !dbg !9 + +__barray_check_bounds.exit.1: ; preds = %cond_exit_20 + tail call void @___reset(i64 %qalloc.i.1), !dbg !9 + %5 = load i64, ptr %1, align 4 + %6 = and i64 %5, 2 + %.not299 = icmp eq i64 %6, 0 + br i1 %.not299, label %panic.i, label %cond_exit_20.1 + +cond_exit_20.1: ; preds = %__barray_check_bounds.exit.1 + %7 = and i64 %5, -3 + store i64 %7, ptr %1, align 4 + %8 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %qalloc.i.1, ptr %8, align 4 + %qalloc.i.2 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1, !dbg !9 + br i1 %not_max.not.not.i.2, label %cond_299_case_0.i, label %__barray_check_bounds.exit.2, !dbg !9 + +__barray_check_bounds.exit.2: ; preds = %cond_exit_20.1 + tail call void @___reset(i64 %qalloc.i.2), !dbg !9 + %9 = load i64, ptr %1, align 4 + %10 = and i64 %9, 4 + %.not300 = icmp eq i64 %10, 0 + br i1 %.not300, label %panic.i, label %cond_exit_20.2 + +cond_exit_20.2: ; preds = %__barray_check_bounds.exit.2 + %11 = and i64 %9, -5 + store i64 %11, ptr %1, align 4 + %12 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %qalloc.i.2, ptr %12, align 4 + %qalloc.i.3 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1, !dbg !9 + br i1 %not_max.not.not.i.3, label %cond_299_case_0.i, label %__barray_check_bounds.exit.3, !dbg !9 + +__barray_check_bounds.exit.3: ; preds = %cond_exit_20.2 + tail call void @___reset(i64 %qalloc.i.3), !dbg !9 + %13 = load i64, ptr %1, align 4 + %14 = and i64 %13, 8 + %.not301 = icmp eq i64 %14, 0 + br i1 %.not301, label %panic.i, label %cond_exit_20.3 + +cond_exit_20.3: ; preds = %__barray_check_bounds.exit.3 + %15 = and i64 %13, -9 + store i64 %15, ptr %1, align 4 + %16 = getelementptr inbounds nuw i8, ptr %0, i64 24 + store i64 %qalloc.i.3, ptr %16, align 4 + %qalloc.i.4 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1, !dbg !9 + br i1 %not_max.not.not.i.4, label %cond_299_case_0.i, label %__barray_check_bounds.exit.4, !dbg !9 + +__barray_check_bounds.exit.4: ; preds = %cond_exit_20.3 + tail call void @___reset(i64 %qalloc.i.4), !dbg !9 + %17 = load i64, ptr %1, align 4 + %18 = and i64 %17, 16 + %.not302 = icmp eq i64 %18, 0 + br i1 %.not302, label %panic.i, label %cond_exit_20.4 + +cond_exit_20.4: ; preds = %__barray_check_bounds.exit.4 + %19 = and i64 %17, -17 + store i64 %19, ptr %1, align 4 + %20 = getelementptr inbounds nuw i8, ptr %0, i64 32 + store i64 %qalloc.i.4, ptr %20, align 4 + %qalloc.i.5 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.5 = icmp eq i64 %qalloc.i.5, -1, !dbg !9 + br i1 %not_max.not.not.i.5, label %cond_299_case_0.i, label %__barray_check_bounds.exit.5, !dbg !9 + +__barray_check_bounds.exit.5: ; preds = %cond_exit_20.4 + tail call void @___reset(i64 %qalloc.i.5), !dbg !9 + %21 = load i64, ptr %1, align 4 + %22 = and i64 %21, 32 + %.not303 = icmp eq i64 %22, 0 + br i1 %.not303, label %panic.i, label %cond_exit_20.5 + +cond_exit_20.5: ; preds = %__barray_check_bounds.exit.5 + %23 = and i64 %21, -33 + store i64 %23, ptr %1, align 4 + %24 = getelementptr inbounds nuw i8, ptr %0, i64 40 + store i64 %qalloc.i.5, ptr %24, align 4 + %qalloc.i.6 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.6 = icmp eq i64 %qalloc.i.6, -1, !dbg !9 + br i1 %not_max.not.not.i.6, label %cond_299_case_0.i, label %__barray_check_bounds.exit.6, !dbg !9 + +__barray_check_bounds.exit.6: ; preds = %cond_exit_20.5 + tail call void @___reset(i64 %qalloc.i.6), !dbg !9 + %25 = load i64, ptr %1, align 4 + %26 = and i64 %25, 64 + %.not304 = icmp eq i64 %26, 0 + br i1 %.not304, label %panic.i, label %cond_exit_20.6 + +cond_exit_20.6: ; preds = %__barray_check_bounds.exit.6 + %27 = and i64 %25, -65 + store i64 %27, ptr %1, align 4 + %28 = getelementptr inbounds nuw i8, ptr %0, i64 48 + store i64 %qalloc.i.6, ptr %28, align 4 + %qalloc.i.7 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.7 = icmp eq i64 %qalloc.i.7, -1, !dbg !9 + br i1 %not_max.not.not.i.7, label %cond_299_case_0.i, label %__barray_check_bounds.exit.7, !dbg !9 + +__barray_check_bounds.exit.7: ; preds = %cond_exit_20.6 + tail call void @___reset(i64 %qalloc.i.7), !dbg !9 + %29 = load i64, ptr %1, align 4 + %30 = and i64 %29, 128 + %.not305 = icmp eq i64 %30, 0 + br i1 %.not305, label %panic.i, label %cond_exit_20.7 + +cond_exit_20.7: ; preds = %__barray_check_bounds.exit.7 + %31 = and i64 %29, -129 + store i64 %31, ptr %1, align 4 + %32 = getelementptr inbounds nuw i8, ptr %0, i64 56 + store i64 %qalloc.i.7, ptr %32, align 4 + %qalloc.i.8 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.8 = icmp eq i64 %qalloc.i.8, -1, !dbg !9 + br i1 %not_max.not.not.i.8, label %cond_299_case_0.i, label %__barray_check_bounds.exit.8, !dbg !9 + +__barray_check_bounds.exit.8: ; preds = %cond_exit_20.7 + tail call void @___reset(i64 %qalloc.i.8), !dbg !9 + %33 = load i64, ptr %1, align 4 + %34 = and i64 %33, 256 + %.not306 = icmp eq i64 %34, 0 + br i1 %.not306, label %panic.i, label %cond_exit_20.8 + +cond_exit_20.8: ; preds = %__barray_check_bounds.exit.8 + %35 = and i64 %33, -257 + store i64 %35, ptr %1, align 4 + %36 = getelementptr inbounds nuw i8, ptr %0, i64 64 + store i64 %qalloc.i.8, ptr %36, align 4 + %qalloc.i.9 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.9 = icmp eq i64 %qalloc.i.9, -1, !dbg !9 + br i1 %not_max.not.not.i.9, label %cond_299_case_0.i, label %__barray_check_bounds.exit.9, !dbg !9 + +__barray_check_bounds.exit.9: ; preds = %cond_exit_20.8 + tail call void @___reset(i64 %qalloc.i.9), !dbg !9 + %37 = load i64, ptr %1, align 4 + %38 = and i64 %37, 512 + %.not307 = icmp eq i64 %38, 0 + br i1 %.not307, label %panic.i, label %cond_exit_20.9 + +cond_exit_20.9: ; preds = %__barray_check_bounds.exit.9 + %39 = and i64 %37, -513 + store i64 %39, ptr %1, align 4 + %40 = getelementptr inbounds nuw i8, ptr %0, i64 72 + store i64 %qalloc.i.9, ptr %40, align 4 + %"116.fca.0.insert" = insertvalue { ptr, ptr, i64 } poison, ptr %0, 0 + %"116.fca.1.insert" = insertvalue { ptr, ptr, i64 } %"116.fca.0.insert", ptr %1, 1 + %"116.fca.2.insert" = insertvalue { ptr, ptr, i64 } %"116.fca.1.insert", i64 0, 2 + %41 = load i64, ptr %1, align 4, !dbg !10 + %42 = trunc i64 %41 to i1, !dbg !10 + br i1 %42, label %panic.i238, label %__barray_mask_borrow.exit, !dbg !10 + +panic.i238: ; preds = %cond_exit_20.9 + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !10 + unreachable, !dbg !10 + +__barray_mask_borrow.exit: ; preds = %cond_exit_20.9 + %43 = or disjoint i64 %41, 1, !dbg !10 + store i64 %43, ptr %1, align 4, !dbg !10 + %44 = load i64, ptr %0, align 4, !dbg !12 + tail call void @___rxy(i64 %44, double 0x400921FB54442D18, double 0.000000e+00), !dbg !13 + %45 = load i64, ptr %1, align 4, !dbg !12 + %46 = trunc i64 %45 to i1, !dbg !12 + br i1 %46, label %__barray_mask_return.exit240, label %panic.i239, !dbg !12 + +panic.i239: ; preds = %__barray_mask_borrow.exit + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !12 + unreachable, !dbg !12 + +__barray_mask_return.exit240: ; preds = %__barray_mask_borrow.exit + %47 = and i64 %45, -2, !dbg !12 + store i64 %47, ptr %1, align 4, !dbg !12 + store i64 %44, ptr %0, align 4, !dbg !12 + %48 = load i64, ptr %1, align 4, !dbg !14 + %49 = and i64 %48, 4, !dbg !14 + %.not = icmp eq i64 %49, 0, !dbg !14 + br i1 %.not, label %__barray_mask_borrow.exit242, label %panic.i241, !dbg !14 + +panic.i241: ; preds = %__barray_mask_return.exit240 + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !14 + unreachable, !dbg !14 + +__barray_mask_borrow.exit242: ; preds = %__barray_mask_return.exit240 + %50 = or disjoint i64 %48, 4, !dbg !14 + store i64 %50, ptr %1, align 4, !dbg !14 + %51 = getelementptr inbounds nuw i8, ptr %0, i64 16, !dbg !16 + %52 = load i64, ptr %51, align 4, !dbg !16 + tail call void @___rxy(i64 %52, double 0x400921FB54442D18, double 0.000000e+00), !dbg !17 + %53 = load i64, ptr %1, align 4, !dbg !16 + %54 = and i64 %53, 4, !dbg !16 + %.not268 = icmp eq i64 %54, 0, !dbg !16 + br i1 %.not268, label %panic.i243, label %__barray_mask_return.exit244, !dbg !16 + +panic.i243: ; preds = %__barray_mask_borrow.exit242 + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !16 + unreachable, !dbg !16 + +__barray_mask_return.exit244: ; preds = %__barray_mask_borrow.exit242 + %55 = and i64 %53, -5, !dbg !16 + store i64 %55, ptr %1, align 4, !dbg !16 + store i64 %52, ptr %51, align 4, !dbg !16 + %56 = load i64, ptr %1, align 4, !dbg !18 + %57 = and i64 %56, 8, !dbg !18 + %.not269 = icmp eq i64 %57, 0, !dbg !18 + br i1 %.not269, label %__barray_mask_borrow.exit246, label %panic.i245, !dbg !18 + +panic.i245: ; preds = %__barray_mask_return.exit244 + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !18 + unreachable, !dbg !18 + +__barray_mask_borrow.exit246: ; preds = %__barray_mask_return.exit244 + %58 = or disjoint i64 %56, 8, !dbg !18 + store i64 %58, ptr %1, align 4, !dbg !18 + %59 = getelementptr inbounds nuw i8, ptr %0, i64 24, !dbg !20 + %60 = load i64, ptr %59, align 4, !dbg !20 + tail call void @___rxy(i64 %60, double 0x400921FB54442D18, double 0.000000e+00), !dbg !21 + %61 = load i64, ptr %1, align 4, !dbg !20 + %62 = and i64 %61, 8, !dbg !20 + %.not270 = icmp eq i64 %62, 0, !dbg !20 + br i1 %.not270, label %panic.i247, label %__barray_mask_return.exit248, !dbg !20 + +panic.i247: ; preds = %__barray_mask_borrow.exit246 + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !20 + unreachable, !dbg !20 + +__barray_mask_return.exit248: ; preds = %__barray_mask_borrow.exit246 + %63 = and i64 %61, -9, !dbg !20 + store i64 %63, ptr %1, align 4, !dbg !20 + store i64 %60, ptr %59, align 4, !dbg !20 + %64 = load i64, ptr %1, align 4, !dbg !22 + %65 = and i64 %64, 512, !dbg !22 + %.not271 = icmp eq i64 %65, 0, !dbg !22 + br i1 %.not271, label %__barray_mask_borrow.exit250, label %panic.i249, !dbg !22 + +panic.i249: ; preds = %__barray_mask_return.exit248 + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !22 + unreachable, !dbg !22 + +__barray_mask_borrow.exit250: ; preds = %__barray_mask_return.exit248 + %66 = or disjoint i64 %64, 512, !dbg !22 + store i64 %66, ptr %1, align 4, !dbg !22 + %67 = getelementptr inbounds nuw i8, ptr %0, i64 72, !dbg !24 + %68 = load i64, ptr %67, align 4, !dbg !24 + tail call void @___rxy(i64 %68, double 0x400921FB54442D18, double 0.000000e+00), !dbg !25 + %69 = load i64, ptr %1, align 4, !dbg !24 + %70 = and i64 %69, 512, !dbg !24 + %.not272 = icmp eq i64 %70, 0, !dbg !24 + br i1 %.not272, label %panic.i251, label %__barray_mask_return.exit252, !dbg !24 + +panic.i251: ; preds = %__barray_mask_borrow.exit250 + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !24 + unreachable, !dbg !24 + +__barray_mask_return.exit252: ; preds = %__barray_mask_borrow.exit250 + %71 = and i64 %69, -513, !dbg !24 + store i64 %71, ptr %1, align 4, !dbg !24 + store i64 %68, ptr %67, align 4, !dbg !24 + %72 = insertvalue { { ptr, ptr, i64 }, i64 } poison, { ptr, ptr, i64 } %"116.fca.2.insert", 0, !dbg !26 + %73 = tail call ptr @heap_alloc(i64 240), !dbg !43 + %74 = tail call ptr @heap_alloc(i64 8), !dbg !43 + store i64 -1, ptr %74, align 1, !dbg !43 + br label %__barray_check_bounds.exit.i.i + +75: ; preds = %loop_body.i + %76 = lshr i64 %.fca.2.extract82.i.i, 6, !dbg !44 + %77 = getelementptr i64, ptr %.fca.1.extract81.i.i, i64 %76, !dbg !44 + %78 = load i64, ptr %77, align 4, !dbg !44 + %79 = and i64 %.fca.2.extract82.i.i, 63, !dbg !44 + %80 = sub nuw nsw i64 64, %79, !dbg !44 + %81 = lshr i64 -1, %80, !dbg !44 + %82 = icmp eq i64 %79, 0, !dbg !44 + %83 = select i1 %82, i64 0, i64 %81, !dbg !44 + %84 = or i64 %78, %83, !dbg !44 + store i64 %84, ptr %77, align 4, !dbg !44 + %last_valid.i.i.i = add i64 %.fca.2.extract82.i.i, 9, !dbg !44 + %85 = lshr i64 %last_valid.i.i.i, 6, !dbg !44 + %86 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i.i, i64 %85, !dbg !44 + %87 = load i64, ptr %86, align 4, !dbg !44 + %88 = and i64 %last_valid.i.i.i, 63, !dbg !44 + %89 = shl nsw i64 -2, %88, !dbg !44 + %90 = icmp eq i64 %88, 63, !dbg !44 + %91 = select i1 %90, i64 0, i64 %89, !dbg !44 + %92 = or i64 %87, %91, !dbg !44 + store i64 %92, ptr %86, align 4, !dbg !44 + %reass.sub.i.i.i = sub nsw i64 %85, %76, !dbg !44 + %.not.i.i.i = icmp eq i64 %reass.sub.i.i.i, -1, !dbg !44 + br i1 %.not.i.i.i, label %"__hugr__.guppylang.std.quantum.measure_array$10.149.exit", label %mask_block_ok.i.i.i, !dbg !44 + +93: ; preds = %mask_block_ok.i.i.i + %94 = add nuw i64 %.02.i.i.i, 1, !dbg !44 + %exitcond.not.i.i.i = icmp eq i64 %.02.i.i.i, %reass.sub.i.i.i, !dbg !44 + br i1 %exitcond.not.i.i.i, label %"__hugr__.guppylang.std.quantum.measure_array$10.149.exit", label %mask_block_ok.i.i.i, !dbg !44 + +mask_block_ok.i.i.i: ; preds = %75, %93 + %.02.i.i.i = phi i64 [ %94, %93 ], [ 0, %75 ], !dbg !44 + %gep.i.i.i = getelementptr i64, ptr %77, i64 %.02.i.i.i, !dbg !44 + %95 = load i64, ptr %gep.i.i.i, align 4, !dbg !44 + %96 = icmp eq i64 %95, -1, !dbg !44 + br i1 %96, label %93, label %mask_block_err.i.i.i, !dbg !44 + +mask_block_err.i.i.i: ; preds = %mask_block_ok.i.i.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0"), !dbg !44 + unreachable, !dbg !44 + +__barray_check_bounds.exit.i.i: ; preds = %loop_body.i, %__barray_mask_return.exit252 + %.fca.2.extract82.i187.i = phi i64 [ 0, %__barray_mask_return.exit252 ], [ %.fca.2.extract82.i.i, %loop_body.i ] + %.fca.1.extract81.i186.i = phi ptr [ %1, %__barray_mask_return.exit252 ], [ %.fca.1.extract81.i.i, %loop_body.i ] + %.fca.0.extract80.i185.i = phi ptr [ %0, %__barray_mask_return.exit252 ], [ %.fca.0.extract80.i.i, %loop_body.i ] + %"163_0.sroa.15.0184.i" = phi i64 [ 0, %__barray_mask_return.exit252 ], [ %97, %loop_body.i ] + %.pn165183.i = phi { { ptr, ptr, i64 }, i64 } [ %72, %__barray_mask_return.exit252 ], [ %112, %loop_body.i ] + %97 = add nuw nsw i64 %"163_0.sroa.15.0184.i", 1, !dbg !54 + %98 = add i64 %"163_0.sroa.15.0184.i", %.fca.2.extract82.i187.i, !dbg !55 + %99 = lshr i64 %98, 6, !dbg !56 + %100 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i186.i, i64 %99, !dbg !56 + %101 = load i64, ptr %100, align 4, !dbg !56 + %102 = and i64 %98, 63, !dbg !56 + %103 = lshr i64 %101, %102, !dbg !56 + %104 = trunc i64 %103 to i1, !dbg !56 + br i1 %104, label %panic.i.i.i, label %__barray_check_bounds.exit.i, !dbg !56 + +panic.i.i.i: ; preds = %__barray_check_bounds.exit.i.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !56 + unreachable, !dbg !56 + +__barray_check_bounds.exit.i: ; preds = %__barray_check_bounds.exit.i.i + %105 = shl nuw i64 1, %102, !dbg !56 + %106 = xor i64 %105, %101, !dbg !56 + store i64 %106, ptr %100, align 4, !dbg !56 + %107 = getelementptr inbounds i64, ptr %.fca.0.extract80.i185.i, i64 %98, !dbg !55 + %108 = load i64, ptr %107, align 4, !dbg !55 + %lazy_measure.i = tail call i64 @___lazy_measure(i64 %108) + tail call void @___qfree(i64 %108) + %109 = load i64, ptr %74, align 4 + %110 = lshr i64 %109, %"163_0.sroa.15.0184.i" + %111 = trunc i64 %110 to i1 + br i1 %111, label %loop_body.i, label %panic.i.i + +panic.i.i: ; preds = %__barray_check_bounds.exit.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") + unreachable + +loop_body.i: ; preds = %__barray_check_bounds.exit.i + %"182_054.fca.1.insert.i" = insertvalue { i1, i64, i1 } { i1 true, i64 poison, i1 undef }, i64 %lazy_measure.i, 1 + %"182_054.fca.2.insert.i" = insertvalue { i1, i64, i1 } %"182_054.fca.1.insert.i", i1 undef, 2 + %112 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn165183.i, i64 %97, 1 + %113 = shl nuw nsw i64 1, %"163_0.sroa.15.0184.i" + %114 = xor i64 %109, %113 + store i64 %114, ptr %74, align 4 + %115 = getelementptr inbounds nuw { i1, i64, i1 }, ptr %73, i64 %"163_0.sroa.15.0184.i" + store { i1, i64, i1 } %"182_054.fca.2.insert.i", ptr %115, align 4 + %116 = extractvalue { { ptr, ptr, i64 }, i64 } %.pn165183.i, 0 + %.fca.0.extract80.i.i = extractvalue { ptr, ptr, i64 } %116, 0 + %.fca.1.extract81.i.i = extractvalue { ptr, ptr, i64 } %116, 1 + %.fca.2.extract82.i.i = extractvalue { ptr, ptr, i64 } %116, 2 + %exitcond.not.i = icmp eq i64 %97, 10, !dbg !58 + br i1 %exitcond.not.i, label %75, label %__barray_check_bounds.exit.i.i + +"__hugr__.guppylang.std.quantum.measure_array$10.149.exit": ; preds = %93, %75 + tail call void @heap_free(ptr %.fca.0.extract80.i.i), !dbg !44 + tail call void @heap_free(ptr nonnull %.fca.1.extract81.i.i), !dbg !44 + %117 = load i64, ptr %74, align 4 + %118 = trunc i64 %117 to i1 + br i1 %118, label %cond_exit_369.thread, label %__barray_mask_borrow.exit259 + +cond_exit_369: ; preds = %cond_exit_369.thread.9 + tail call void @heap_free(ptr %73) + tail call void @heap_free(ptr nonnull %74) + ret void + +mask_block_err.i: ; preds = %cond_exit_369.thread.9 + tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") + unreachable + +__barray_mask_borrow.exit259: ; preds = %"__hugr__.guppylang.std.quantum.measure_array$10.149.exit" + %119 = or disjoint i64 %117, 1, !dbg !12 + store i64 %119, ptr %74, align 4, !dbg !12 + %120 = load { i1, i64, i1 }, ptr %73, align 4 + %.fca.0.extract167 = extractvalue { i1, i64, i1 } %120, 0 + br i1 %.fca.0.extract167, label %cond_392_case_1, label %cond_exit_369.thread + +cond_exit_369.thread: ; preds = %cond_392_case_1, %__barray_mask_borrow.exit259, %"__hugr__.guppylang.std.quantum.measure_array$10.149.exit" + %121 = phi i64 [ %.pre, %cond_392_case_1 ], [ %119, %__barray_mask_borrow.exit259 ], [ %117, %"__hugr__.guppylang.std.quantum.measure_array$10.149.exit" ] + %122 = and i64 %121, 2 + %.not290 = icmp eq i64 %122, 0 + br i1 %.not290, label %__barray_mask_borrow.exit259.1, label %cond_exit_369.thread.1 + +__barray_mask_borrow.exit259.1: ; preds = %cond_exit_369.thread + %123 = or disjoint i64 %121, 2, !dbg !12 + store i64 %123, ptr %74, align 4, !dbg !12 + %124 = getelementptr inbounds nuw i8, ptr %73, i64 24 + %125 = load { i1, i64, i1 }, ptr %124, align 4 + %.fca.0.extract167.1 = extractvalue { i1, i64, i1 } %125, 0 + br i1 %.fca.0.extract167.1, label %cond_392_case_1.1, label %cond_exit_369.thread.1 + +cond_392_case_1.1: ; preds = %__barray_mask_borrow.exit259.1 + %.fca.1.extract.1 = extractvalue { i1, i64, i1 } %125, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.1) + %.pre281 = load i64, ptr %74, align 4 + br label %cond_exit_369.thread.1 + +cond_exit_369.thread.1: ; preds = %cond_392_case_1.1, %__barray_mask_borrow.exit259.1, %cond_exit_369.thread + %126 = phi i64 [ %.pre281, %cond_392_case_1.1 ], [ %123, %__barray_mask_borrow.exit259.1 ], [ %121, %cond_exit_369.thread ] + %127 = and i64 %126, 4 + %.not291 = icmp eq i64 %127, 0 + br i1 %.not291, label %__barray_mask_borrow.exit259.2, label %cond_exit_369.thread.2 + +__barray_mask_borrow.exit259.2: ; preds = %cond_exit_369.thread.1 + %128 = or disjoint i64 %126, 4, !dbg !12 + store i64 %128, ptr %74, align 4, !dbg !12 + %129 = getelementptr inbounds nuw i8, ptr %73, i64 48 + %130 = load { i1, i64, i1 }, ptr %129, align 4 + %.fca.0.extract167.2 = extractvalue { i1, i64, i1 } %130, 0 + br i1 %.fca.0.extract167.2, label %cond_392_case_1.2, label %cond_exit_369.thread.2 + +cond_392_case_1.2: ; preds = %__barray_mask_borrow.exit259.2 + %.fca.1.extract.2 = extractvalue { i1, i64, i1 } %130, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.2) + %.pre282 = load i64, ptr %74, align 4 + br label %cond_exit_369.thread.2 + +cond_exit_369.thread.2: ; preds = %cond_392_case_1.2, %__barray_mask_borrow.exit259.2, %cond_exit_369.thread.1 + %131 = phi i64 [ %.pre282, %cond_392_case_1.2 ], [ %128, %__barray_mask_borrow.exit259.2 ], [ %126, %cond_exit_369.thread.1 ] + %132 = and i64 %131, 8 + %.not292 = icmp eq i64 %132, 0 + br i1 %.not292, label %__barray_mask_borrow.exit259.3, label %cond_exit_369.thread.3 + +__barray_mask_borrow.exit259.3: ; preds = %cond_exit_369.thread.2 + %133 = or disjoint i64 %131, 8, !dbg !12 + store i64 %133, ptr %74, align 4, !dbg !12 + %134 = getelementptr inbounds nuw i8, ptr %73, i64 72 + %135 = load { i1, i64, i1 }, ptr %134, align 4 + %.fca.0.extract167.3 = extractvalue { i1, i64, i1 } %135, 0 + br i1 %.fca.0.extract167.3, label %cond_392_case_1.3, label %cond_exit_369.thread.3 + +cond_392_case_1.3: ; preds = %__barray_mask_borrow.exit259.3 + %.fca.1.extract.3 = extractvalue { i1, i64, i1 } %135, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.3) + %.pre283 = load i64, ptr %74, align 4 + br label %cond_exit_369.thread.3 + +cond_exit_369.thread.3: ; preds = %cond_392_case_1.3, %__barray_mask_borrow.exit259.3, %cond_exit_369.thread.2 + %136 = phi i64 [ %.pre283, %cond_392_case_1.3 ], [ %133, %__barray_mask_borrow.exit259.3 ], [ %131, %cond_exit_369.thread.2 ] + %137 = and i64 %136, 16 + %.not293 = icmp eq i64 %137, 0 + br i1 %.not293, label %__barray_mask_borrow.exit259.4, label %cond_exit_369.thread.4 + +__barray_mask_borrow.exit259.4: ; preds = %cond_exit_369.thread.3 + %138 = or disjoint i64 %136, 16, !dbg !12 + store i64 %138, ptr %74, align 4, !dbg !12 + %139 = getelementptr inbounds nuw i8, ptr %73, i64 96 + %140 = load { i1, i64, i1 }, ptr %139, align 4 + %.fca.0.extract167.4 = extractvalue { i1, i64, i1 } %140, 0 + br i1 %.fca.0.extract167.4, label %cond_392_case_1.4, label %cond_exit_369.thread.4 + +cond_392_case_1.4: ; preds = %__barray_mask_borrow.exit259.4 + %.fca.1.extract.4 = extractvalue { i1, i64, i1 } %140, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.4) + %.pre284 = load i64, ptr %74, align 4 + br label %cond_exit_369.thread.4 + +cond_exit_369.thread.4: ; preds = %cond_392_case_1.4, %__barray_mask_borrow.exit259.4, %cond_exit_369.thread.3 + %141 = phi i64 [ %.pre284, %cond_392_case_1.4 ], [ %138, %__barray_mask_borrow.exit259.4 ], [ %136, %cond_exit_369.thread.3 ] + %142 = and i64 %141, 32 + %.not294 = icmp eq i64 %142, 0 + br i1 %.not294, label %__barray_mask_borrow.exit259.5, label %cond_exit_369.thread.5 + +__barray_mask_borrow.exit259.5: ; preds = %cond_exit_369.thread.4 + %143 = or disjoint i64 %141, 32, !dbg !12 + store i64 %143, ptr %74, align 4, !dbg !12 + %144 = getelementptr inbounds nuw i8, ptr %73, i64 120 + %145 = load { i1, i64, i1 }, ptr %144, align 4 + %.fca.0.extract167.5 = extractvalue { i1, i64, i1 } %145, 0 + br i1 %.fca.0.extract167.5, label %cond_392_case_1.5, label %cond_exit_369.thread.5 + +cond_392_case_1.5: ; preds = %__barray_mask_borrow.exit259.5 + %.fca.1.extract.5 = extractvalue { i1, i64, i1 } %145, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.5) + %.pre285 = load i64, ptr %74, align 4 + br label %cond_exit_369.thread.5 + +cond_exit_369.thread.5: ; preds = %cond_392_case_1.5, %__barray_mask_borrow.exit259.5, %cond_exit_369.thread.4 + %146 = phi i64 [ %.pre285, %cond_392_case_1.5 ], [ %143, %__barray_mask_borrow.exit259.5 ], [ %141, %cond_exit_369.thread.4 ] + %147 = and i64 %146, 64 + %.not295 = icmp eq i64 %147, 0 + br i1 %.not295, label %__barray_mask_borrow.exit259.6, label %cond_exit_369.thread.6 + +__barray_mask_borrow.exit259.6: ; preds = %cond_exit_369.thread.5 + %148 = or disjoint i64 %146, 64, !dbg !12 + store i64 %148, ptr %74, align 4, !dbg !12 + %149 = getelementptr inbounds nuw i8, ptr %73, i64 144 + %150 = load { i1, i64, i1 }, ptr %149, align 4 + %.fca.0.extract167.6 = extractvalue { i1, i64, i1 } %150, 0 + br i1 %.fca.0.extract167.6, label %cond_392_case_1.6, label %cond_exit_369.thread.6 + +cond_392_case_1.6: ; preds = %__barray_mask_borrow.exit259.6 + %.fca.1.extract.6 = extractvalue { i1, i64, i1 } %150, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.6) + %.pre286 = load i64, ptr %74, align 4 + br label %cond_exit_369.thread.6 + +cond_exit_369.thread.6: ; preds = %cond_392_case_1.6, %__barray_mask_borrow.exit259.6, %cond_exit_369.thread.5 + %151 = phi i64 [ %.pre286, %cond_392_case_1.6 ], [ %148, %__barray_mask_borrow.exit259.6 ], [ %146, %cond_exit_369.thread.5 ] + %152 = and i64 %151, 128 + %.not296 = icmp eq i64 %152, 0 + br i1 %.not296, label %__barray_mask_borrow.exit259.7, label %cond_exit_369.thread.7 + +__barray_mask_borrow.exit259.7: ; preds = %cond_exit_369.thread.6 + %153 = or disjoint i64 %151, 128, !dbg !12 + store i64 %153, ptr %74, align 4, !dbg !12 + %154 = getelementptr inbounds nuw i8, ptr %73, i64 168 + %155 = load { i1, i64, i1 }, ptr %154, align 4 + %.fca.0.extract167.7 = extractvalue { i1, i64, i1 } %155, 0 + br i1 %.fca.0.extract167.7, label %cond_392_case_1.7, label %cond_exit_369.thread.7 + +cond_392_case_1.7: ; preds = %__barray_mask_borrow.exit259.7 + %.fca.1.extract.7 = extractvalue { i1, i64, i1 } %155, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.7) + %.pre287 = load i64, ptr %74, align 4 + br label %cond_exit_369.thread.7 + +cond_exit_369.thread.7: ; preds = %cond_392_case_1.7, %__barray_mask_borrow.exit259.7, %cond_exit_369.thread.6 + %156 = phi i64 [ %.pre287, %cond_392_case_1.7 ], [ %153, %__barray_mask_borrow.exit259.7 ], [ %151, %cond_exit_369.thread.6 ] + %157 = and i64 %156, 256 + %.not297 = icmp eq i64 %157, 0 + br i1 %.not297, label %__barray_mask_borrow.exit259.8, label %cond_exit_369.thread.8 + +__barray_mask_borrow.exit259.8: ; preds = %cond_exit_369.thread.7 + %158 = or disjoint i64 %156, 256, !dbg !12 + store i64 %158, ptr %74, align 4, !dbg !12 + %159 = getelementptr inbounds nuw i8, ptr %73, i64 192 + %160 = load { i1, i64, i1 }, ptr %159, align 4 + %.fca.0.extract167.8 = extractvalue { i1, i64, i1 } %160, 0 + br i1 %.fca.0.extract167.8, label %cond_392_case_1.8, label %cond_exit_369.thread.8 + +cond_392_case_1.8: ; preds = %__barray_mask_borrow.exit259.8 + %.fca.1.extract.8 = extractvalue { i1, i64, i1 } %160, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.8) + %.pre288 = load i64, ptr %74, align 4 + br label %cond_exit_369.thread.8 + +cond_exit_369.thread.8: ; preds = %cond_392_case_1.8, %__barray_mask_borrow.exit259.8, %cond_exit_369.thread.7 + %161 = phi i64 [ %.pre288, %cond_392_case_1.8 ], [ %158, %__barray_mask_borrow.exit259.8 ], [ %156, %cond_exit_369.thread.7 ] + %162 = and i64 %161, 512 + %.not298 = icmp eq i64 %162, 0 + br i1 %.not298, label %__barray_mask_borrow.exit259.9, label %cond_exit_369.thread.9 + +__barray_mask_borrow.exit259.9: ; preds = %cond_exit_369.thread.8 + %163 = or disjoint i64 %161, 512, !dbg !12 + store i64 %163, ptr %74, align 4, !dbg !12 + %164 = getelementptr inbounds nuw i8, ptr %73, i64 216 + %165 = load { i1, i64, i1 }, ptr %164, align 4 + %.fca.0.extract167.9 = extractvalue { i1, i64, i1 } %165, 0 + br i1 %.fca.0.extract167.9, label %cond_392_case_1.9, label %cond_exit_369.thread.9 + +cond_392_case_1.9: ; preds = %__barray_mask_borrow.exit259.9 + %.fca.1.extract.9 = extractvalue { i1, i64, i1 } %165, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.9) + %.pre289 = load i64, ptr %74, align 4 + br label %cond_exit_369.thread.9 + +cond_exit_369.thread.9: ; preds = %cond_392_case_1.9, %__barray_mask_borrow.exit259.9, %cond_exit_369.thread.8 + %166 = phi i64 [ %.pre289, %cond_392_case_1.9 ], [ %163, %__barray_mask_borrow.exit259.9 ], [ %161, %cond_exit_369.thread.8 ] + %167 = or i64 %166, -1024 + store i64 %167, ptr %74, align 4 + %168 = icmp eq i64 %167, -1 + br i1 %168, label %cond_exit_369, label %mask_block_err.i + +cond_392_case_1: ; preds = %__barray_mask_borrow.exit259 + %.fca.1.extract = extractvalue { i1, i64, i1 } %120, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract) + %.pre = load i64, ptr %74, align 4 + br label %cond_exit_369.thread +} + declare ptr @heap_alloc(i64) local_unnamed_addr ; Function Attrs: noreturn @@ -27,603 +627,12 @@ declare i64 @___qalloc() local_unnamed_addr declare void @___reset(i64) local_unnamed_addr -define i64 @qmain(i64 %0) local_unnamed_addr { +define i64 @qmain(i64 %0) local_unnamed_addr !dbg !59 { entry: - tail call void @setup(i64 %0) - %1 = tail call ptr @heap_alloc(i64 80) - %2 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %2, align 1 - %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.not.i.i, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i - -cond_207_case_0.i.i: ; preds = %cond_exit_20.i.8, %cond_exit_20.i.7, %cond_exit_20.i.6, %cond_exit_20.i.5, %cond_exit_20.i.4, %cond_exit_20.i.3, %cond_exit_20.i.2, %cond_exit_20.i.1, %cond_exit_20.i, %entry - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__barray_check_bounds.exit.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - %3 = load i64, ptr %2, align 4 - %4 = trunc i64 %3 to i1 - br i1 %4, label %cond_exit_20.i, label %panic.i.i - -panic.i.i: ; preds = %__barray_check_bounds.exit.i.9, %__barray_check_bounds.exit.i.8, %__barray_check_bounds.exit.i.7, %__barray_check_bounds.exit.i.6, %__barray_check_bounds.exit.i.5, %__barray_check_bounds.exit.i.4, %__barray_check_bounds.exit.i.3, %__barray_check_bounds.exit.i.2, %__barray_check_bounds.exit.i.1, %__barray_check_bounds.exit.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_exit_20.i: ; preds = %__barray_check_bounds.exit.i - %5 = and i64 %3, -2 - store i64 %5, ptr %2, align 4 - store i64 %qalloc.i.i, ptr %1, align 4 - %qalloc.i.i.1 = tail call i64 @___qalloc() - %not_max.not.not.i.i.1 = icmp eq i64 %qalloc.i.i.1, -1 - br i1 %not_max.not.not.i.i.1, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.1 - -__barray_check_bounds.exit.i.1: ; preds = %cond_exit_20.i - tail call void @___reset(i64 %qalloc.i.i.1) - %6 = load i64, ptr %2, align 4 - %7 = and i64 %6, 2 - %.not = icmp eq i64 %7, 0 - br i1 %.not, label %panic.i.i, label %cond_exit_20.i.1 - -cond_exit_20.i.1: ; preds = %__barray_check_bounds.exit.i.1 - %8 = and i64 %6, -3 - store i64 %8, ptr %2, align 4 - %9 = getelementptr inbounds nuw i8, ptr %1, i64 8 - store i64 %qalloc.i.i.1, ptr %9, align 4 - %qalloc.i.i.2 = tail call i64 @___qalloc() - %not_max.not.not.i.i.2 = icmp eq i64 %qalloc.i.i.2, -1 - br i1 %not_max.not.not.i.i.2, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.2 - -__barray_check_bounds.exit.i.2: ; preds = %cond_exit_20.i.1 - tail call void @___reset(i64 %qalloc.i.i.2) - %10 = load i64, ptr %2, align 4 - %11 = and i64 %10, 4 - %.not1 = icmp eq i64 %11, 0 - br i1 %.not1, label %panic.i.i, label %cond_exit_20.i.2 - -cond_exit_20.i.2: ; preds = %__barray_check_bounds.exit.i.2 - %12 = and i64 %10, -5 - store i64 %12, ptr %2, align 4 - %13 = getelementptr inbounds nuw i8, ptr %1, i64 16 - store i64 %qalloc.i.i.2, ptr %13, align 4 - %qalloc.i.i.3 = tail call i64 @___qalloc() - %not_max.not.not.i.i.3 = icmp eq i64 %qalloc.i.i.3, -1 - br i1 %not_max.not.not.i.i.3, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.3 - -__barray_check_bounds.exit.i.3: ; preds = %cond_exit_20.i.2 - tail call void @___reset(i64 %qalloc.i.i.3) - %14 = load i64, ptr %2, align 4 - %15 = and i64 %14, 8 - %.not2 = icmp eq i64 %15, 0 - br i1 %.not2, label %panic.i.i, label %cond_exit_20.i.3 - -cond_exit_20.i.3: ; preds = %__barray_check_bounds.exit.i.3 - %16 = and i64 %14, -9 - store i64 %16, ptr %2, align 4 - %17 = getelementptr inbounds nuw i8, ptr %1, i64 24 - store i64 %qalloc.i.i.3, ptr %17, align 4 - %qalloc.i.i.4 = tail call i64 @___qalloc() - %not_max.not.not.i.i.4 = icmp eq i64 %qalloc.i.i.4, -1 - br i1 %not_max.not.not.i.i.4, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.4 - -__barray_check_bounds.exit.i.4: ; preds = %cond_exit_20.i.3 - tail call void @___reset(i64 %qalloc.i.i.4) - %18 = load i64, ptr %2, align 4 - %19 = and i64 %18, 16 - %.not3 = icmp eq i64 %19, 0 - br i1 %.not3, label %panic.i.i, label %cond_exit_20.i.4 - -cond_exit_20.i.4: ; preds = %__barray_check_bounds.exit.i.4 - %20 = and i64 %18, -17 - store i64 %20, ptr %2, align 4 - %21 = getelementptr inbounds nuw i8, ptr %1, i64 32 - store i64 %qalloc.i.i.4, ptr %21, align 4 - %qalloc.i.i.5 = tail call i64 @___qalloc() - %not_max.not.not.i.i.5 = icmp eq i64 %qalloc.i.i.5, -1 - br i1 %not_max.not.not.i.i.5, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.5 - -__barray_check_bounds.exit.i.5: ; preds = %cond_exit_20.i.4 - tail call void @___reset(i64 %qalloc.i.i.5) - %22 = load i64, ptr %2, align 4 - %23 = and i64 %22, 32 - %.not4 = icmp eq i64 %23, 0 - br i1 %.not4, label %panic.i.i, label %cond_exit_20.i.5 - -cond_exit_20.i.5: ; preds = %__barray_check_bounds.exit.i.5 - %24 = and i64 %22, -33 - store i64 %24, ptr %2, align 4 - %25 = getelementptr inbounds nuw i8, ptr %1, i64 40 - store i64 %qalloc.i.i.5, ptr %25, align 4 - %qalloc.i.i.6 = tail call i64 @___qalloc() - %not_max.not.not.i.i.6 = icmp eq i64 %qalloc.i.i.6, -1 - br i1 %not_max.not.not.i.i.6, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.6 - -__barray_check_bounds.exit.i.6: ; preds = %cond_exit_20.i.5 - tail call void @___reset(i64 %qalloc.i.i.6) - %26 = load i64, ptr %2, align 4 - %27 = and i64 %26, 64 - %.not5 = icmp eq i64 %27, 0 - br i1 %.not5, label %panic.i.i, label %cond_exit_20.i.6 - -cond_exit_20.i.6: ; preds = %__barray_check_bounds.exit.i.6 - %28 = and i64 %26, -65 - store i64 %28, ptr %2, align 4 - %29 = getelementptr inbounds nuw i8, ptr %1, i64 48 - store i64 %qalloc.i.i.6, ptr %29, align 4 - %qalloc.i.i.7 = tail call i64 @___qalloc() - %not_max.not.not.i.i.7 = icmp eq i64 %qalloc.i.i.7, -1 - br i1 %not_max.not.not.i.i.7, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.7 - -__barray_check_bounds.exit.i.7: ; preds = %cond_exit_20.i.6 - tail call void @___reset(i64 %qalloc.i.i.7) - %30 = load i64, ptr %2, align 4 - %31 = and i64 %30, 128 - %.not6 = icmp eq i64 %31, 0 - br i1 %.not6, label %panic.i.i, label %cond_exit_20.i.7 - -cond_exit_20.i.7: ; preds = %__barray_check_bounds.exit.i.7 - %32 = and i64 %30, -129 - store i64 %32, ptr %2, align 4 - %33 = getelementptr inbounds nuw i8, ptr %1, i64 56 - store i64 %qalloc.i.i.7, ptr %33, align 4 - %qalloc.i.i.8 = tail call i64 @___qalloc() - %not_max.not.not.i.i.8 = icmp eq i64 %qalloc.i.i.8, -1 - br i1 %not_max.not.not.i.i.8, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.8 - -__barray_check_bounds.exit.i.8: ; preds = %cond_exit_20.i.7 - tail call void @___reset(i64 %qalloc.i.i.8) - %34 = load i64, ptr %2, align 4 - %35 = and i64 %34, 256 - %.not7 = icmp eq i64 %35, 0 - br i1 %.not7, label %panic.i.i, label %cond_exit_20.i.8 - -cond_exit_20.i.8: ; preds = %__barray_check_bounds.exit.i.8 - %36 = and i64 %34, -257 - store i64 %36, ptr %2, align 4 - %37 = getelementptr inbounds nuw i8, ptr %1, i64 64 - store i64 %qalloc.i.i.8, ptr %37, align 4 - %qalloc.i.i.9 = tail call i64 @___qalloc() - %not_max.not.not.i.i.9 = icmp eq i64 %qalloc.i.i.9, -1 - br i1 %not_max.not.not.i.i.9, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.9 - -__barray_check_bounds.exit.i.9: ; preds = %cond_exit_20.i.8 - tail call void @___reset(i64 %qalloc.i.i.9) - %38 = load i64, ptr %2, align 4 - %39 = and i64 %38, 512 - %.not8 = icmp eq i64 %39, 0 - br i1 %.not8, label %panic.i.i, label %cond_exit_20.i.9 - -cond_exit_20.i.9: ; preds = %__barray_check_bounds.exit.i.9 - %40 = and i64 %38, -513 - store i64 %40, ptr %2, align 4 - %41 = getelementptr inbounds nuw i8, ptr %1, i64 72 - store i64 %qalloc.i.i.9, ptr %41, align 4 - %"116.fca.0.insert.i" = insertvalue { ptr, ptr, i64 } poison, ptr %1, 0 - %"116.fca.1.insert.i" = insertvalue { ptr, ptr, i64 } %"116.fca.0.insert.i", ptr %2, 1 - %"116.fca.2.insert.i" = insertvalue { ptr, ptr, i64 } %"116.fca.1.insert.i", i64 0, 2 - %42 = load i64, ptr %2, align 4 - %43 = trunc i64 %42 to i1 - br i1 %43, label %panic.i238.i, label %__barray_mask_borrow.exit.i - -panic.i238.i: ; preds = %cond_exit_20.i.9 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit.i: ; preds = %cond_exit_20.i.9 - %44 = or disjoint i64 %42, 1 - store i64 %44, ptr %2, align 4 - %45 = load i64, ptr %1, align 4 - tail call void @___rxy(i64 %45, double 0x400921FB54442D18, double 0.000000e+00) - %46 = load i64, ptr %2, align 4 - %47 = trunc i64 %46 to i1 - br i1 %47, label %__barray_mask_return.exit240.i, label %panic.i239.i - -panic.i239.i: ; preds = %__barray_mask_borrow.exit.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit240.i: ; preds = %__barray_mask_borrow.exit.i - %48 = and i64 %46, -2 - store i64 %48, ptr %2, align 4 - store i64 %45, ptr %1, align 4 - %49 = load i64, ptr %2, align 4 - %50 = and i64 %49, 4 - %.not.i = icmp eq i64 %50, 0 - br i1 %.not.i, label %__barray_mask_borrow.exit242.i, label %panic.i241.i - -panic.i241.i: ; preds = %__barray_mask_return.exit240.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit242.i: ; preds = %__barray_mask_return.exit240.i - %51 = or disjoint i64 %49, 4 - store i64 %51, ptr %2, align 4 - %52 = load i64, ptr %13, align 4 - tail call void @___rxy(i64 %52, double 0x400921FB54442D18, double 0.000000e+00) - %53 = load i64, ptr %2, align 4 - %54 = and i64 %53, 4 - %.not268.i = icmp eq i64 %54, 0 - br i1 %.not268.i, label %panic.i243.i, label %__barray_mask_return.exit244.i - -panic.i243.i: ; preds = %__barray_mask_borrow.exit242.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit244.i: ; preds = %__barray_mask_borrow.exit242.i - %55 = and i64 %53, -5 - store i64 %55, ptr %2, align 4 - store i64 %52, ptr %13, align 4 - %56 = load i64, ptr %2, align 4 - %57 = and i64 %56, 8 - %.not269.i = icmp eq i64 %57, 0 - br i1 %.not269.i, label %__barray_mask_borrow.exit246.i, label %panic.i245.i - -panic.i245.i: ; preds = %__barray_mask_return.exit244.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit246.i: ; preds = %__barray_mask_return.exit244.i - %58 = or disjoint i64 %56, 8 - store i64 %58, ptr %2, align 4 - %59 = load i64, ptr %17, align 4 - tail call void @___rxy(i64 %59, double 0x400921FB54442D18, double 0.000000e+00) - %60 = load i64, ptr %2, align 4 - %61 = and i64 %60, 8 - %.not270.i = icmp eq i64 %61, 0 - br i1 %.not270.i, label %panic.i247.i, label %__barray_mask_return.exit248.i - -panic.i247.i: ; preds = %__barray_mask_borrow.exit246.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit248.i: ; preds = %__barray_mask_borrow.exit246.i - %62 = and i64 %60, -9 - store i64 %62, ptr %2, align 4 - store i64 %59, ptr %17, align 4 - %63 = load i64, ptr %2, align 4 - %64 = and i64 %63, 512 - %.not271.i = icmp eq i64 %64, 0 - br i1 %.not271.i, label %__barray_mask_borrow.exit250.i, label %panic.i249.i - -panic.i249.i: ; preds = %__barray_mask_return.exit248.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit250.i: ; preds = %__barray_mask_return.exit248.i - %65 = or disjoint i64 %63, 512 - store i64 %65, ptr %2, align 4 - %66 = load i64, ptr %41, align 4 - tail call void @___rxy(i64 %66, double 0x400921FB54442D18, double 0.000000e+00) - %67 = load i64, ptr %2, align 4 - %68 = and i64 %67, 512 - %.not272.i = icmp eq i64 %68, 0 - br i1 %.not272.i, label %panic.i251.i, label %__barray_mask_return.exit252.i - -panic.i251.i: ; preds = %__barray_mask_borrow.exit250.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit252.i: ; preds = %__barray_mask_borrow.exit250.i - %69 = and i64 %67, -513 - store i64 %69, ptr %2, align 4 - store i64 %66, ptr %41, align 4 - %70 = insertvalue { { ptr, ptr, i64 }, i64 } poison, { ptr, ptr, i64 } %"116.fca.2.insert.i", 0 - %71 = tail call ptr @heap_alloc(i64 240) - %72 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %72, align 1 - br label %__barray_check_bounds.exit.i.i.i - -73: ; preds = %loop_body.i.i - %74 = lshr i64 %.fca.2.extract82.i.i.i, 6 - %75 = getelementptr i64, ptr %.fca.1.extract81.i.i.i, i64 %74 - %76 = load i64, ptr %75, align 4 - %77 = and i64 %.fca.2.extract82.i.i.i, 63 - %78 = sub nuw nsw i64 64, %77 - %79 = lshr i64 -1, %78 - %80 = icmp eq i64 %77, 0 - %81 = select i1 %80, i64 0, i64 %79 - %82 = or i64 %76, %81 - store i64 %82, ptr %75, align 4 - %last_valid.i.i.i.i = add i64 %.fca.2.extract82.i.i.i, 9 - %83 = lshr i64 %last_valid.i.i.i.i, 6 - %84 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i.i.i, i64 %83 - %85 = load i64, ptr %84, align 4 - %86 = and i64 %last_valid.i.i.i.i, 63 - %87 = shl nsw i64 -2, %86 - %88 = icmp eq i64 %86, 63 - %89 = select i1 %88, i64 0, i64 %87 - %90 = or i64 %85, %89 - store i64 %90, ptr %84, align 4 - %reass.sub.i.i.i.i = sub nsw i64 %83, %74 - %.not.i.i.i.i = icmp eq i64 %reass.sub.i.i.i.i, -1 - br i1 %.not.i.i.i.i, label %"__hugr__.$measure_array$$n(10).280.exit.i", label %mask_block_ok.i.i.i.i - -91: ; preds = %mask_block_ok.i.i.i.i - %92 = add nuw i64 %.02.i.i.i.i, 1 - %exitcond.not.i.i.i.i = icmp eq i64 %.02.i.i.i.i, %reass.sub.i.i.i.i - br i1 %exitcond.not.i.i.i.i, label %"__hugr__.$measure_array$$n(10).280.exit.i", label %mask_block_ok.i.i.i.i - -mask_block_ok.i.i.i.i: ; preds = %73, %91 - %.02.i.i.i.i = phi i64 [ %92, %91 ], [ 0, %73 ] - %gep.i.i.i.i = getelementptr i64, ptr %75, i64 %.02.i.i.i.i - %93 = load i64, ptr %gep.i.i.i.i, align 4 - %94 = icmp eq i64 %93, -1 - br i1 %94, label %91, label %mask_block_err.i.i.i.i - -mask_block_err.i.i.i.i: ; preds = %mask_block_ok.i.i.i.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit.i.i.i: ; preds = %loop_body.i.i, %__barray_mask_return.exit252.i - %.fca.2.extract82.i187.i.i = phi i64 [ 0, %__barray_mask_return.exit252.i ], [ %.fca.2.extract82.i.i.i, %loop_body.i.i ] - %.fca.1.extract81.i186.i.i = phi ptr [ %2, %__barray_mask_return.exit252.i ], [ %.fca.1.extract81.i.i.i, %loop_body.i.i ] - %.fca.0.extract80.i185.i.i = phi ptr [ %1, %__barray_mask_return.exit252.i ], [ %.fca.0.extract80.i.i.i, %loop_body.i.i ] - %"306_0.sroa.15.0184.i.i" = phi i64 [ 0, %__barray_mask_return.exit252.i ], [ %95, %loop_body.i.i ] - %.pn165183.i.i = phi { { ptr, ptr, i64 }, i64 } [ %70, %__barray_mask_return.exit252.i ], [ %110, %loop_body.i.i ] - %95 = add nuw nsw i64 %"306_0.sroa.15.0184.i.i", 1 - %96 = add i64 %"306_0.sroa.15.0184.i.i", %.fca.2.extract82.i187.i.i - %97 = lshr i64 %96, 6 - %98 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i186.i.i, i64 %97 - %99 = load i64, ptr %98, align 4 - %100 = and i64 %96, 63 - %101 = lshr i64 %99, %100 - %102 = trunc i64 %101 to i1 - br i1 %102, label %panic.i.i.i.i, label %__barray_check_bounds.exit.i.i - -panic.i.i.i.i: ; preds = %__barray_check_bounds.exit.i.i.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit.i.i: ; preds = %__barray_check_bounds.exit.i.i.i - %103 = shl nuw i64 1, %100 - %104 = xor i64 %103, %99 - store i64 %104, ptr %98, align 4 - %105 = getelementptr inbounds i64, ptr %.fca.0.extract80.i185.i.i, i64 %96 - %106 = load i64, ptr %105, align 4 - %lazy_measure.i.i = tail call i64 @___lazy_measure(i64 %106) - tail call void @___qfree(i64 %106) - %107 = load i64, ptr %72, align 4 - %108 = lshr i64 %107, %"306_0.sroa.15.0184.i.i" - %109 = trunc i64 %108 to i1 - br i1 %109, label %loop_body.i.i, label %panic.i.i.i - -panic.i.i.i: ; preds = %__barray_check_bounds.exit.i.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -loop_body.i.i: ; preds = %__barray_check_bounds.exit.i.i - %"371_054.fca.1.insert.i.i" = insertvalue { i1, i64, i1 } { i1 true, i64 poison, i1 undef }, i64 %lazy_measure.i.i, 1 - %"371_054.fca.2.insert.i.i" = insertvalue { i1, i64, i1 } %"371_054.fca.1.insert.i.i", i1 undef, 2 - %110 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn165183.i.i, i64 %95, 1 - %111 = shl nuw nsw i64 1, %"306_0.sroa.15.0184.i.i" - %112 = xor i64 %107, %111 - store i64 %112, ptr %72, align 4 - %113 = getelementptr inbounds nuw { i1, i64, i1 }, ptr %71, i64 %"306_0.sroa.15.0184.i.i" - store { i1, i64, i1 } %"371_054.fca.2.insert.i.i", ptr %113, align 4 - %114 = extractvalue { { ptr, ptr, i64 }, i64 } %.pn165183.i.i, 0 - %.fca.0.extract80.i.i.i = extractvalue { ptr, ptr, i64 } %114, 0 - %.fca.1.extract81.i.i.i = extractvalue { ptr, ptr, i64 } %114, 1 - %.fca.2.extract82.i.i.i = extractvalue { ptr, ptr, i64 } %114, 2 - %exitcond.not.i.i = icmp eq i64 %95, 10 - br i1 %exitcond.not.i.i, label %73, label %__barray_check_bounds.exit.i.i.i - -"__hugr__.$measure_array$$n(10).280.exit.i": ; preds = %91, %73 - tail call void @heap_free(ptr %.fca.0.extract80.i.i.i) - tail call void @heap_free(ptr nonnull %.fca.1.extract81.i.i.i) - %115 = load i64, ptr %72, align 4 - %116 = trunc i64 %115 to i1 - br i1 %116, label %cond_exit_89.thread.i, label %__barray_mask_borrow.exit259.i - -mask_block_err.i.i: ; preds = %cond_exit_89.thread.9.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_mask_borrow.exit259.i: ; preds = %"__hugr__.$measure_array$$n(10).280.exit.i" - %117 = or disjoint i64 %115, 1 - store i64 %117, ptr %72, align 4 - %118 = load { i1, i64, i1 }, ptr %71, align 4 - %.fca.0.extract167.i = extractvalue { i1, i64, i1 } %118, 0 - br i1 %.fca.0.extract167.i, label %cond_392_case_1.i, label %cond_exit_89.thread.i - -cond_exit_89.thread.i: ; preds = %cond_392_case_1.i, %__barray_mask_borrow.exit259.i, %"__hugr__.$measure_array$$n(10).280.exit.i" - %119 = phi i64 [ %.pre.i, %cond_392_case_1.i ], [ %117, %__barray_mask_borrow.exit259.i ], [ %115, %"__hugr__.$measure_array$$n(10).280.exit.i" ] - %120 = and i64 %119, 2 - %.not290.i = icmp eq i64 %120, 0 - br i1 %.not290.i, label %__barray_mask_borrow.exit259.1.i, label %cond_exit_89.thread.1.i - -__barray_mask_borrow.exit259.1.i: ; preds = %cond_exit_89.thread.i - %121 = or disjoint i64 %119, 2 - store i64 %121, ptr %72, align 4 - %122 = getelementptr inbounds nuw i8, ptr %71, i64 24 - %123 = load { i1, i64, i1 }, ptr %122, align 4 - %.fca.0.extract167.1.i = extractvalue { i1, i64, i1 } %123, 0 - br i1 %.fca.0.extract167.1.i, label %cond_392_case_1.1.i, label %cond_exit_89.thread.1.i - -cond_392_case_1.1.i: ; preds = %__barray_mask_borrow.exit259.1.i - %.fca.1.extract.1.i = extractvalue { i1, i64, i1 } %123, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.1.i) - %.pre281.i = load i64, ptr %72, align 4 - br label %cond_exit_89.thread.1.i - -cond_exit_89.thread.1.i: ; preds = %cond_392_case_1.1.i, %__barray_mask_borrow.exit259.1.i, %cond_exit_89.thread.i - %124 = phi i64 [ %.pre281.i, %cond_392_case_1.1.i ], [ %121, %__barray_mask_borrow.exit259.1.i ], [ %119, %cond_exit_89.thread.i ] - %125 = and i64 %124, 4 - %.not291.i = icmp eq i64 %125, 0 - br i1 %.not291.i, label %__barray_mask_borrow.exit259.2.i, label %cond_exit_89.thread.2.i - -__barray_mask_borrow.exit259.2.i: ; preds = %cond_exit_89.thread.1.i - %126 = or disjoint i64 %124, 4 - store i64 %126, ptr %72, align 4 - %127 = getelementptr inbounds nuw i8, ptr %71, i64 48 - %128 = load { i1, i64, i1 }, ptr %127, align 4 - %.fca.0.extract167.2.i = extractvalue { i1, i64, i1 } %128, 0 - br i1 %.fca.0.extract167.2.i, label %cond_392_case_1.2.i, label %cond_exit_89.thread.2.i - -cond_392_case_1.2.i: ; preds = %__barray_mask_borrow.exit259.2.i - %.fca.1.extract.2.i = extractvalue { i1, i64, i1 } %128, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.2.i) - %.pre282.i = load i64, ptr %72, align 4 - br label %cond_exit_89.thread.2.i - -cond_exit_89.thread.2.i: ; preds = %cond_392_case_1.2.i, %__barray_mask_borrow.exit259.2.i, %cond_exit_89.thread.1.i - %129 = phi i64 [ %.pre282.i, %cond_392_case_1.2.i ], [ %126, %__barray_mask_borrow.exit259.2.i ], [ %124, %cond_exit_89.thread.1.i ] - %130 = and i64 %129, 8 - %.not292.i = icmp eq i64 %130, 0 - br i1 %.not292.i, label %__barray_mask_borrow.exit259.3.i, label %cond_exit_89.thread.3.i - -__barray_mask_borrow.exit259.3.i: ; preds = %cond_exit_89.thread.2.i - %131 = or disjoint i64 %129, 8 - store i64 %131, ptr %72, align 4 - %132 = getelementptr inbounds nuw i8, ptr %71, i64 72 - %133 = load { i1, i64, i1 }, ptr %132, align 4 - %.fca.0.extract167.3.i = extractvalue { i1, i64, i1 } %133, 0 - br i1 %.fca.0.extract167.3.i, label %cond_392_case_1.3.i, label %cond_exit_89.thread.3.i - -cond_392_case_1.3.i: ; preds = %__barray_mask_borrow.exit259.3.i - %.fca.1.extract.3.i = extractvalue { i1, i64, i1 } %133, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.3.i) - %.pre283.i = load i64, ptr %72, align 4 - br label %cond_exit_89.thread.3.i - -cond_exit_89.thread.3.i: ; preds = %cond_392_case_1.3.i, %__barray_mask_borrow.exit259.3.i, %cond_exit_89.thread.2.i - %134 = phi i64 [ %.pre283.i, %cond_392_case_1.3.i ], [ %131, %__barray_mask_borrow.exit259.3.i ], [ %129, %cond_exit_89.thread.2.i ] - %135 = and i64 %134, 16 - %.not293.i = icmp eq i64 %135, 0 - br i1 %.not293.i, label %__barray_mask_borrow.exit259.4.i, label %cond_exit_89.thread.4.i - -__barray_mask_borrow.exit259.4.i: ; preds = %cond_exit_89.thread.3.i - %136 = or disjoint i64 %134, 16 - store i64 %136, ptr %72, align 4 - %137 = getelementptr inbounds nuw i8, ptr %71, i64 96 - %138 = load { i1, i64, i1 }, ptr %137, align 4 - %.fca.0.extract167.4.i = extractvalue { i1, i64, i1 } %138, 0 - br i1 %.fca.0.extract167.4.i, label %cond_392_case_1.4.i, label %cond_exit_89.thread.4.i - -cond_392_case_1.4.i: ; preds = %__barray_mask_borrow.exit259.4.i - %.fca.1.extract.4.i = extractvalue { i1, i64, i1 } %138, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.4.i) - %.pre284.i = load i64, ptr %72, align 4 - br label %cond_exit_89.thread.4.i - -cond_exit_89.thread.4.i: ; preds = %cond_392_case_1.4.i, %__barray_mask_borrow.exit259.4.i, %cond_exit_89.thread.3.i - %139 = phi i64 [ %.pre284.i, %cond_392_case_1.4.i ], [ %136, %__barray_mask_borrow.exit259.4.i ], [ %134, %cond_exit_89.thread.3.i ] - %140 = and i64 %139, 32 - %.not294.i = icmp eq i64 %140, 0 - br i1 %.not294.i, label %__barray_mask_borrow.exit259.5.i, label %cond_exit_89.thread.5.i - -__barray_mask_borrow.exit259.5.i: ; preds = %cond_exit_89.thread.4.i - %141 = or disjoint i64 %139, 32 - store i64 %141, ptr %72, align 4 - %142 = getelementptr inbounds nuw i8, ptr %71, i64 120 - %143 = load { i1, i64, i1 }, ptr %142, align 4 - %.fca.0.extract167.5.i = extractvalue { i1, i64, i1 } %143, 0 - br i1 %.fca.0.extract167.5.i, label %cond_392_case_1.5.i, label %cond_exit_89.thread.5.i - -cond_392_case_1.5.i: ; preds = %__barray_mask_borrow.exit259.5.i - %.fca.1.extract.5.i = extractvalue { i1, i64, i1 } %143, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.5.i) - %.pre285.i = load i64, ptr %72, align 4 - br label %cond_exit_89.thread.5.i - -cond_exit_89.thread.5.i: ; preds = %cond_392_case_1.5.i, %__barray_mask_borrow.exit259.5.i, %cond_exit_89.thread.4.i - %144 = phi i64 [ %.pre285.i, %cond_392_case_1.5.i ], [ %141, %__barray_mask_borrow.exit259.5.i ], [ %139, %cond_exit_89.thread.4.i ] - %145 = and i64 %144, 64 - %.not295.i = icmp eq i64 %145, 0 - br i1 %.not295.i, label %__barray_mask_borrow.exit259.6.i, label %cond_exit_89.thread.6.i - -__barray_mask_borrow.exit259.6.i: ; preds = %cond_exit_89.thread.5.i - %146 = or disjoint i64 %144, 64 - store i64 %146, ptr %72, align 4 - %147 = getelementptr inbounds nuw i8, ptr %71, i64 144 - %148 = load { i1, i64, i1 }, ptr %147, align 4 - %.fca.0.extract167.6.i = extractvalue { i1, i64, i1 } %148, 0 - br i1 %.fca.0.extract167.6.i, label %cond_392_case_1.6.i, label %cond_exit_89.thread.6.i - -cond_392_case_1.6.i: ; preds = %__barray_mask_borrow.exit259.6.i - %.fca.1.extract.6.i = extractvalue { i1, i64, i1 } %148, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.6.i) - %.pre286.i = load i64, ptr %72, align 4 - br label %cond_exit_89.thread.6.i - -cond_exit_89.thread.6.i: ; preds = %cond_392_case_1.6.i, %__barray_mask_borrow.exit259.6.i, %cond_exit_89.thread.5.i - %149 = phi i64 [ %.pre286.i, %cond_392_case_1.6.i ], [ %146, %__barray_mask_borrow.exit259.6.i ], [ %144, %cond_exit_89.thread.5.i ] - %150 = and i64 %149, 128 - %.not296.i = icmp eq i64 %150, 0 - br i1 %.not296.i, label %__barray_mask_borrow.exit259.7.i, label %cond_exit_89.thread.7.i - -__barray_mask_borrow.exit259.7.i: ; preds = %cond_exit_89.thread.6.i - %151 = or disjoint i64 %149, 128 - store i64 %151, ptr %72, align 4 - %152 = getelementptr inbounds nuw i8, ptr %71, i64 168 - %153 = load { i1, i64, i1 }, ptr %152, align 4 - %.fca.0.extract167.7.i = extractvalue { i1, i64, i1 } %153, 0 - br i1 %.fca.0.extract167.7.i, label %cond_392_case_1.7.i, label %cond_exit_89.thread.7.i - -cond_392_case_1.7.i: ; preds = %__barray_mask_borrow.exit259.7.i - %.fca.1.extract.7.i = extractvalue { i1, i64, i1 } %153, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.7.i) - %.pre287.i = load i64, ptr %72, align 4 - br label %cond_exit_89.thread.7.i - -cond_exit_89.thread.7.i: ; preds = %cond_392_case_1.7.i, %__barray_mask_borrow.exit259.7.i, %cond_exit_89.thread.6.i - %154 = phi i64 [ %.pre287.i, %cond_392_case_1.7.i ], [ %151, %__barray_mask_borrow.exit259.7.i ], [ %149, %cond_exit_89.thread.6.i ] - %155 = and i64 %154, 256 - %.not297.i = icmp eq i64 %155, 0 - br i1 %.not297.i, label %__barray_mask_borrow.exit259.8.i, label %cond_exit_89.thread.8.i - -__barray_mask_borrow.exit259.8.i: ; preds = %cond_exit_89.thread.7.i - %156 = or disjoint i64 %154, 256 - store i64 %156, ptr %72, align 4 - %157 = getelementptr inbounds nuw i8, ptr %71, i64 192 - %158 = load { i1, i64, i1 }, ptr %157, align 4 - %.fca.0.extract167.8.i = extractvalue { i1, i64, i1 } %158, 0 - br i1 %.fca.0.extract167.8.i, label %cond_392_case_1.8.i, label %cond_exit_89.thread.8.i - -cond_392_case_1.8.i: ; preds = %__barray_mask_borrow.exit259.8.i - %.fca.1.extract.8.i = extractvalue { i1, i64, i1 } %158, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.8.i) - %.pre288.i = load i64, ptr %72, align 4 - br label %cond_exit_89.thread.8.i - -cond_exit_89.thread.8.i: ; preds = %cond_392_case_1.8.i, %__barray_mask_borrow.exit259.8.i, %cond_exit_89.thread.7.i - %159 = phi i64 [ %.pre288.i, %cond_392_case_1.8.i ], [ %156, %__barray_mask_borrow.exit259.8.i ], [ %154, %cond_exit_89.thread.7.i ] - %160 = and i64 %159, 512 - %.not298.i = icmp eq i64 %160, 0 - br i1 %.not298.i, label %__barray_mask_borrow.exit259.9.i, label %cond_exit_89.thread.9.i - -__barray_mask_borrow.exit259.9.i: ; preds = %cond_exit_89.thread.8.i - %161 = or disjoint i64 %159, 512 - store i64 %161, ptr %72, align 4 - %162 = getelementptr inbounds nuw i8, ptr %71, i64 216 - %163 = load { i1, i64, i1 }, ptr %162, align 4 - %.fca.0.extract167.9.i = extractvalue { i1, i64, i1 } %163, 0 - br i1 %.fca.0.extract167.9.i, label %cond_392_case_1.9.i, label %cond_exit_89.thread.9.i - -cond_392_case_1.9.i: ; preds = %__barray_mask_borrow.exit259.9.i - %.fca.1.extract.9.i = extractvalue { i1, i64, i1 } %163, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.9.i) - %.pre289.i = load i64, ptr %72, align 4 - br label %cond_exit_89.thread.9.i - -cond_exit_89.thread.9.i: ; preds = %cond_392_case_1.9.i, %__barray_mask_borrow.exit259.9.i, %cond_exit_89.thread.8.i - %164 = phi i64 [ %.pre289.i, %cond_392_case_1.9.i ], [ %161, %__barray_mask_borrow.exit259.9.i ], [ %159, %cond_exit_89.thread.8.i ] - %165 = or i64 %164, -1024 - store i64 %165, ptr %72, align 4 - %166 = icmp eq i64 %165, -1 - br i1 %166, label %__hugr__.main.1.exit, label %mask_block_err.i.i - -cond_392_case_1.i: ; preds = %__barray_mask_borrow.exit259.i - %.fca.1.extract.i = extractvalue { i1, i64, i1 } %118, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.i) - %.pre.i = load i64, ptr %72, align 4 - br label %cond_exit_89.thread.i - -__hugr__.main.1.exit: ; preds = %cond_exit_89.thread.9.i - tail call void @heap_free(ptr %71) - tail call void @heap_free(ptr nonnull %72) - %167 = tail call i64 @teardown() - ret i64 %167 + tail call void @setup(i64 %0), !dbg !63 + tail call void @"__hugr__.__main__.measure_qb_array..main.1"(), !dbg !63 + %1 = tail call i64 @teardown(), !dbg !63 + ret i64 %1, !dbg !63 } declare void @setup(i64) local_unnamed_addr @@ -632,6 +641,71 @@ declare i64 @teardown() local_unnamed_addr attributes #0 = { noreturn } -!name = !{!0} - -!0 = !{!"mainlib"} +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} +!name = !{!3} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v0.32.0)-v0.21.11", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "file:///Users/george.hodgkins/proj/clone-anduril") +!3 = !{!"mainlib"} +!4 = distinct !DISubprogram(name: "measure_qb_array..main", linkageName: "__hugr__.__main__.measure_qb_array..main.1", scope: null, file: !5, line: 101, type: !6, scopeLine: 102, spFlags: DISPFlagDefinition, unit: !1) +!5 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "") +!6 = !DISubroutineType(types: !7) +!7 = !{null} +!8 = !DILocation(line: 102, column: 13, scope: !4) +!9 = !DILocation(line: 102, column: 19, scope: !4) +!10 = !DILocation(line: 103, column: 10, scope: !4, inlinedAt: !11) +!11 = distinct !DILocation(line: 103, column: 10, scope: !4) +!12 = !DILocation(line: 103, column: 10, scope: !4) +!13 = !DILocation(line: 103, column: 8, scope: !4) +!14 = !DILocation(line: 103, column: 10, scope: !4, inlinedAt: !15) +!15 = distinct !DILocation(line: 104, column: 10, scope: !4) +!16 = !DILocation(line: 104, column: 10, scope: !4) +!17 = !DILocation(line: 104, column: 8, scope: !4) +!18 = !DILocation(line: 103, column: 10, scope: !4, inlinedAt: !19) +!19 = distinct !DILocation(line: 105, column: 10, scope: !4) +!20 = !DILocation(line: 105, column: 10, scope: !4) +!21 = !DILocation(line: 105, column: 8, scope: !4) +!22 = !DILocation(line: 103, column: 10, scope: !4, inlinedAt: !23) +!23 = distinct !DILocation(line: 106, column: 10, scope: !4) +!24 = !DILocation(line: 106, column: 10, scope: !4) +!25 = !DILocation(line: 106, column: 8, scope: !4) +!26 = !DILocation(line: 84, column: 25, scope: !27, inlinedAt: !37) +!27 = distinct !DISubprogram(name: "std.array.array.__iter__$qubit&10", linkageName: "__hugr__.guppylang.std.array.array.__iter__$qubit&10.190", scope: null, file: !28, line: 83, type: !29, scopeLine: 84, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!28 = !DIFile(filename: "/Users/george.hodgkins/proj/clone-anduril/.venv/lib/python3.10/site-packages/guppylang/std/array.py", directory: "") +!29 = !DISubroutineType(types: !30) +!30 = !{!31, !33} +!31 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ { ptr, ptr, i64 }, i64 }", file: !2, size: 32, align: 8, elements: !32) +!32 = !{!33, !36} +!33 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ ptr, ptr, i64 }", file: !2, size: 24, align: 8, elements: !34) +!34 = !{!35, !35, !36} +!35 = !DIBasicType(name: "ptr", size: 64, encoding: DW_ATE_address) +!36 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!37 = distinct !DILocation(line: 382, column: 37, scope: !38, inlinedAt: !42) +!38 = distinct !DISubprogram(name: "std.quantum.measure_array$10", linkageName: "__hugr__.guppylang.std.quantum.measure_array$10.149", scope: null, file: !39, line: 380, type: !40, scopeLine: 382, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!39 = !DIFile(filename: "/Users/george.hodgkins/proj/clone-anduril/.venv/lib/python3.10/site-packages/guppylang/std/quantum/__init__.py", directory: "") +!40 = !DISubroutineType(types: !41) +!41 = !{!33, !33} +!42 = distinct !DILocation(line: 107, column: 8, scope: !4) +!43 = !DILocation(line: 382, column: 11, scope: !38, inlinedAt: !42) +!44 = !DILocation(line: 276, column: 8, scope: !45, inlinedAt: !53) +!45 = distinct !DISubprogram(name: "std.array.ArrayIter.__next__$qubit&10", linkageName: "__hugr__.guppylang.std.array.ArrayIter.__next__$qubit&10.202", scope: null, file: !28, line: 270, type: !46, scopeLine: 273, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!46 = !DISubroutineType(types: !47) +!47 = !{!48, !31} +!48 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i1, { { { ptr, ptr, i64 }, i64 }, i64 } }", file: !2, size: 40, align: 8, elements: !49) +!49 = !{!50, !51} +!50 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) +!51 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ { { ptr, ptr, i64 }, i64 }, i64 }", file: !2, size: 40, align: 8, elements: !52) +!52 = !{!31, !36} +!53 = distinct !DILocation(line: 382, column: 37, scope: !38, inlinedAt: !42) +!54 = !DILocation(line: 275, column: 50, scope: !45, inlinedAt: !53) +!55 = !DILocation(line: 274, column: 19, scope: !45, inlinedAt: !53) +!56 = !DILocation(line: 103, column: 10, scope: !4, inlinedAt: !57) +!57 = distinct !DILocation(line: 274, column: 19, scope: !45, inlinedAt: !53) +!58 = !DILocation(line: 273, column: 11, scope: !45, inlinedAt: !53) +!59 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !60, type: !61, spFlags: DISPFlagDefinition, unit: !1) +!60 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") +!61 = !DISubroutineType(types: !62) +!62 = !{!36, !36} +!63 = !DILocation(line: 0, scope: !59) diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-no_results/no_results_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-no_results/no_results_x86_64-unknown-linux-gnu index 970d19465..0499d2d4c 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-no_results/no_results_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-no_results/no_results_x86_64-unknown-linux-gnu @@ -5,6 +5,26 @@ target triple = "x86_64-unknown-linux-gnu" @"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." +define void @"__hugr__.__main__.no_results..bar.1"() local_unnamed_addr !dbg !4 { +alloca_block: + %qalloc.i = tail call i64 @___qalloc(), !dbg !8 + %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 + br i1 %not_max.not.not.i, label %cond_18_case_0.i, label %__hugr__.__tk2_qalloc.14.exit, !dbg !8 + +cond_18_case_0.i: ; preds = %alloca_block + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + unreachable, !dbg !8 + +__hugr__.__tk2_qalloc.14.exit: ; preds = %alloca_block + tail call void @___reset(i64 %qalloc.i), !dbg !8 + tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 + tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 + %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) + ret void +} + declare i64 @___lazy_measure(i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -22,26 +42,12 @@ declare void @___rxy(i64, double, double) local_unnamed_addr declare void @___rz(i64, double) local_unnamed_addr -define i64 @qmain(i64 %0) local_unnamed_addr { +define i64 @qmain(i64 %0) local_unnamed_addr !dbg !10 { entry: - tail call void @setup(i64 %0) - %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.not.i.i, label %cond_18_case_0.i.i, label %__hugr__.bar.1.exit - -cond_18_case_0.i.i: ; preds = %entry - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.bar.1.exit: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - tail call void @___rxy(i64 %qalloc.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i.i, double 0x400921FB54442D18) - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i.i) - tail call void @___qfree(i64 %qalloc.i.i) - tail call void @___dec_future_refcount(i64 %lazy_measure.i) - %1 = tail call i64 @teardown() - ret i64 %1 + tail call void @setup(i64 %0), !dbg !15 + tail call void @"__hugr__.__main__.no_results..bar.1"(), !dbg !15 + %1 = tail call i64 @teardown(), !dbg !15 + ret i64 %1, !dbg !15 } declare void @setup(i64) local_unnamed_addr @@ -50,6 +56,23 @@ declare i64 @teardown() local_unnamed_addr attributes #0 = { noreturn } -!name = !{!0} - -!0 = !{!"mainlib"} +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} +!name = !{!3} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v0.32.0)-v0.21.11", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "file:///Users/george.hodgkins/proj/clone-anduril") +!3 = !{!"mainlib"} +!4 = distinct !DISubprogram(name: "no_results..bar", linkageName: "__hugr__.__main__.no_results..bar.1", scope: null, file: !5, line: 64, type: !6, scopeLine: 65, spFlags: DISPFlagDefinition, unit: !1) +!5 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "") +!6 = !DISubroutineType(types: !7) +!7 = !{null} +!8 = !DILocation(line: 65, column: 20, scope: !4) +!9 = !DILocation(line: 66, column: 8, scope: !4) +!10 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !11, type: !12, spFlags: DISPFlagDefinition, unit: !1) +!11 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") +!12 = !DISubroutineType(types: !13) +!13 = !{!14, !14} +!14 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!15 = !DILocation(line: 0, scope: !10) diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-postselect_exit/postselect_exit_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-postselect_exit/postselect_exit_x86_64-unknown-linux-gnu index bb4c313a8..543c442bb 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-postselect_exit/postselect_exit_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-postselect_exit/postselect_exit_x86_64-unknown-linux-gnu @@ -7,6 +7,38 @@ target triple = "x86_64-unknown-linux-gnu" @res_c.1C9EF4D1.0 = private constant [12 x i8] c"\0BUSER:BOOL:c" @"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." +define void @"__hugr__.__main__.postselect_exit..main.1"() local_unnamed_addr !dbg !4 { +alloca_block: + %qalloc.i = tail call i64 @___qalloc(), !dbg !8 + %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 + br i1 %not_max.not.not.i, label %cond_45_case_0.i, label %__hugr__.__tk2_qalloc.41.exit, !dbg !8 + +cond_45_case_0.i: ; preds = %alloca_block + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + unreachable, !dbg !8 + +__hugr__.__tk2_qalloc.41.exit: ; preds = %alloca_block + tail call void @___reset(i64 %qalloc.i), !dbg !8 + tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 + tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 + %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + tail call void @___qfree(i64 %qalloc.i) + tail call void @___inc_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 %0, label %cond_98_case_1 + +cond_98_case_1: ; preds = %__hugr__.__tk2_qalloc.41.exit + %read_bool66 = 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_c.1C9EF4D1.0, i64 11, i1 %read_bool66), !dbg !10 + ret void + +0: ; preds = %__hugr__.__tk2_qalloc.41.exit + tail call void @panic(i32 42, ptr nonnull @s_Postselect.13DF1CD0.0), !dbg !11 + unreachable +} + declare i64 @___lazy_measure(i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -30,38 +62,12 @@ declare void @___rxy(i64, double, double) local_unnamed_addr declare void @___rz(i64, double) local_unnamed_addr -define i64 @qmain(i64 %0) local_unnamed_addr { +define i64 @qmain(i64 %0) local_unnamed_addr !dbg !12 { entry: - tail call void @setup(i64 %0) - %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.not.i.i, label %cond_45_case_0.i.i, label %__hugr__.__tk2_qalloc.41.exit.i - -cond_45_case_0.i.i: ; preds = %entry - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_qalloc.41.exit.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - tail call void @___rxy(i64 %qalloc.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i.i, double 0x400921FB54442D18) - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i.i) - tail call void @___qfree(i64 %qalloc.i.i) - tail call void @___inc_future_refcount(i64 %lazy_measure.i) - %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) - tail call void @___dec_future_refcount(i64 %lazy_measure.i) - br i1 %read_bool.i, label %1, label %__hugr__.main.1.exit - -1: ; preds = %__hugr__.__tk2_qalloc.41.exit.i - tail call void @panic(i32 42, ptr nonnull @s_Postselect.13DF1CD0.0) - unreachable - -__hugr__.main.1.exit: ; preds = %__hugr__.__tk2_qalloc.41.exit.i - %read_bool66.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_bool66.i) - %2 = tail call i64 @teardown() - ret i64 %2 + tail call void @setup(i64 %0), !dbg !17 + tail call void @"__hugr__.__main__.postselect_exit..main.1"(), !dbg !17 + %1 = tail call i64 @teardown(), !dbg !17 + ret i64 %1, !dbg !17 } declare void @setup(i64) local_unnamed_addr @@ -70,6 +76,25 @@ declare i64 @teardown() local_unnamed_addr attributes #0 = { noreturn } -!name = !{!0} - -!0 = !{!"mainlib"} +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} +!name = !{!3} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v0.32.0)-v0.21.11", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "file:///Users/george.hodgkins/proj/clone-anduril") +!3 = !{!"mainlib"} +!4 = distinct !DISubprogram(name: "postselect_exit..main", linkageName: "__hugr__.__main__.postselect_exit..main.1", scope: null, file: !5, line: 131, type: !6, scopeLine: 132, spFlags: DISPFlagDefinition, unit: !1) +!5 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "") +!6 = !DISubroutineType(types: !7) +!7 = !{null} +!8 = !DILocation(line: 132, column: 12, scope: !4) +!9 = !DILocation(line: 133, column: 8, scope: !4) +!10 = !DILocation(line: 137, column: 8, scope: !4) +!11 = !DILocation(line: 136, column: 12, scope: !4) +!12 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !13, type: !14, spFlags: DISPFlagDefinition, unit: !1) +!13 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") +!14 = !DISubroutineType(types: !15) +!15 = !{!16, !16} +!16 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!17 = !DILocation(line: 0, scope: !12) diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-postselect_panic/postselect_panic_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-postselect_panic/postselect_panic_x86_64-unknown-linux-gnu index fa8c093df..e8054d2de 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-postselect_panic/postselect_panic_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-postselect_panic/postselect_panic_x86_64-unknown-linux-gnu @@ -7,6 +7,38 @@ target triple = "x86_64-unknown-linux-gnu" @res_c.1C9EF4D1.0 = private constant [12 x i8] c"\0BUSER:BOOL:c" @"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." +define void @"__hugr__.__main__.postselect_panic..main.1"() local_unnamed_addr !dbg !4 { +alloca_block: + %qalloc.i = tail call i64 @___qalloc(), !dbg !8 + %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 + br i1 %not_max.not.not.i, label %cond_43_case_0.i, label %__hugr__.__tk2_qalloc.39.exit, !dbg !8 + +cond_43_case_0.i: ; preds = %alloca_block + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + unreachable, !dbg !8 + +__hugr__.__tk2_qalloc.39.exit: ; preds = %alloca_block + tail call void @___reset(i64 %qalloc.i), !dbg !8 + tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 + tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 + %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + tail call void @___qfree(i64 %qalloc.i) + tail call void @___inc_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 %0, label %cond_96_case_1 + +cond_96_case_1: ; preds = %__hugr__.__tk2_qalloc.39.exit + %read_bool65 = 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_c.1C9EF4D1.0, i64 11, i1 %read_bool65), !dbg !10 + ret void + +0: ; preds = %__hugr__.__tk2_qalloc.39.exit + tail call void @panic(i32 1001, ptr nonnull @s_Postselect.13DF1CD0.0), !dbg !11 + unreachable +} + declare i64 @___lazy_measure(i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -30,38 +62,12 @@ declare void @___rxy(i64, double, double) local_unnamed_addr declare void @___rz(i64, double) local_unnamed_addr -define i64 @qmain(i64 %0) local_unnamed_addr { +define i64 @qmain(i64 %0) local_unnamed_addr !dbg !12 { entry: - tail call void @setup(i64 %0) - %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.not.i.i, label %cond_43_case_0.i.i, label %__hugr__.__tk2_qalloc.39.exit.i - -cond_43_case_0.i.i: ; preds = %entry - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_qalloc.39.exit.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - tail call void @___rxy(i64 %qalloc.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i.i, double 0x400921FB54442D18) - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i.i) - tail call void @___qfree(i64 %qalloc.i.i) - tail call void @___inc_future_refcount(i64 %lazy_measure.i) - %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) - tail call void @___dec_future_refcount(i64 %lazy_measure.i) - br i1 %read_bool.i, label %1, label %__hugr__.main.1.exit - -1: ; preds = %__hugr__.__tk2_qalloc.39.exit.i - tail call void @panic(i32 1001, ptr nonnull @s_Postselect.13DF1CD0.0) - unreachable - -__hugr__.main.1.exit: ; preds = %__hugr__.__tk2_qalloc.39.exit.i - %read_bool65.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_bool65.i) - %2 = tail call i64 @teardown() - ret i64 %2 + tail call void @setup(i64 %0), !dbg !17 + tail call void @"__hugr__.__main__.postselect_panic..main.1"(), !dbg !17 + %1 = tail call i64 @teardown(), !dbg !17 + ret i64 %1, !dbg !17 } declare void @setup(i64) local_unnamed_addr @@ -70,6 +76,25 @@ declare i64 @teardown() local_unnamed_addr attributes #0 = { noreturn } -!name = !{!0} - -!0 = !{!"mainlib"} +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} +!name = !{!3} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v0.32.0)-v0.21.11", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "file:///Users/george.hodgkins/proj/clone-anduril") +!3 = !{!"mainlib"} +!4 = distinct !DISubprogram(name: "postselect_panic..main", linkageName: "__hugr__.__main__.postselect_panic..main.1", scope: null, file: !5, line: 144, type: !6, scopeLine: 145, spFlags: DISPFlagDefinition, unit: !1) +!5 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "") +!6 = !DISubroutineType(types: !7) +!7 = !{null} +!8 = !DILocation(line: 145, column: 12, scope: !4) +!9 = !DILocation(line: 146, column: 8, scope: !4) +!10 = !DILocation(line: 150, column: 8, scope: !4) +!11 = !DILocation(line: 149, column: 12, scope: !4) +!12 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !13, type: !14, spFlags: DISPFlagDefinition, unit: !1) +!13 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") +!14 = !DISubroutineType(types: !15) +!15 = !{!16, !16} +!16 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!17 = !DILocation(line: 0, scope: !12) diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-print_current_shot/print_current_shot_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-print_current_shot/print_current_shot_x86_64-unknown-linux-gnu index eac1eb476..133f80e36 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-print_current_shot/print_current_shot_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-print_current_shot/print_current_shot_x86_64-unknown-linux-gnu @@ -5,23 +5,50 @@ target triple = "x86_64-unknown-linux-gnu" @res_shot.6D86EAF7.0 = private constant [14 x i8] c"\0DUSER:INT:shot" +define void @"__hugr__.__main__.print_current_shot..main.1"() local_unnamed_addr !dbg !4 { +alloca_block: + %shot = tail call i64 @get_current_shot(), !dbg !8 + tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot), !dbg !9 + ret void +} + declare i64 @get_current_shot() local_unnamed_addr declare void @print_int(ptr, i64, i64) local_unnamed_addr -define i64 @qmain(i64 %0) local_unnamed_addr { +define i64 @qmain(i64 %0) local_unnamed_addr !dbg !10 { entry: - tail call void @setup(i64 %0) - %shot.i = tail call i64 @get_current_shot() - tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot.i) - %1 = tail call i64 @teardown() - ret i64 %1 + tail call void @setup(i64 %0), !dbg !15 + %shot.i = tail call i64 @get_current_shot(), !dbg !16 + tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot.i), !dbg !18 + %1 = tail call i64 @teardown(), !dbg !15 + ret i64 %1, !dbg !15 } declare void @setup(i64) local_unnamed_addr declare i64 @teardown() local_unnamed_addr -!name = !{!0} - -!0 = !{!"mainlib"} +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} +!name = !{!3} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v0.32.0)-v0.21.11", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "file:///Users/george.hodgkins/proj/clone-anduril") +!3 = !{!"mainlib"} +!4 = distinct !DISubprogram(name: "print_current_shot..main", linkageName: "__hugr__.__main__.print_current_shot..main.1", scope: null, file: !5, line: 194, type: !6, scopeLine: 195, spFlags: DISPFlagDefinition, unit: !1) +!5 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "") +!6 = !DISubroutineType(types: !7) +!7 = !{null} +!8 = !DILocation(line: 195, column: 23, scope: !4) +!9 = !DILocation(line: 195, column: 8, scope: !4) +!10 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !11, type: !12, spFlags: DISPFlagDefinition, unit: !1) +!11 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") +!12 = !DISubroutineType(types: !13) +!13 = !{!14, !14} +!14 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!15 = !DILocation(line: 0, scope: !10) +!16 = !DILocation(line: 195, column: 23, scope: !4, inlinedAt: !17) +!17 = distinct !DILocation(line: 0, scope: !10) +!18 = !DILocation(line: 195, column: 8, scope: !4, inlinedAt: !17) diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-rng/rng_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-rng/rng_x86_64-unknown-linux-gnu index 2d92b14ca..f4ebbecde 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-rng/rng_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-rng/rng_x86_64-unknown-linux-gnu @@ -11,6 +11,32 @@ target triple = "x86_64-unknown-linux-gnu" @res_rfloat2.4DAB941F.0 = private constant [19 x i8] c"\12USER:FLOAT:rfloat2" @res_rint_bnd2.169DE399.0 = private constant [19 x i8] c"\12USER:INT:rint_bnd2" +define void @"__hugr__.__main__.rng..main.1"() local_unnamed_addr !dbg !4 { +alloca_block: + tail call void @random_seed(i64 42), !dbg !8 + %rint = tail call i32 @random_int(), !dbg !17 + %rint14 = tail call i32 @random_int(), !dbg !18 + %rfloat = tail call double @random_float(), !dbg !19 + %rintb = tail call i32 @random_rng(i32 100), !dbg !20 + %0 = sext i32 %rintb to i64, !dbg !20 + %1 = sext i32 %rint14 to i64, !dbg !18 + %2 = sext i32 %rint to i64, !dbg !17 + tail call void @print_int(ptr nonnull @res_rint.B928E41E.0, i64 13, i64 %2), !dbg !21 + tail call void @print_int(ptr nonnull @res_rint1.0884EC03.0, i64 14, i64 %1), !dbg !22 + tail call void @print_float(ptr nonnull @res_rfloat.F0E4DD2C.0, i64 17, double %rfloat), !dbg !23 + tail call void @print_int(ptr nonnull @res_rint_bnd.CB1E6B0D.0, i64 17, i64 %0), !dbg !24 + tail call void @random_seed(i64 84), !dbg !25 + %rint47 = tail call i32 @random_int(), !dbg !27 + %rfloat49 = tail call double @random_float(), !dbg !28 + %rintb52 = tail call i32 @random_rng(i32 200), !dbg !29 + %3 = sext i32 %rintb52 to i64, !dbg !29 + %4 = sext i32 %rint47 to i64, !dbg !27 + tail call void @print_int(ptr nonnull @res_rint2.F0335598.0, i64 14, i64 %4), !dbg !30 + tail call void @print_float(ptr nonnull @res_rfloat2.4DAB941F.0, i64 18, double %rfloat49), !dbg !31 + tail call void @print_int(ptr nonnull @res_rint_bnd2.169DE399.0, i64 18, i64 %3), !dbg !32 + ret void +} + declare i32 @random_int() local_unnamed_addr declare double @random_float() local_unnamed_addr @@ -23,38 +49,57 @@ declare void @print_float(ptr, i64, double) local_unnamed_addr declare void @random_seed(i64) local_unnamed_addr -define i64 @qmain(i64 %0) local_unnamed_addr { +define i64 @qmain(i64 %0) local_unnamed_addr !dbg !33 { entry: - tail call void @setup(i64 %0) - tail call void @random_seed(i64 42) - %rint.i = tail call i32 @random_int() - %rint14.i = tail call i32 @random_int() - %rfloat.i = tail call double @random_float() - %rintb.i = tail call i32 @random_rng(i32 100) - %1 = sext i32 %rintb.i to i64 - %2 = sext i32 %rint14.i to i64 - %3 = sext i32 %rint.i to i64 - tail call void @print_int(ptr nonnull @res_rint.B928E41E.0, i64 13, i64 %3) - tail call void @print_int(ptr nonnull @res_rint1.0884EC03.0, i64 14, i64 %2) - tail call void @print_float(ptr nonnull @res_rfloat.F0E4DD2C.0, i64 17, double %rfloat.i) - tail call void @print_int(ptr nonnull @res_rint_bnd.CB1E6B0D.0, i64 17, i64 %1) - tail call void @random_seed(i64 84) - %rint47.i = tail call i32 @random_int() - %rfloat49.i = tail call double @random_float() - %rintb52.i = tail call i32 @random_rng(i32 200) - %4 = sext i32 %rintb52.i to i64 - %5 = sext i32 %rint47.i to i64 - tail call void @print_int(ptr nonnull @res_rint2.F0335598.0, i64 14, i64 %5) - tail call void @print_float(ptr nonnull @res_rfloat2.4DAB941F.0, i64 18, double %rfloat49.i) - tail call void @print_int(ptr nonnull @res_rint_bnd2.169DE399.0, i64 18, i64 %4) - %6 = tail call i64 @teardown() - ret i64 %6 + tail call void @setup(i64 %0), !dbg !37 + tail call void @"__hugr__.__main__.rng..main.1"(), !dbg !37 + %1 = tail call i64 @teardown(), !dbg !37 + ret i64 %1, !dbg !37 } declare void @setup(i64) local_unnamed_addr declare i64 @teardown() local_unnamed_addr -!name = !{!0} +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} +!name = !{!3} -!0 = !{!"mainlib"} +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v0.32.0)-v0.21.11", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "file:///Users/george.hodgkins/proj/clone-anduril") +!3 = !{!"mainlib"} +!4 = distinct !DISubprogram(name: "rng..main", linkageName: "__hugr__.__main__.rng..main.1", scope: null, file: !5, line: 202, type: !6, scopeLine: 203, spFlags: DISPFlagDefinition, unit: !1) +!5 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "") +!6 = !DISubroutineType(types: !7) +!7 = !{null} +!8 = !DILocation(line: 44, column: 15, scope: !9, inlinedAt: !16) +!9 = distinct !DISubprogram(name: "std.qsystem.random.RNG.__new__", linkageName: "__hugr__.guppylang.std.qsystem.random.RNG.__new__.72", scope: null, file: !10, line: 42, type: !11, scopeLine: 44, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!10 = !DIFile(filename: "/Users/george.hodgkins/proj/clone-anduril/.venv/lib/python3.10/site-packages/guppylang/std/qsystem/random.py", directory: "") +!11 = !DISubroutineType(types: !12) +!12 = !{!13, !15} +!13 = !DICompositeType(tag: DW_TAG_structure_type, name: "{}", file: !2, align: 8, elements: !14) +!14 = !{} +!15 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!16 = distinct !DILocation(line: 203, column: 14, scope: !4) +!17 = !DILocation(line: 204, column: 15, scope: !4) +!18 = !DILocation(line: 205, column: 16, scope: !4) +!19 = !DILocation(line: 206, column: 17, scope: !4) +!20 = !DILocation(line: 207, column: 19, scope: !4) +!21 = !DILocation(line: 209, column: 8, scope: !4) +!22 = !DILocation(line: 210, column: 8, scope: !4) +!23 = !DILocation(line: 211, column: 8, scope: !4) +!24 = !DILocation(line: 212, column: 8, scope: !4) +!25 = !DILocation(line: 44, column: 15, scope: !9, inlinedAt: !26) +!26 = distinct !DILocation(line: 213, column: 14, scope: !4) +!27 = !DILocation(line: 214, column: 15, scope: !4) +!28 = !DILocation(line: 215, column: 17, scope: !4) +!29 = !DILocation(line: 216, column: 19, scope: !4) +!30 = !DILocation(line: 218, column: 8, scope: !4) +!31 = !DILocation(line: 219, column: 8, scope: !4) +!32 = !DILocation(line: 220, column: 8, scope: !4) +!33 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !34, type: !35, spFlags: DISPFlagDefinition, unit: !1) +!34 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") +!35 = !DISubroutineType(types: !36) +!36 = !{!15, !15} +!37 = !DILocation(line: 0, scope: !33) diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-rus/rus_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-rus/rus_x86_64-unknown-linux-gnu index ed9940c71..012e3c910 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-rus/rus_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-rus/rus_x86_64-unknown-linux-gnu @@ -6,6 +6,93 @@ target triple = "x86_64-unknown-linux-gnu" @res_result.457DE32D.0 = private constant [17 x i8] c"\10USER:BOOL:result" @"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." +define void @"__hugr__.__main__.rus..main.1"() local_unnamed_addr !dbg !4 { +alloca_block: + %qalloc.i = tail call i64 @___qalloc(), !dbg !8 + %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 + br i1 %not_max.not.not.i, label %cond_87_case_0.i, label %__hugr__.__tk2_qalloc.83.exit, !dbg !8 + +cond_87_case_0.i: ; preds = %alloca_block + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + unreachable, !dbg !8 + +__hugr__.__tk2_qalloc.83.exit: ; preds = %alloca_block + tail call void @___reset(i64 %qalloc.i), !dbg !8 + %qalloc.i132.i = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i133.i = icmp eq i64 %qalloc.i132.i, -1, !dbg !9 + br i1 %not_max.not.not.i133.i, label %cond_101_case_0.i.i, label %__hugr__.__tk2_qalloc.97.exit.i, !dbg !9 + +cond_101_case_0.i.i: ; preds = %cond_242_case_1.backedge.i, %__hugr__.__tk2_qalloc.83.exit + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 + unreachable, !dbg !9 + +__hugr__.__tk2_qalloc.97.exit.i: ; preds = %__hugr__.__tk2_qalloc.83.exit, %cond_242_case_1.backedge.i + %qalloc.i134.i = phi i64 [ %qalloc.i.i, %cond_242_case_1.backedge.i ], [ %qalloc.i132.i, %__hugr__.__tk2_qalloc.83.exit ] + tail call void @___reset(i64 %qalloc.i134.i), !dbg !9 + %qalloc.i128.i = tail call i64 @___qalloc(), !dbg !15 + %not_max.not.not.i129.i = icmp eq i64 %qalloc.i128.i, -1, !dbg !15 + br i1 %not_max.not.not.i129.i, label %cond_115_case_0.i.i, label %__hugr__.__tk2_qalloc.111.exit.i, !dbg !15 + +cond_115_case_0.i.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !15 + unreachable, !dbg !15 + +__hugr__.__tk2_qalloc.111.exit.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i + tail call void @___reset(i64 %qalloc.i128.i), !dbg !15 + tail call void @___rxy(i64 %qalloc.i128.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !16 + tail call void @___rz(i64 %qalloc.i128.i, double 0x400921FB54442D18), !dbg !16 + tail call void @___rxy(i64 %qalloc.i134.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !17 + tail call void @___rz(i64 %qalloc.i134.i, double 0x400921FB54442D18), !dbg !17 + tail call void @___rz(i64 %qalloc.i134.i, double 0xBFE921FB54442D18), !dbg !18 + tail call void @___rxy(i64 %qalloc.i134.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18), !dbg !19 + tail call void @___rzz(i64 %qalloc.i128.i, i64 %qalloc.i134.i, double 0x3FF921FB54442D18), !dbg !19 + tail call void @___rz(i64 %qalloc.i128.i, double 0xBFF921FB54442D18), !dbg !19 + tail call void @___rxy(i64 %qalloc.i134.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18), !dbg !19 + tail call void @___rz(i64 %qalloc.i134.i, double 0xBFF921FB54442D18), !dbg !19 + tail call void @___rz(i64 %qalloc.i134.i, double 0x3FE921FB54442D18), !dbg !20 + %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i134.i) + tail call void @___qfree(i64 %qalloc.i134.i) + %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) + tail call void @___dec_future_refcount(i64 %lazy_measure.i) + br i1 %read_bool.i, label %cond_256_case_1.i, label %0 + +0: ; preds = %__hugr__.__tk2_qalloc.111.exit.i + tail call void @___qfree(i64 %qalloc.i128.i), !dbg !21 + br label %cond_242_case_1.backedge.i + +cond_242_case_1.backedge.i: ; preds = %1, %0 + %qalloc.i.i = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1, !dbg !9 + br i1 %not_max.not.not.i.i, label %cond_101_case_0.i.i, label %__hugr__.__tk2_qalloc.97.exit.i, !dbg !9 + +cond_256_case_1.i: ; preds = %__hugr__.__tk2_qalloc.111.exit.i + tail call void @___rz(i64 %qalloc.i, double 0x3FE921FB54442D18), !dbg !22 + tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !23 + tail call void @___rxy(i64 %qalloc.i128.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18), !dbg !24 + tail call void @___rzz(i64 %qalloc.i, i64 %qalloc.i128.i, double 0x3FF921FB54442D18), !dbg !24 + tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18), !dbg !24 + tail call void @___rxy(i64 %qalloc.i128.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18), !dbg !24 + tail call void @___rz(i64 %qalloc.i128.i, double 0xBFF921FB54442D18), !dbg !24 + tail call void @___rz(i64 %qalloc.i128.i, double 0x3FE921FB54442D18), !dbg !25 + %lazy_measure67.i = tail call i64 @___lazy_measure(i64 %qalloc.i128.i) + tail call void @___qfree(i64 %qalloc.i128.i) + %read_bool80.i = tail call i1 @___read_future_bool(i64 %lazy_measure67.i) + tail call void @___dec_future_refcount(i64 %lazy_measure67.i) + br i1 %read_bool80.i, label %"__hugr__.__main__.rus..rus.17.exit", label %1 + +1: ; preds = %cond_256_case_1.i + tail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00), !dbg !26 + br label %cond_242_case_1.backedge.i + +"__hugr__.__main__.rus..rus.17.exit": ; preds = %cond_256_case_1.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) + tail call void @print_bool(ptr nonnull @res_result.457DE32D.0, i64 16, i1 %read_bool), !dbg !27 + ret void +} + declare i64 @___lazy_measure(i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -29,93 +116,12 @@ 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 { +define i64 @qmain(i64 %0) local_unnamed_addr !dbg !28 { entry: - tail call void @setup(i64 %0) - %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.not.i.i, label %cond_87_case_0.i.i, label %__hugr__.__tk2_qalloc.83.exit.i - -cond_87_case_0.i.i: ; preds = %entry - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_qalloc.83.exit.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - %qalloc.i132.i.i = tail call i64 @___qalloc() - %not_max.not.not.i133.i.i = icmp eq i64 %qalloc.i132.i.i, -1 - br i1 %not_max.not.not.i133.i.i, label %cond_101_case_0.i.i.i, label %__hugr__.__tk2_qalloc.97.exit.i.i - -cond_101_case_0.i.i.i: ; preds = %cond_242_case_1.backedge.i.i, %__hugr__.__tk2_qalloc.83.exit.i - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_qalloc.97.exit.i.i: ; preds = %__hugr__.__tk2_qalloc.83.exit.i, %cond_242_case_1.backedge.i.i - %qalloc.i134.i.i = phi i64 [ %qalloc.i.i.i, %cond_242_case_1.backedge.i.i ], [ %qalloc.i132.i.i, %__hugr__.__tk2_qalloc.83.exit.i ] - tail call void @___reset(i64 %qalloc.i134.i.i) - %qalloc.i128.i.i = tail call i64 @___qalloc() - %not_max.not.not.i129.i.i = icmp eq i64 %qalloc.i128.i.i, -1 - br i1 %not_max.not.not.i129.i.i, label %cond_115_case_0.i.i.i, label %__hugr__.__tk2_qalloc.111.exit.i.i - -cond_115_case_0.i.i.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i.i - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_qalloc.111.exit.i.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i.i - tail call void @___reset(i64 %qalloc.i128.i.i) - tail call void @___rxy(i64 %qalloc.i128.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i128.i.i, double 0x400921FB54442D18) - tail call void @___rxy(i64 %qalloc.i134.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i134.i.i, double 0x400921FB54442D18) - tail call void @___rz(i64 %qalloc.i134.i.i, double 0xBFE921FB54442D18) - tail call void @___rxy(i64 %qalloc.i134.i.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rzz(i64 %qalloc.i128.i.i, i64 %qalloc.i134.i.i, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i128.i.i, double 0xBFF921FB54442D18) - tail call void @___rxy(i64 %qalloc.i134.i.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18) - tail call void @___rz(i64 %qalloc.i134.i.i, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i134.i.i, double 0x3FE921FB54442D18) - %lazy_measure.i.i = tail call i64 @___lazy_measure(i64 %qalloc.i134.i.i) - tail call void @___qfree(i64 %qalloc.i134.i.i) - %read_bool.i.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i.i) - tail call void @___dec_future_refcount(i64 %lazy_measure.i.i) - br i1 %read_bool.i.i, label %cond_256_case_1.i.i, label %1 - -1: ; preds = %__hugr__.__tk2_qalloc.111.exit.i.i - tail call void @___qfree(i64 %qalloc.i128.i.i) - br label %cond_242_case_1.backedge.i.i - -cond_242_case_1.backedge.i.i: ; preds = %2, %1 - %qalloc.i.i.i = tail call i64 @___qalloc() - %not_max.not.not.i.i.i = icmp eq i64 %qalloc.i.i.i, -1 - br i1 %not_max.not.not.i.i.i, label %cond_101_case_0.i.i.i, label %__hugr__.__tk2_qalloc.97.exit.i.i - -cond_256_case_1.i.i: ; preds = %__hugr__.__tk2_qalloc.111.exit.i.i - tail call void @___rz(i64 %qalloc.i.i, double 0x3FE921FB54442D18) - tail call void @___rz(i64 %qalloc.i.i, double 0x400921FB54442D18) - tail call void @___rxy(i64 %qalloc.i128.i.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rzz(i64 %qalloc.i.i, i64 %qalloc.i128.i.i, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i.i, double 0xBFF921FB54442D18) - tail call void @___rxy(i64 %qalloc.i128.i.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18) - tail call void @___rz(i64 %qalloc.i128.i.i, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i128.i.i, double 0x3FE921FB54442D18) - %lazy_measure67.i.i = tail call i64 @___lazy_measure(i64 %qalloc.i128.i.i) - tail call void @___qfree(i64 %qalloc.i128.i.i) - %read_bool80.i.i = tail call i1 @___read_future_bool(i64 %lazy_measure67.i.i) - tail call void @___dec_future_refcount(i64 %lazy_measure67.i.i) - br i1 %read_bool80.i.i, label %__hugr__.main.1.exit, label %2 - -2: ; preds = %cond_256_case_1.i.i - tail call void @___rxy(i64 %qalloc.i.i, double 0x400921FB54442D18, double 0.000000e+00) - br label %cond_242_case_1.backedge.i.i - -__hugr__.main.1.exit: ; preds = %cond_256_case_1.i.i - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i.i) - tail call void @___qfree(i64 %qalloc.i.i) - %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) - tail call void @___dec_future_refcount(i64 %lazy_measure.i) - tail call void @print_bool(ptr nonnull @res_result.457DE32D.0, i64 16, i1 %read_bool.i) - %3 = tail call i64 @teardown() - ret i64 %3 + tail call void @setup(i64 %0), !dbg !30 + tail call void @"__hugr__.__main__.rus..main.1"(), !dbg !30 + %1 = tail call i64 @teardown(), !dbg !30 + ret i64 %1, !dbg !30 } declare void @setup(i64) local_unnamed_addr @@ -124,6 +130,38 @@ declare i64 @teardown() local_unnamed_addr attributes #0 = { noreturn } -!name = !{!0} - -!0 = !{!"mainlib"} +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} +!name = !{!3} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v0.32.0)-v0.21.11", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "file:///Users/george.hodgkins/proj/clone-anduril") +!3 = !{!"mainlib"} +!4 = distinct !DISubprogram(name: "rus..main", linkageName: "__hugr__.__main__.rus..main.1", scope: null, file: !5, line: 184, type: !6, scopeLine: 185, spFlags: DISPFlagDefinition, unit: !1) +!5 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "") +!6 = !DISubroutineType(types: !7) +!7 = !{null} +!8 = !DILocation(line: 185, column: 12, scope: !4) +!9 = !DILocation(line: 160, column: 19, scope: !10, inlinedAt: !14) +!10 = distinct !DISubprogram(name: "rus..rus", linkageName: "__hugr__.__main__.rus..rus.17", scope: null, file: !5, line: 157, type: !11, scopeLine: 158, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!11 = !DISubroutineType(types: !12) +!12 = !{!13, !13} +!13 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!14 = distinct !DILocation(line: 186, column: 8, scope: !4) +!15 = !DILocation(line: 160, column: 28, scope: !10, inlinedAt: !14) +!16 = !DILocation(line: 162, column: 12, scope: !10, inlinedAt: !14) +!17 = !DILocation(line: 161, column: 12, scope: !10, inlinedAt: !14) +!18 = !DILocation(line: 164, column: 12, scope: !10, inlinedAt: !14) +!19 = !DILocation(line: 165, column: 12, scope: !10, inlinedAt: !14) +!20 = !DILocation(line: 166, column: 12, scope: !10, inlinedAt: !14) +!21 = !DILocation(line: 169, column: 16, scope: !10, inlinedAt: !14) +!22 = !DILocation(line: 172, column: 12, scope: !10, inlinedAt: !14) +!23 = !DILocation(line: 173, column: 12, scope: !10, inlinedAt: !14) +!24 = !DILocation(line: 174, column: 12, scope: !10, inlinedAt: !14) +!25 = !DILocation(line: 175, column: 12, scope: !10, inlinedAt: !14) +!26 = !DILocation(line: 181, column: 12, scope: !10, inlinedAt: !14) +!27 = !DILocation(line: 187, column: 8, scope: !4) +!28 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !29, type: !11, spFlags: DISPFlagDefinition, unit: !1) +!29 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") +!30 = !DILocation(line: 0, scope: !28) diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-discard_qb_array/discard_qb_array_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-discard_qb_array/discard_qb_array_x86_64-windows-msvc index 12ac202e7..ab9bd24bd 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-discard_qb_array/discard_qb_array_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-discard_qb_array/discard_qb_array_x86_64-windows-msvc @@ -4,284 +4,363 @@ target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80: target triple = "x86_64-windows-msvc" @"e_Array alre.5A300C2A.0" = private constant [57 x i8] c"8EXIT:INT:Array already contains an element at this index" -@"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_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." +define void @"__hugr__.__main__.discard_qb_array..main.1"() local_unnamed_addr !dbg !4 { +alloca_block: + %0 = tail call ptr @heap_alloc(i64 80), !dbg !8 + %1 = tail call ptr @heap_alloc(i64 8), !dbg !8 + store i64 -1, ptr %1, align 1, !dbg !8 + %qalloc.i = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !9 + br i1 %not_max.not.not.i, label %cond_233_case_0.i, label %__barray_check_bounds.exit, !dbg !9 + +cond_233_case_0.i: ; preds = %cond_exit_20.8, %cond_exit_20.7, %cond_exit_20.6, %cond_exit_20.5, %cond_exit_20.4, %cond_exit_20.3, %cond_exit_20.2, %cond_exit_20.1, %cond_exit_20, %alloca_block + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 + unreachable, !dbg !9 + +__barray_check_bounds.exit: ; preds = %alloca_block + tail call void @___reset(i64 %qalloc.i), !dbg !9 + %2 = load i64, ptr %1, align 4 + %3 = trunc i64 %2 to i1 + br i1 %3, label %cond_exit_20, 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_20: ; preds = %__barray_check_bounds.exit + %4 = and i64 %2, -2 + store i64 %4, ptr %1, align 4 + store i64 %qalloc.i, ptr %0, align 4 + %qalloc.i.1 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1, !dbg !9 + br i1 %not_max.not.not.i.1, label %cond_233_case_0.i, label %__barray_check_bounds.exit.1, !dbg !9 + +__barray_check_bounds.exit.1: ; preds = %cond_exit_20 + tail call void @___reset(i64 %qalloc.i.1), !dbg !9 + %5 = load i64, ptr %1, align 4 + %6 = and i64 %5, 2 + %.not = icmp eq i64 %6, 0 + br i1 %.not, label %panic.i, label %cond_exit_20.1 + +cond_exit_20.1: ; preds = %__barray_check_bounds.exit.1 + %7 = and i64 %5, -3 + store i64 %7, ptr %1, align 4 + %8 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %qalloc.i.1, ptr %8, align 4 + %qalloc.i.2 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1, !dbg !9 + br i1 %not_max.not.not.i.2, label %cond_233_case_0.i, label %__barray_check_bounds.exit.2, !dbg !9 + +__barray_check_bounds.exit.2: ; preds = %cond_exit_20.1 + tail call void @___reset(i64 %qalloc.i.2), !dbg !9 + %9 = load i64, ptr %1, align 4 + %10 = and i64 %9, 4 + %.not108 = icmp eq i64 %10, 0 + br i1 %.not108, label %panic.i, label %cond_exit_20.2 + +cond_exit_20.2: ; preds = %__barray_check_bounds.exit.2 + %11 = and i64 %9, -5 + store i64 %11, ptr %1, align 4 + %12 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %qalloc.i.2, ptr %12, align 4 + %qalloc.i.3 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1, !dbg !9 + br i1 %not_max.not.not.i.3, label %cond_233_case_0.i, label %__barray_check_bounds.exit.3, !dbg !9 + +__barray_check_bounds.exit.3: ; preds = %cond_exit_20.2 + tail call void @___reset(i64 %qalloc.i.3), !dbg !9 + %13 = load i64, ptr %1, align 4 + %14 = and i64 %13, 8 + %.not109 = icmp eq i64 %14, 0 + br i1 %.not109, label %panic.i, label %cond_exit_20.3 + +cond_exit_20.3: ; preds = %__barray_check_bounds.exit.3 + %15 = and i64 %13, -9 + store i64 %15, ptr %1, align 4 + %16 = getelementptr inbounds nuw i8, ptr %0, i64 24 + store i64 %qalloc.i.3, ptr %16, align 4 + %qalloc.i.4 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1, !dbg !9 + br i1 %not_max.not.not.i.4, label %cond_233_case_0.i, label %__barray_check_bounds.exit.4, !dbg !9 + +__barray_check_bounds.exit.4: ; preds = %cond_exit_20.3 + tail call void @___reset(i64 %qalloc.i.4), !dbg !9 + %17 = load i64, ptr %1, align 4 + %18 = and i64 %17, 16 + %.not110 = icmp eq i64 %18, 0 + br i1 %.not110, label %panic.i, label %cond_exit_20.4 + +cond_exit_20.4: ; preds = %__barray_check_bounds.exit.4 + %19 = and i64 %17, -17 + store i64 %19, ptr %1, align 4 + %20 = getelementptr inbounds nuw i8, ptr %0, i64 32 + store i64 %qalloc.i.4, ptr %20, align 4 + %qalloc.i.5 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.5 = icmp eq i64 %qalloc.i.5, -1, !dbg !9 + br i1 %not_max.not.not.i.5, label %cond_233_case_0.i, label %__barray_check_bounds.exit.5, !dbg !9 + +__barray_check_bounds.exit.5: ; preds = %cond_exit_20.4 + tail call void @___reset(i64 %qalloc.i.5), !dbg !9 + %21 = load i64, ptr %1, align 4 + %22 = and i64 %21, 32 + %.not111 = icmp eq i64 %22, 0 + br i1 %.not111, label %panic.i, label %cond_exit_20.5 + +cond_exit_20.5: ; preds = %__barray_check_bounds.exit.5 + %23 = and i64 %21, -33 + store i64 %23, ptr %1, align 4 + %24 = getelementptr inbounds nuw i8, ptr %0, i64 40 + store i64 %qalloc.i.5, ptr %24, align 4 + %qalloc.i.6 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.6 = icmp eq i64 %qalloc.i.6, -1, !dbg !9 + br i1 %not_max.not.not.i.6, label %cond_233_case_0.i, label %__barray_check_bounds.exit.6, !dbg !9 + +__barray_check_bounds.exit.6: ; preds = %cond_exit_20.5 + tail call void @___reset(i64 %qalloc.i.6), !dbg !9 + %25 = load i64, ptr %1, align 4 + %26 = and i64 %25, 64 + %.not112 = icmp eq i64 %26, 0 + br i1 %.not112, label %panic.i, label %cond_exit_20.6 + +cond_exit_20.6: ; preds = %__barray_check_bounds.exit.6 + %27 = and i64 %25, -65 + store i64 %27, ptr %1, align 4 + %28 = getelementptr inbounds nuw i8, ptr %0, i64 48 + store i64 %qalloc.i.6, ptr %28, align 4 + %qalloc.i.7 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.7 = icmp eq i64 %qalloc.i.7, -1, !dbg !9 + br i1 %not_max.not.not.i.7, label %cond_233_case_0.i, label %__barray_check_bounds.exit.7, !dbg !9 + +__barray_check_bounds.exit.7: ; preds = %cond_exit_20.6 + tail call void @___reset(i64 %qalloc.i.7), !dbg !9 + %29 = load i64, ptr %1, align 4 + %30 = and i64 %29, 128 + %.not113 = icmp eq i64 %30, 0 + br i1 %.not113, label %panic.i, label %cond_exit_20.7 + +cond_exit_20.7: ; preds = %__barray_check_bounds.exit.7 + %31 = and i64 %29, -129 + store i64 %31, ptr %1, align 4 + %32 = getelementptr inbounds nuw i8, ptr %0, i64 56 + store i64 %qalloc.i.7, ptr %32, align 4 + %qalloc.i.8 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.8 = icmp eq i64 %qalloc.i.8, -1, !dbg !9 + br i1 %not_max.not.not.i.8, label %cond_233_case_0.i, label %__barray_check_bounds.exit.8, !dbg !9 + +__barray_check_bounds.exit.8: ; preds = %cond_exit_20.7 + tail call void @___reset(i64 %qalloc.i.8), !dbg !9 + %33 = load i64, ptr %1, align 4 + %34 = and i64 %33, 256 + %.not114 = icmp eq i64 %34, 0 + br i1 %.not114, label %panic.i, label %cond_exit_20.8 + +cond_exit_20.8: ; preds = %__barray_check_bounds.exit.8 + %35 = and i64 %33, -257 + store i64 %35, ptr %1, align 4 + %36 = getelementptr inbounds nuw i8, ptr %0, i64 64 + store i64 %qalloc.i.8, ptr %36, align 4 + %qalloc.i.9 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.9 = icmp eq i64 %qalloc.i.9, -1, !dbg !9 + br i1 %not_max.not.not.i.9, label %cond_233_case_0.i, label %__barray_check_bounds.exit.9, !dbg !9 + +__barray_check_bounds.exit.9: ; preds = %cond_exit_20.8 + tail call void @___reset(i64 %qalloc.i.9), !dbg !9 + %37 = load i64, ptr %1, align 4 + %38 = and i64 %37, 512 + %.not115 = icmp eq i64 %38, 0 + br i1 %.not115, label %panic.i, label %cond_exit_20.9 + +cond_exit_20.9: ; preds = %__barray_check_bounds.exit.9 + %39 = and i64 %37, -513 + store i64 %39, ptr %1, align 4 + %40 = getelementptr inbounds nuw i8, ptr %0, i64 72 + store i64 %qalloc.i.9, ptr %40, align 4 + %41 = load i64, ptr %1, align 4, !dbg !10 + %42 = trunc i64 %41 to i1, !dbg !10 + br i1 %42, label %cond_171_case_1.1.i, label %__barray_mask_borrow.exit.i + +cond_171_case_1.1.i: ; preds = %__barray_mask_borrow.exit.i, %cond_exit_20.9 + %43 = phi i64 [ %41, %cond_exit_20.9 ], [ %.pre.i, %__barray_mask_borrow.exit.i ], !dbg !10 + %44 = and i64 %43, 2, !dbg !10 + %.not.i = icmp eq i64 %44, 0, !dbg !10 + br i1 %.not.i, label %__barray_mask_borrow.exit.1.i, label %cond_171_case_1.2.i + +__barray_mask_borrow.exit.1.i: ; preds = %cond_171_case_1.1.i + %45 = or disjoint i64 %43, 2, !dbg !21 + store i64 %45, ptr %1, align 4, !dbg !21 + %46 = getelementptr inbounds nuw i8, ptr %0, i64 8, !dbg !23 + %47 = load i64, ptr %46, align 4, !dbg !23 + tail call void @___qfree(i64 %47), !dbg !24 + %.pre337.i = load i64, ptr %1, align 4, !dbg !10 + br label %cond_171_case_1.2.i + +cond_171_case_1.2.i: ; preds = %__barray_mask_borrow.exit.1.i, %cond_171_case_1.1.i + %48 = phi i64 [ %.pre337.i, %__barray_mask_borrow.exit.1.i ], [ %43, %cond_171_case_1.1.i ], !dbg !10 + %49 = and i64 %48, 4, !dbg !10 + %.not345.i = icmp eq i64 %49, 0, !dbg !10 + br i1 %.not345.i, label %__barray_mask_borrow.exit.2.i, label %cond_171_case_1.3.i + +__barray_mask_borrow.exit.2.i: ; preds = %cond_171_case_1.2.i + %50 = or disjoint i64 %48, 4, !dbg !21 + store i64 %50, ptr %1, align 4, !dbg !21 + %51 = getelementptr inbounds nuw i8, ptr %0, i64 16, !dbg !23 + %52 = load i64, ptr %51, align 4, !dbg !23 + tail call void @___qfree(i64 %52), !dbg !24 + %.pre338.i = load i64, ptr %1, align 4, !dbg !10 + br label %cond_171_case_1.3.i + +cond_171_case_1.3.i: ; preds = %__barray_mask_borrow.exit.2.i, %cond_171_case_1.2.i + %53 = phi i64 [ %.pre338.i, %__barray_mask_borrow.exit.2.i ], [ %48, %cond_171_case_1.2.i ], !dbg !10 + %54 = and i64 %53, 8, !dbg !10 + %.not346.i = icmp eq i64 %54, 0, !dbg !10 + br i1 %.not346.i, label %__barray_mask_borrow.exit.3.i, label %cond_171_case_1.4.i + +__barray_mask_borrow.exit.3.i: ; preds = %cond_171_case_1.3.i + %55 = or disjoint i64 %53, 8, !dbg !21 + store i64 %55, ptr %1, align 4, !dbg !21 + %56 = getelementptr inbounds nuw i8, ptr %0, i64 24, !dbg !23 + %57 = load i64, ptr %56, align 4, !dbg !23 + tail call void @___qfree(i64 %57), !dbg !24 + %.pre339.i = load i64, ptr %1, align 4, !dbg !10 + br label %cond_171_case_1.4.i + +cond_171_case_1.4.i: ; preds = %__barray_mask_borrow.exit.3.i, %cond_171_case_1.3.i + %58 = phi i64 [ %.pre339.i, %__barray_mask_borrow.exit.3.i ], [ %53, %cond_171_case_1.3.i ], !dbg !10 + %59 = and i64 %58, 16, !dbg !10 + %.not347.i = icmp eq i64 %59, 0, !dbg !10 + br i1 %.not347.i, label %__barray_mask_borrow.exit.4.i, label %cond_171_case_1.5.i + +__barray_mask_borrow.exit.4.i: ; preds = %cond_171_case_1.4.i + %60 = or disjoint i64 %58, 16, !dbg !21 + store i64 %60, ptr %1, align 4, !dbg !21 + %61 = getelementptr inbounds nuw i8, ptr %0, i64 32, !dbg !23 + %62 = load i64, ptr %61, align 4, !dbg !23 + tail call void @___qfree(i64 %62), !dbg !24 + %.pre340.i = load i64, ptr %1, align 4, !dbg !10 + br label %cond_171_case_1.5.i + +cond_171_case_1.5.i: ; preds = %__barray_mask_borrow.exit.4.i, %cond_171_case_1.4.i + %63 = phi i64 [ %.pre340.i, %__barray_mask_borrow.exit.4.i ], [ %58, %cond_171_case_1.4.i ], !dbg !10 + %64 = and i64 %63, 32, !dbg !10 + %.not348.i = icmp eq i64 %64, 0, !dbg !10 + br i1 %.not348.i, label %__barray_mask_borrow.exit.5.i, label %cond_171_case_1.6.i + +__barray_mask_borrow.exit.5.i: ; preds = %cond_171_case_1.5.i + %65 = or disjoint i64 %63, 32, !dbg !21 + store i64 %65, ptr %1, align 4, !dbg !21 + %66 = getelementptr inbounds nuw i8, ptr %0, i64 40, !dbg !23 + %67 = load i64, ptr %66, align 4, !dbg !23 + tail call void @___qfree(i64 %67), !dbg !24 + %.pre341.i = load i64, ptr %1, align 4, !dbg !10 + br label %cond_171_case_1.6.i + +cond_171_case_1.6.i: ; preds = %__barray_mask_borrow.exit.5.i, %cond_171_case_1.5.i + %68 = phi i64 [ %.pre341.i, %__barray_mask_borrow.exit.5.i ], [ %63, %cond_171_case_1.5.i ], !dbg !10 + %69 = and i64 %68, 64, !dbg !10 + %.not349.i = icmp eq i64 %69, 0, !dbg !10 + br i1 %.not349.i, label %__barray_mask_borrow.exit.6.i, label %cond_171_case_1.7.i + +__barray_mask_borrow.exit.6.i: ; preds = %cond_171_case_1.6.i + %70 = or disjoint i64 %68, 64, !dbg !21 + store i64 %70, ptr %1, align 4, !dbg !21 + %71 = getelementptr inbounds nuw i8, ptr %0, i64 48, !dbg !23 + %72 = load i64, ptr %71, align 4, !dbg !23 + tail call void @___qfree(i64 %72), !dbg !24 + %.pre342.i = load i64, ptr %1, align 4, !dbg !10 + br label %cond_171_case_1.7.i + +cond_171_case_1.7.i: ; preds = %__barray_mask_borrow.exit.6.i, %cond_171_case_1.6.i + %73 = phi i64 [ %.pre342.i, %__barray_mask_borrow.exit.6.i ], [ %68, %cond_171_case_1.6.i ], !dbg !10 + %74 = and i64 %73, 128, !dbg !10 + %.not350.i = icmp eq i64 %74, 0, !dbg !10 + br i1 %.not350.i, label %__barray_mask_borrow.exit.7.i, label %cond_171_case_1.8.i + +__barray_mask_borrow.exit.7.i: ; preds = %cond_171_case_1.7.i + %75 = or disjoint i64 %73, 128, !dbg !21 + store i64 %75, ptr %1, align 4, !dbg !21 + %76 = getelementptr inbounds nuw i8, ptr %0, i64 56, !dbg !23 + %77 = load i64, ptr %76, align 4, !dbg !23 + tail call void @___qfree(i64 %77), !dbg !24 + %.pre343.i = load i64, ptr %1, align 4, !dbg !10 + br label %cond_171_case_1.8.i + +cond_171_case_1.8.i: ; preds = %__barray_mask_borrow.exit.7.i, %cond_171_case_1.7.i + %78 = phi i64 [ %.pre343.i, %__barray_mask_borrow.exit.7.i ], [ %73, %cond_171_case_1.7.i ], !dbg !10 + %79 = and i64 %78, 256, !dbg !10 + %.not351.i = icmp eq i64 %79, 0, !dbg !10 + br i1 %.not351.i, label %__barray_mask_borrow.exit.8.i, label %__barray_check_bounds.exit.9.i + +__barray_mask_borrow.exit.8.i: ; preds = %cond_171_case_1.8.i + %80 = or disjoint i64 %78, 256, !dbg !21 + store i64 %80, ptr %1, align 4, !dbg !21 + %81 = getelementptr inbounds nuw i8, ptr %0, i64 64, !dbg !23 + %82 = load i64, ptr %81, align 4, !dbg !23 + tail call void @___qfree(i64 %82), !dbg !24 + %.pre = load i64, ptr %1, align 4, !dbg !10 + br label %__barray_check_bounds.exit.9.i + +__barray_check_bounds.exit.9.i: ; preds = %__barray_mask_borrow.exit.8.i, %cond_171_case_1.8.i + %83 = phi i64 [ %.pre, %__barray_mask_borrow.exit.8.i ], [ %78, %cond_171_case_1.8.i ], !dbg !10 + %84 = and i64 %83, 512, !dbg !10 + %.not352.i = icmp eq i64 %84, 0, !dbg !10 + br i1 %.not352.i, label %__barray_mask_borrow.exit.9.i, label %cond_exit_156.i + +__barray_mask_borrow.exit.9.i: ; preds = %__barray_check_bounds.exit.9.i + %85 = or disjoint i64 %83, 512, !dbg !21 + store i64 %85, ptr %1, align 4, !dbg !21 + %86 = getelementptr inbounds nuw i8, ptr %0, i64 72, !dbg !23 + %87 = load i64, ptr %86, align 4, !dbg !23 + tail call void @___qfree(i64 %87), !dbg !24 + %.pre344.i = load i64, ptr %1, align 4, !dbg !25 + br label %cond_exit_156.i + +cond_exit_156.i: ; preds = %__barray_mask_borrow.exit.9.i, %__barray_check_bounds.exit.9.i + %88 = phi i64 [ %.pre344.i, %__barray_mask_borrow.exit.9.i ], [ %83, %__barray_check_bounds.exit.9.i ], !dbg !25 + %89 = or i64 %88, -1024, !dbg !25 + store i64 %89, ptr %1, align 4, !dbg !25 + %90 = icmp eq i64 %89, -1, !dbg !25 + br i1 %90, label %"__hugr__.guppylang.std.quantum.discard_array$10.113.exit", label %mask_block_err.i.i, !dbg !25 + +mask_block_err.i.i: ; preds = %cond_exit_156.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0"), !dbg !25 + unreachable, !dbg !25 + +__barray_mask_borrow.exit.i: ; preds = %cond_exit_20.9 + %91 = or disjoint i64 %41, 1, !dbg !21 + store i64 %91, ptr %1, align 4, !dbg !21 + %92 = load i64, ptr %0, align 4, !dbg !23 + tail call void @___qfree(i64 %92), !dbg !24 + %.pre.i = load i64, ptr %1, align 4, !dbg !10 + br label %cond_171_case_1.1.i + +"__hugr__.guppylang.std.quantum.discard_array$10.113.exit": ; preds = %cond_exit_156.i + tail call void @heap_free(ptr nonnull %0), !dbg !27 + tail call void @heap_free(ptr nonnull %1), !dbg !27 + ret void +} + declare ptr @heap_alloc(i64) local_unnamed_addr ; Function Attrs: noreturn declare void @panic(i32, ptr) local_unnamed_addr #0 -declare void @___qfree(i64) local_unnamed_addr - declare void @heap_free(ptr) local_unnamed_addr +declare void @___qfree(i64) local_unnamed_addr + declare i64 @___qalloc() local_unnamed_addr declare void @___reset(i64) local_unnamed_addr -define i64 @qmain(i64 %0) local_unnamed_addr { +define i64 @qmain(i64 %0) local_unnamed_addr !dbg !28 { entry: - tail call void @setup(i64 %0) - %1 = tail call ptr @heap_alloc(i64 80) - %2 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %2, align 1 - %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.not.i.i, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i - -cond_213_case_0.i.i: ; preds = %cond_exit_20.i.8, %cond_exit_20.i.7, %cond_exit_20.i.6, %cond_exit_20.i.5, %cond_exit_20.i.4, %cond_exit_20.i.3, %cond_exit_20.i.2, %cond_exit_20.i.1, %cond_exit_20.i, %entry - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__barray_check_bounds.exit.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - %3 = load i64, ptr %2, align 4 - %4 = trunc i64 %3 to i1 - br i1 %4, label %cond_exit_20.i, label %panic.i.i - -panic.i.i: ; preds = %__barray_check_bounds.exit.i.9, %__barray_check_bounds.exit.i.8, %__barray_check_bounds.exit.i.7, %__barray_check_bounds.exit.i.6, %__barray_check_bounds.exit.i.5, %__barray_check_bounds.exit.i.4, %__barray_check_bounds.exit.i.3, %__barray_check_bounds.exit.i.2, %__barray_check_bounds.exit.i.1, %__barray_check_bounds.exit.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_exit_20.i: ; preds = %__barray_check_bounds.exit.i - %5 = and i64 %3, -2 - store i64 %5, ptr %2, align 4 - store i64 %qalloc.i.i, ptr %1, align 4 - %qalloc.i.i.1 = tail call i64 @___qalloc() - %not_max.not.not.i.i.1 = icmp eq i64 %qalloc.i.i.1, -1 - br i1 %not_max.not.not.i.i.1, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.1 - -__barray_check_bounds.exit.i.1: ; preds = %cond_exit_20.i - tail call void @___reset(i64 %qalloc.i.i.1) - %6 = load i64, ptr %2, align 4 - %7 = and i64 %6, 2 - %.not = icmp eq i64 %7, 0 - br i1 %.not, label %panic.i.i, label %cond_exit_20.i.1 - -cond_exit_20.i.1: ; preds = %__barray_check_bounds.exit.i.1 - %8 = and i64 %6, -3 - store i64 %8, ptr %2, align 4 - %9 = getelementptr inbounds nuw i8, ptr %1, i64 8 - store i64 %qalloc.i.i.1, ptr %9, align 4 - %qalloc.i.i.2 = tail call i64 @___qalloc() - %not_max.not.not.i.i.2 = icmp eq i64 %qalloc.i.i.2, -1 - br i1 %not_max.not.not.i.i.2, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.2 - -__barray_check_bounds.exit.i.2: ; preds = %cond_exit_20.i.1 - tail call void @___reset(i64 %qalloc.i.i.2) - %10 = load i64, ptr %2, align 4 - %11 = and i64 %10, 4 - %.not1 = icmp eq i64 %11, 0 - br i1 %.not1, label %panic.i.i, label %cond_exit_20.i.2 - -cond_exit_20.i.2: ; preds = %__barray_check_bounds.exit.i.2 - %12 = and i64 %10, -5 - store i64 %12, ptr %2, align 4 - %13 = getelementptr inbounds nuw i8, ptr %1, i64 16 - store i64 %qalloc.i.i.2, ptr %13, align 4 - %qalloc.i.i.3 = tail call i64 @___qalloc() - %not_max.not.not.i.i.3 = icmp eq i64 %qalloc.i.i.3, -1 - br i1 %not_max.not.not.i.i.3, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.3 - -__barray_check_bounds.exit.i.3: ; preds = %cond_exit_20.i.2 - tail call void @___reset(i64 %qalloc.i.i.3) - %14 = load i64, ptr %2, align 4 - %15 = and i64 %14, 8 - %.not2 = icmp eq i64 %15, 0 - br i1 %.not2, label %panic.i.i, label %cond_exit_20.i.3 - -cond_exit_20.i.3: ; preds = %__barray_check_bounds.exit.i.3 - %16 = and i64 %14, -9 - store i64 %16, ptr %2, align 4 - %17 = getelementptr inbounds nuw i8, ptr %1, i64 24 - store i64 %qalloc.i.i.3, ptr %17, align 4 - %qalloc.i.i.4 = tail call i64 @___qalloc() - %not_max.not.not.i.i.4 = icmp eq i64 %qalloc.i.i.4, -1 - br i1 %not_max.not.not.i.i.4, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.4 - -__barray_check_bounds.exit.i.4: ; preds = %cond_exit_20.i.3 - tail call void @___reset(i64 %qalloc.i.i.4) - %18 = load i64, ptr %2, align 4 - %19 = and i64 %18, 16 - %.not3 = icmp eq i64 %19, 0 - br i1 %.not3, label %panic.i.i, label %cond_exit_20.i.4 - -cond_exit_20.i.4: ; preds = %__barray_check_bounds.exit.i.4 - %20 = and i64 %18, -17 - store i64 %20, ptr %2, align 4 - %21 = getelementptr inbounds nuw i8, ptr %1, i64 32 - store i64 %qalloc.i.i.4, ptr %21, align 4 - %qalloc.i.i.5 = tail call i64 @___qalloc() - %not_max.not.not.i.i.5 = icmp eq i64 %qalloc.i.i.5, -1 - br i1 %not_max.not.not.i.i.5, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.5 - -__barray_check_bounds.exit.i.5: ; preds = %cond_exit_20.i.4 - tail call void @___reset(i64 %qalloc.i.i.5) - %22 = load i64, ptr %2, align 4 - %23 = and i64 %22, 32 - %.not4 = icmp eq i64 %23, 0 - br i1 %.not4, label %panic.i.i, label %cond_exit_20.i.5 - -cond_exit_20.i.5: ; preds = %__barray_check_bounds.exit.i.5 - %24 = and i64 %22, -33 - store i64 %24, ptr %2, align 4 - %25 = getelementptr inbounds nuw i8, ptr %1, i64 40 - store i64 %qalloc.i.i.5, ptr %25, align 4 - %qalloc.i.i.6 = tail call i64 @___qalloc() - %not_max.not.not.i.i.6 = icmp eq i64 %qalloc.i.i.6, -1 - br i1 %not_max.not.not.i.i.6, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.6 - -__barray_check_bounds.exit.i.6: ; preds = %cond_exit_20.i.5 - tail call void @___reset(i64 %qalloc.i.i.6) - %26 = load i64, ptr %2, align 4 - %27 = and i64 %26, 64 - %.not5 = icmp eq i64 %27, 0 - br i1 %.not5, label %panic.i.i, label %cond_exit_20.i.6 - -cond_exit_20.i.6: ; preds = %__barray_check_bounds.exit.i.6 - %28 = and i64 %26, -65 - store i64 %28, ptr %2, align 4 - %29 = getelementptr inbounds nuw i8, ptr %1, i64 48 - store i64 %qalloc.i.i.6, ptr %29, align 4 - %qalloc.i.i.7 = tail call i64 @___qalloc() - %not_max.not.not.i.i.7 = icmp eq i64 %qalloc.i.i.7, -1 - br i1 %not_max.not.not.i.i.7, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.7 - -__barray_check_bounds.exit.i.7: ; preds = %cond_exit_20.i.6 - tail call void @___reset(i64 %qalloc.i.i.7) - %30 = load i64, ptr %2, align 4 - %31 = and i64 %30, 128 - %.not6 = icmp eq i64 %31, 0 - br i1 %.not6, label %panic.i.i, label %cond_exit_20.i.7 - -cond_exit_20.i.7: ; preds = %__barray_check_bounds.exit.i.7 - %32 = and i64 %30, -129 - store i64 %32, ptr %2, align 4 - %33 = getelementptr inbounds nuw i8, ptr %1, i64 56 - store i64 %qalloc.i.i.7, ptr %33, align 4 - %qalloc.i.i.8 = tail call i64 @___qalloc() - %not_max.not.not.i.i.8 = icmp eq i64 %qalloc.i.i.8, -1 - br i1 %not_max.not.not.i.i.8, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.8 - -__barray_check_bounds.exit.i.8: ; preds = %cond_exit_20.i.7 - tail call void @___reset(i64 %qalloc.i.i.8) - %34 = load i64, ptr %2, align 4 - %35 = and i64 %34, 256 - %.not7 = icmp eq i64 %35, 0 - br i1 %.not7, label %panic.i.i, label %cond_exit_20.i.8 - -cond_exit_20.i.8: ; preds = %__barray_check_bounds.exit.i.8 - %36 = and i64 %34, -257 - store i64 %36, ptr %2, align 4 - %37 = getelementptr inbounds nuw i8, ptr %1, i64 64 - store i64 %qalloc.i.i.8, ptr %37, align 4 - %qalloc.i.i.9 = tail call i64 @___qalloc() - %not_max.not.not.i.i.9 = icmp eq i64 %qalloc.i.i.9, -1 - br i1 %not_max.not.not.i.i.9, label %cond_213_case_0.i.i, label %__barray_check_bounds.exit.i.9 - -__barray_check_bounds.exit.i.9: ; preds = %cond_exit_20.i.8 - tail call void @___reset(i64 %qalloc.i.i.9) - %38 = load i64, ptr %2, align 4 - %39 = and i64 %38, 512 - %.not8 = icmp eq i64 %39, 0 - br i1 %.not8, label %panic.i.i, label %cond_exit_20.i.9 - -cond_exit_20.i.9: ; preds = %__barray_check_bounds.exit.i.9 - %40 = and i64 %38, -513 - store i64 %40, ptr %2, align 4 - %41 = getelementptr inbounds nuw i8, ptr %1, i64 72 - store i64 %qalloc.i.i.9, ptr %41, align 4 - %"116.fca.0.insert.i" = insertvalue { ptr, ptr, i64 } poison, ptr %1, 0 - %"116.fca.1.insert.i" = insertvalue { ptr, ptr, i64 } %"116.fca.0.insert.i", ptr %2, 1 - %"116.fca.2.insert.i" = insertvalue { ptr, ptr, i64 } %"116.fca.1.insert.i", i64 0, 2 - %42 = insertvalue { { ptr, ptr, i64 }, i64 } poison, { ptr, ptr, i64 } %"116.fca.2.insert.i", 0 - br label %__barray_check_bounds.exit.i.i.i - -43: ; preds = %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" - %44 = lshr i64 %.fca.1.0.0.2.extract.i.i.i, 6 - %45 = getelementptr i64, ptr %.fca.1.0.0.1.extract.i.i.i, i64 %44 - %46 = load i64, ptr %45, align 4 - %47 = and i64 %.fca.1.0.0.2.extract.i.i.i, 63 - %48 = sub nuw nsw i64 64, %47 - %49 = lshr i64 -1, %48 - %50 = icmp eq i64 %47, 0 - %51 = select i1 %50, i64 0, i64 %49 - %52 = or i64 %46, %51 - store i64 %52, ptr %45, align 4 - %last_valid.i.i.i.i = add i64 %.fca.1.0.0.2.extract.i.i.i, 9 - %53 = lshr i64 %last_valid.i.i.i.i, 6 - %54 = getelementptr inbounds nuw i64, ptr %.fca.1.0.0.1.extract.i.i.i, i64 %53 - %55 = load i64, ptr %54, align 4 - %56 = and i64 %last_valid.i.i.i.i, 63 - %57 = shl nsw i64 -2, %56 - %58 = icmp eq i64 %56, 63 - %59 = select i1 %58, i64 0, i64 %57 - %60 = or i64 %55, %59 - store i64 %60, ptr %54, align 4 - %reass.sub.i.i.i.i = sub nsw i64 %53, %44 - %.not.i.i.i.i = icmp eq i64 %reass.sub.i.i.i.i, -1 - br i1 %.not.i.i.i.i, label %__hugr__.main.1.exit, label %mask_block_ok.i.i.i.i - -61: ; preds = %mask_block_ok.i.i.i.i - %62 = add nuw i64 %.02.i.i.i.i, 1 - %exitcond.not.i.i.i.i = icmp eq i64 %.02.i.i.i.i, %reass.sub.i.i.i.i - br i1 %exitcond.not.i.i.i.i, label %__hugr__.main.1.exit, label %mask_block_ok.i.i.i.i - -mask_block_ok.i.i.i.i: ; preds = %43, %61 - %.02.i.i.i.i = phi i64 [ %62, %61 ], [ 0, %43 ] - %gep.i.i.i.i = getelementptr i64, ptr %45, i64 %.02.i.i.i.i - %63 = load i64, ptr %gep.i.i.i.i, align 4 - %64 = icmp eq i64 %63, -1 - br i1 %64, label %61, label %mask_block_err.i.i.i.i - -mask_block_err.i.i.i.i: ; preds = %mask_block_ok.i.i.i.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit.i.i.i: ; preds = %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i", %cond_exit_20.i.9 - %.fca.2.extract82.i185.i.i = phi i64 [ 0, %cond_exit_20.i.9 ], [ %.fca.1.0.0.2.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %.fca.1.extract81.i184.i.i = phi ptr [ %2, %cond_exit_20.i.9 ], [ %.fca.1.0.0.1.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %.fca.0.extract80.i183.i.i = phi ptr [ %1, %cond_exit_20.i.9 ], [ %.fca.1.0.0.0.extract.i.i.i, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %"294_0.0182.i.i" = phi i64 [ 0, %cond_exit_20.i.9 ], [ %72, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %.pn181.i.i = phi { { ptr, ptr, i64 }, i64 } [ %42, %cond_exit_20.i.9 ], [ %80, %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" ] - %65 = add i64 %"294_0.0182.i.i", %.fca.2.extract82.i185.i.i - %66 = lshr i64 %65, 6 - %67 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i184.i.i, i64 %66 - %68 = load i64, ptr %67, align 4 - %69 = and i64 %65, 63 - %70 = lshr i64 %68, %69 - %71 = trunc i64 %70 to i1 - br i1 %71, label %panic.i.i.i.i, label %"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i" - -panic.i.i.i.i: ; preds = %__barray_check_bounds.exit.i.i.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -"__hugr__.$ArrayIter.__next__$$t(qubit)$n(10).302.exit.thread.i.i": ; preds = %__barray_check_bounds.exit.i.i.i - %72 = add nuw nsw i64 %"294_0.0182.i.i", 1 - %73 = shl nuw i64 1, %69 - %74 = xor i64 %73, %68 - store i64 %74, ptr %67, align 4 - %75 = getelementptr inbounds i64, ptr %.fca.0.extract80.i183.i.i, i64 %65 - %76 = load i64, ptr %75, align 4 - %.fca.1.0.0.0.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 0 - %.fca.1.0.0.1.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 1 - %.fca.1.0.0.2.extract.i.i.i = extractvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, 0, 2 - %77 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn181.i.i, i64 %72, 1 - %78 = insertvalue { { ptr, ptr, i64 }, i64 } %77, ptr %.fca.1.0.0.0.extract.i.i.i, 0, 0 - %79 = insertvalue { { ptr, ptr, i64 }, i64 } %78, ptr %.fca.1.0.0.1.extract.i.i.i, 0, 1 - %80 = insertvalue { { ptr, ptr, i64 }, i64 } %79, i64 %.fca.1.0.0.2.extract.i.i.i, 0, 2 - tail call void @___qfree(i64 %76) - %.not.i.i = icmp eq i64 %"294_0.0182.i.i", 9 - br i1 %.not.i.i, label %43, label %__barray_check_bounds.exit.i.i.i - -__hugr__.main.1.exit: ; preds = %61, %43 - tail call void @heap_free(ptr %.fca.1.0.0.0.extract.i.i.i) - tail call void @heap_free(ptr nonnull %.fca.1.0.0.1.extract.i.i.i) - %81 = tail call i64 @teardown() - ret i64 %81 + tail call void @setup(i64 %0), !dbg !32 + tail call void @"__hugr__.__main__.discard_qb_array..main.1"(), !dbg !32 + %1 = tail call i64 @teardown(), !dbg !32 + ret i64 %1, !dbg !32 } declare void @setup(i64) local_unnamed_addr @@ -290,6 +369,40 @@ declare i64 @teardown() local_unnamed_addr attributes #0 = { noreturn } -!name = !{!0} - -!0 = !{!"mainlib"} +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} +!name = !{!3} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v0.32.0)-v0.21.11", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "file:///Users/george.hodgkins/proj/clone-anduril") +!3 = !{!"mainlib"} +!4 = distinct !DISubprogram(name: "discard_qb_array..main", linkageName: "__hugr__.__main__.discard_qb_array..main.1", scope: null, file: !5, line: 92, type: !6, scopeLine: 93, spFlags: DISPFlagDefinition, unit: !1) +!5 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "") +!6 = !DISubroutineType(types: !7) +!7 = !{null} +!8 = !DILocation(line: 93, column: 13, scope: !4) +!9 = !DILocation(line: 93, column: 19, scope: !4) +!10 = !DILocation(line: 390, column: 15, scope: !11, inlinedAt: !19) +!11 = distinct !DISubprogram(name: "std.quantum.discard_array$10", linkageName: "__hugr__.guppylang.std.quantum.discard_array$10.113", scope: null, file: !12, line: 387, type: !13, scopeLine: 389, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!12 = !DIFile(filename: "/Users/george.hodgkins/proj/clone-anduril/.venv/lib/python3.10/site-packages/guppylang/std/quantum/__init__.py", directory: "") +!13 = !DISubroutineType(types: !14) +!14 = !{null, !15} +!15 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ ptr, ptr, i64 }", file: !2, size: 24, align: 8, elements: !16) +!16 = !{!17, !17, !18} +!17 = !DIBasicType(name: "ptr", size: 64, encoding: DW_ATE_address) +!18 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!19 = distinct !DILocation(line: 390, column: 15, scope: !11, inlinedAt: !20) +!20 = distinct !DILocation(line: 94, column: 8, scope: !4) +!21 = !DILocation(line: 391, column: 20, scope: !11, inlinedAt: !22) +!22 = distinct !DILocation(line: 391, column: 20, scope: !11, inlinedAt: !20) +!23 = !DILocation(line: 391, column: 20, scope: !11, inlinedAt: !20) +!24 = !DILocation(line: 391, column: 12, scope: !11, inlinedAt: !20) +!25 = !DILocation(line: 392, column: 4, scope: !11, inlinedAt: !26) +!26 = distinct !DILocation(line: 392, column: 4, scope: !11, inlinedAt: !20) +!27 = !DILocation(line: 392, column: 4, scope: !11, inlinedAt: !20) +!28 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !29, type: !30, spFlags: DISPFlagDefinition, unit: !1) +!29 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") +!30 = !DISubroutineType(types: !31) +!31 = !{!18, !18} +!32 = !DILocation(line: 0, scope: !28) diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-flip_some/flip_some_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-flip_some/flip_some_x86_64-windows-msvc index 9806d626b..2158bafd8 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-flip_some/flip_some_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-flip_some/flip_some_x86_64-windows-msvc @@ -9,6 +9,74 @@ target triple = "x86_64-windows-msvc" @res_c3.B223E16D.0 = private constant [13 x i8] c"\0CUSER:BOOL:c3" @"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." +define void @"__hugr__.__main__.flip_some..main.1"() local_unnamed_addr !dbg !4 { +alloca_block: + %qalloc.i = tail call i64 @___qalloc(), !dbg !8 + %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 + br i1 %not_max.not.not.i, label %cond_40_case_0.i, label %__hugr__.__tk2_qalloc.36.exit, !dbg !8 + +cond_40_case_0.i: ; preds = %alloca_block + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + unreachable, !dbg !8 + +__hugr__.__tk2_qalloc.36.exit: ; preds = %alloca_block + tail call void @___reset(i64 %qalloc.i), !dbg !8 + tail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00), !dbg !9 + %qalloc.i101 = tail call i64 @___qalloc(), !dbg !10 + %not_max.not.not.i102 = icmp eq i64 %qalloc.i101, -1, !dbg !10 + br i1 %not_max.not.not.i102, label %cond_54_case_0.i, label %__hugr__.__tk2_qalloc.50.exit, !dbg !10 + +cond_54_case_0.i: ; preds = %__hugr__.__tk2_qalloc.36.exit + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !10 + unreachable, !dbg !10 + +__hugr__.__tk2_qalloc.50.exit: ; preds = %__hugr__.__tk2_qalloc.36.exit + tail call void @___reset(i64 %qalloc.i101), !dbg !10 + %qalloc.i103 = tail call i64 @___qalloc(), !dbg !11 + %not_max.not.not.i104 = icmp eq i64 %qalloc.i103, -1, !dbg !11 + br i1 %not_max.not.not.i104, label %cond_68_case_0.i, label %__hugr__.__tk2_qalloc.64.exit, !dbg !11 + +cond_68_case_0.i: ; preds = %__hugr__.__tk2_qalloc.50.exit + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !11 + unreachable, !dbg !11 + +__hugr__.__tk2_qalloc.64.exit: ; preds = %__hugr__.__tk2_qalloc.50.exit + tail call void @___reset(i64 %qalloc.i103), !dbg !11 + tail call void @___rxy(i64 %qalloc.i103, double 0x400921FB54442D18, double 0.000000e+00), !dbg !12 + %qalloc.i105 = tail call i64 @___qalloc(), !dbg !13 + %not_max.not.not.i106 = icmp eq i64 %qalloc.i105, -1, !dbg !13 + br i1 %not_max.not.not.i106, label %cond_82_case_0.i, label %__hugr__.__tk2_qalloc.78.exit, !dbg !13 + +cond_82_case_0.i: ; preds = %__hugr__.__tk2_qalloc.64.exit + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !13 + unreachable, !dbg !13 + +__hugr__.__tk2_qalloc.78.exit: ; preds = %__hugr__.__tk2_qalloc.64.exit + tail call void @___reset(i64 %qalloc.i105), !dbg !13 + %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) + tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool), !dbg !14 + %lazy_measure22 = tail call i64 @___lazy_measure(i64 %qalloc.i101) + tail call void @___qfree(i64 %qalloc.i101) + %read_bool35 = 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_c1.1F7A6571.0, i64 12, i1 %read_bool35), !dbg !15 + %lazy_measure44 = tail call i64 @___lazy_measure(i64 %qalloc.i103) + tail call void @___qfree(i64 %qalloc.i103) + %read_bool57 = tail call i1 @___read_future_bool(i64 %lazy_measure44) + tail call void @___dec_future_refcount(i64 %lazy_measure44) + tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool57), !dbg !16 + tail call void @___rxy(i64 %qalloc.i105, double 0x400921FB54442D18, double 0.000000e+00), !dbg !17 + %lazy_measure67 = tail call i64 @___lazy_measure(i64 %qalloc.i105) + tail call void @___qfree(i64 %qalloc.i105) + %read_bool80 = tail call i1 @___read_future_bool(i64 %lazy_measure67) + tail call void @___dec_future_refcount(i64 %lazy_measure67) + tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool80), !dbg !18 + ret void +} + declare i64 @___lazy_measure(i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -28,74 +96,12 @@ declare void @panic(i32, ptr) local_unnamed_addr #0 declare void @___rxy(i64, double, double) local_unnamed_addr -define i64 @qmain(i64 %0) local_unnamed_addr { +define i64 @qmain(i64 %0) local_unnamed_addr !dbg !19 { entry: - tail call void @setup(i64 %0) - %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.not.i.i, label %cond_40_case_0.i.i, label %__hugr__.__tk2_qalloc.36.exit.i - -cond_40_case_0.i.i: ; preds = %entry - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_qalloc.36.exit.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - tail call void @___rxy(i64 %qalloc.i.i, double 0x400921FB54442D18, double 0.000000e+00) - %qalloc.i101.i = tail call i64 @___qalloc() - %not_max.not.not.i102.i = icmp eq i64 %qalloc.i101.i, -1 - br i1 %not_max.not.not.i102.i, label %cond_54_case_0.i.i, label %__hugr__.__tk2_qalloc.50.exit.i - -cond_54_case_0.i.i: ; preds = %__hugr__.__tk2_qalloc.36.exit.i - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_qalloc.50.exit.i: ; preds = %__hugr__.__tk2_qalloc.36.exit.i - tail call void @___reset(i64 %qalloc.i101.i) - %qalloc.i103.i = tail call i64 @___qalloc() - %not_max.not.not.i104.i = icmp eq i64 %qalloc.i103.i, -1 - br i1 %not_max.not.not.i104.i, label %cond_68_case_0.i.i, label %__hugr__.__tk2_qalloc.64.exit.i - -cond_68_case_0.i.i: ; preds = %__hugr__.__tk2_qalloc.50.exit.i - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_qalloc.64.exit.i: ; preds = %__hugr__.__tk2_qalloc.50.exit.i - tail call void @___reset(i64 %qalloc.i103.i) - tail call void @___rxy(i64 %qalloc.i103.i, double 0x400921FB54442D18, double 0.000000e+00) - %qalloc.i105.i = tail call i64 @___qalloc() - %not_max.not.not.i106.i = icmp eq i64 %qalloc.i105.i, -1 - br i1 %not_max.not.not.i106.i, label %cond_82_case_0.i.i, label %__hugr__.main.1.exit - -cond_82_case_0.i.i: ; preds = %__hugr__.__tk2_qalloc.64.exit.i - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.main.1.exit: ; preds = %__hugr__.__tk2_qalloc.64.exit.i - tail call void @___reset(i64 %qalloc.i105.i) - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i.i) - tail call void @___qfree(i64 %qalloc.i.i) - %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) - tail call void @___dec_future_refcount(i64 %lazy_measure.i) - tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool.i) - %lazy_measure22.i = tail call i64 @___lazy_measure(i64 %qalloc.i101.i) - tail call void @___qfree(i64 %qalloc.i101.i) - %read_bool35.i = tail call i1 @___read_future_bool(i64 %lazy_measure22.i) - tail call void @___dec_future_refcount(i64 %lazy_measure22.i) - tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool35.i) - %lazy_measure44.i = tail call i64 @___lazy_measure(i64 %qalloc.i103.i) - tail call void @___qfree(i64 %qalloc.i103.i) - %read_bool57.i = tail call i1 @___read_future_bool(i64 %lazy_measure44.i) - tail call void @___dec_future_refcount(i64 %lazy_measure44.i) - tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool57.i) - tail call void @___rxy(i64 %qalloc.i105.i, double 0x400921FB54442D18, double 0.000000e+00) - %lazy_measure67.i = tail call i64 @___lazy_measure(i64 %qalloc.i105.i) - tail call void @___qfree(i64 %qalloc.i105.i) - %read_bool80.i = tail call i1 @___read_future_bool(i64 %lazy_measure67.i) - tail call void @___dec_future_refcount(i64 %lazy_measure67.i) - tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool80.i) - %1 = tail call i64 @teardown() - ret i64 %1 + tail call void @setup(i64 %0), !dbg !24 + tail call void @"__hugr__.__main__.flip_some..main.1"(), !dbg !24 + %1 = tail call i64 @teardown(), !dbg !24 + ret i64 %1, !dbg !24 } declare void @setup(i64) local_unnamed_addr @@ -104,6 +110,32 @@ declare i64 @teardown() local_unnamed_addr attributes #0 = { noreturn } -!name = !{!0} - -!0 = !{!"mainlib"} +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} +!name = !{!3} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v0.32.0)-v0.21.11", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "file:///Users/george.hodgkins/proj/clone-anduril") +!3 = !{!"mainlib"} +!4 = distinct !DISubprogram(name: "flip_some..main", linkageName: "__hugr__.__main__.flip_some..main.1", scope: null, file: !5, line: 74, type: !6, scopeLine: 75, spFlags: DISPFlagDefinition, unit: !1) +!5 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "") +!6 = !DISubroutineType(types: !7) +!7 = !{null} +!8 = !DILocation(line: 75, column: 20, scope: !4) +!9 = !DILocation(line: 79, column: 8, scope: !4) +!10 = !DILocation(line: 76, column: 20, scope: !4) +!11 = !DILocation(line: 77, column: 20, scope: !4) +!12 = !DILocation(line: 80, column: 8, scope: !4) +!13 = !DILocation(line: 78, column: 20, scope: !4) +!14 = !DILocation(line: 82, column: 8, scope: !4) +!15 = !DILocation(line: 83, column: 8, scope: !4) +!16 = !DILocation(line: 84, column: 8, scope: !4) +!17 = !DILocation(line: 81, column: 8, scope: !4) +!18 = !DILocation(line: 85, column: 8, scope: !4) +!19 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !20, type: !21, spFlags: DISPFlagDefinition, unit: !1) +!20 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") +!21 = !DISubroutineType(types: !22) +!22 = !{!23, !23} +!23 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!24 = !DILocation(line: 0, scope: !19) diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-measure_qb_array/measure_qb_array_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-measure_qb_array/measure_qb_array_x86_64-windows-msvc index 3e3e75456..411bd8191 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-measure_qb_array/measure_qb_array_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-measure_qb_array/measure_qb_array_x86_64-windows-msvc @@ -8,6 +8,606 @@ target triple = "x86_64-windows-msvc" @"e_Array cont.EFA5AC45.0" = private constant [70 x i8] c"EEXIT:INT:Array contains non-borrowed elements and cannot be discarded" @"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." +define void @"__hugr__.__main__.measure_qb_array..main.1"() local_unnamed_addr !dbg !4 { +alloca_block: + %0 = tail call ptr @heap_alloc(i64 80), !dbg !8 + %1 = tail call ptr @heap_alloc(i64 8), !dbg !8 + store i64 -1, ptr %1, align 1, !dbg !8 + %qalloc.i = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !9 + br i1 %not_max.not.not.i, label %cond_299_case_0.i, label %__barray_check_bounds.exit, !dbg !9 + +cond_299_case_0.i: ; preds = %cond_exit_20.8, %cond_exit_20.7, %cond_exit_20.6, %cond_exit_20.5, %cond_exit_20.4, %cond_exit_20.3, %cond_exit_20.2, %cond_exit_20.1, %cond_exit_20, %alloca_block + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 + unreachable, !dbg !9 + +__barray_check_bounds.exit: ; preds = %alloca_block + tail call void @___reset(i64 %qalloc.i), !dbg !9 + %2 = load i64, ptr %1, align 4 + %3 = trunc i64 %2 to i1 + br i1 %3, label %cond_exit_20, 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_20: ; preds = %__barray_check_bounds.exit + %4 = and i64 %2, -2 + store i64 %4, ptr %1, align 4 + store i64 %qalloc.i, ptr %0, align 4 + %qalloc.i.1 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1, !dbg !9 + br i1 %not_max.not.not.i.1, label %cond_299_case_0.i, label %__barray_check_bounds.exit.1, !dbg !9 + +__barray_check_bounds.exit.1: ; preds = %cond_exit_20 + tail call void @___reset(i64 %qalloc.i.1), !dbg !9 + %5 = load i64, ptr %1, align 4 + %6 = and i64 %5, 2 + %.not299 = icmp eq i64 %6, 0 + br i1 %.not299, label %panic.i, label %cond_exit_20.1 + +cond_exit_20.1: ; preds = %__barray_check_bounds.exit.1 + %7 = and i64 %5, -3 + store i64 %7, ptr %1, align 4 + %8 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %qalloc.i.1, ptr %8, align 4 + %qalloc.i.2 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1, !dbg !9 + br i1 %not_max.not.not.i.2, label %cond_299_case_0.i, label %__barray_check_bounds.exit.2, !dbg !9 + +__barray_check_bounds.exit.2: ; preds = %cond_exit_20.1 + tail call void @___reset(i64 %qalloc.i.2), !dbg !9 + %9 = load i64, ptr %1, align 4 + %10 = and i64 %9, 4 + %.not300 = icmp eq i64 %10, 0 + br i1 %.not300, label %panic.i, label %cond_exit_20.2 + +cond_exit_20.2: ; preds = %__barray_check_bounds.exit.2 + %11 = and i64 %9, -5 + store i64 %11, ptr %1, align 4 + %12 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %qalloc.i.2, ptr %12, align 4 + %qalloc.i.3 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1, !dbg !9 + br i1 %not_max.not.not.i.3, label %cond_299_case_0.i, label %__barray_check_bounds.exit.3, !dbg !9 + +__barray_check_bounds.exit.3: ; preds = %cond_exit_20.2 + tail call void @___reset(i64 %qalloc.i.3), !dbg !9 + %13 = load i64, ptr %1, align 4 + %14 = and i64 %13, 8 + %.not301 = icmp eq i64 %14, 0 + br i1 %.not301, label %panic.i, label %cond_exit_20.3 + +cond_exit_20.3: ; preds = %__barray_check_bounds.exit.3 + %15 = and i64 %13, -9 + store i64 %15, ptr %1, align 4 + %16 = getelementptr inbounds nuw i8, ptr %0, i64 24 + store i64 %qalloc.i.3, ptr %16, align 4 + %qalloc.i.4 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1, !dbg !9 + br i1 %not_max.not.not.i.4, label %cond_299_case_0.i, label %__barray_check_bounds.exit.4, !dbg !9 + +__barray_check_bounds.exit.4: ; preds = %cond_exit_20.3 + tail call void @___reset(i64 %qalloc.i.4), !dbg !9 + %17 = load i64, ptr %1, align 4 + %18 = and i64 %17, 16 + %.not302 = icmp eq i64 %18, 0 + br i1 %.not302, label %panic.i, label %cond_exit_20.4 + +cond_exit_20.4: ; preds = %__barray_check_bounds.exit.4 + %19 = and i64 %17, -17 + store i64 %19, ptr %1, align 4 + %20 = getelementptr inbounds nuw i8, ptr %0, i64 32 + store i64 %qalloc.i.4, ptr %20, align 4 + %qalloc.i.5 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.5 = icmp eq i64 %qalloc.i.5, -1, !dbg !9 + br i1 %not_max.not.not.i.5, label %cond_299_case_0.i, label %__barray_check_bounds.exit.5, !dbg !9 + +__barray_check_bounds.exit.5: ; preds = %cond_exit_20.4 + tail call void @___reset(i64 %qalloc.i.5), !dbg !9 + %21 = load i64, ptr %1, align 4 + %22 = and i64 %21, 32 + %.not303 = icmp eq i64 %22, 0 + br i1 %.not303, label %panic.i, label %cond_exit_20.5 + +cond_exit_20.5: ; preds = %__barray_check_bounds.exit.5 + %23 = and i64 %21, -33 + store i64 %23, ptr %1, align 4 + %24 = getelementptr inbounds nuw i8, ptr %0, i64 40 + store i64 %qalloc.i.5, ptr %24, align 4 + %qalloc.i.6 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.6 = icmp eq i64 %qalloc.i.6, -1, !dbg !9 + br i1 %not_max.not.not.i.6, label %cond_299_case_0.i, label %__barray_check_bounds.exit.6, !dbg !9 + +__barray_check_bounds.exit.6: ; preds = %cond_exit_20.5 + tail call void @___reset(i64 %qalloc.i.6), !dbg !9 + %25 = load i64, ptr %1, align 4 + %26 = and i64 %25, 64 + %.not304 = icmp eq i64 %26, 0 + br i1 %.not304, label %panic.i, label %cond_exit_20.6 + +cond_exit_20.6: ; preds = %__barray_check_bounds.exit.6 + %27 = and i64 %25, -65 + store i64 %27, ptr %1, align 4 + %28 = getelementptr inbounds nuw i8, ptr %0, i64 48 + store i64 %qalloc.i.6, ptr %28, align 4 + %qalloc.i.7 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.7 = icmp eq i64 %qalloc.i.7, -1, !dbg !9 + br i1 %not_max.not.not.i.7, label %cond_299_case_0.i, label %__barray_check_bounds.exit.7, !dbg !9 + +__barray_check_bounds.exit.7: ; preds = %cond_exit_20.6 + tail call void @___reset(i64 %qalloc.i.7), !dbg !9 + %29 = load i64, ptr %1, align 4 + %30 = and i64 %29, 128 + %.not305 = icmp eq i64 %30, 0 + br i1 %.not305, label %panic.i, label %cond_exit_20.7 + +cond_exit_20.7: ; preds = %__barray_check_bounds.exit.7 + %31 = and i64 %29, -129 + store i64 %31, ptr %1, align 4 + %32 = getelementptr inbounds nuw i8, ptr %0, i64 56 + store i64 %qalloc.i.7, ptr %32, align 4 + %qalloc.i.8 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.8 = icmp eq i64 %qalloc.i.8, -1, !dbg !9 + br i1 %not_max.not.not.i.8, label %cond_299_case_0.i, label %__barray_check_bounds.exit.8, !dbg !9 + +__barray_check_bounds.exit.8: ; preds = %cond_exit_20.7 + tail call void @___reset(i64 %qalloc.i.8), !dbg !9 + %33 = load i64, ptr %1, align 4 + %34 = and i64 %33, 256 + %.not306 = icmp eq i64 %34, 0 + br i1 %.not306, label %panic.i, label %cond_exit_20.8 + +cond_exit_20.8: ; preds = %__barray_check_bounds.exit.8 + %35 = and i64 %33, -257 + store i64 %35, ptr %1, align 4 + %36 = getelementptr inbounds nuw i8, ptr %0, i64 64 + store i64 %qalloc.i.8, ptr %36, align 4 + %qalloc.i.9 = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.9 = icmp eq i64 %qalloc.i.9, -1, !dbg !9 + br i1 %not_max.not.not.i.9, label %cond_299_case_0.i, label %__barray_check_bounds.exit.9, !dbg !9 + +__barray_check_bounds.exit.9: ; preds = %cond_exit_20.8 + tail call void @___reset(i64 %qalloc.i.9), !dbg !9 + %37 = load i64, ptr %1, align 4 + %38 = and i64 %37, 512 + %.not307 = icmp eq i64 %38, 0 + br i1 %.not307, label %panic.i, label %cond_exit_20.9 + +cond_exit_20.9: ; preds = %__barray_check_bounds.exit.9 + %39 = and i64 %37, -513 + store i64 %39, ptr %1, align 4 + %40 = getelementptr inbounds nuw i8, ptr %0, i64 72 + store i64 %qalloc.i.9, ptr %40, align 4 + %"116.fca.0.insert" = insertvalue { ptr, ptr, i64 } poison, ptr %0, 0 + %"116.fca.1.insert" = insertvalue { ptr, ptr, i64 } %"116.fca.0.insert", ptr %1, 1 + %"116.fca.2.insert" = insertvalue { ptr, ptr, i64 } %"116.fca.1.insert", i64 0, 2 + %41 = load i64, ptr %1, align 4, !dbg !10 + %42 = trunc i64 %41 to i1, !dbg !10 + br i1 %42, label %panic.i238, label %__barray_mask_borrow.exit, !dbg !10 + +panic.i238: ; preds = %cond_exit_20.9 + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !10 + unreachable, !dbg !10 + +__barray_mask_borrow.exit: ; preds = %cond_exit_20.9 + %43 = or disjoint i64 %41, 1, !dbg !10 + store i64 %43, ptr %1, align 4, !dbg !10 + %44 = load i64, ptr %0, align 4, !dbg !12 + tail call void @___rxy(i64 %44, double 0x400921FB54442D18, double 0.000000e+00), !dbg !13 + %45 = load i64, ptr %1, align 4, !dbg !12 + %46 = trunc i64 %45 to i1, !dbg !12 + br i1 %46, label %__barray_mask_return.exit240, label %panic.i239, !dbg !12 + +panic.i239: ; preds = %__barray_mask_borrow.exit + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !12 + unreachable, !dbg !12 + +__barray_mask_return.exit240: ; preds = %__barray_mask_borrow.exit + %47 = and i64 %45, -2, !dbg !12 + store i64 %47, ptr %1, align 4, !dbg !12 + store i64 %44, ptr %0, align 4, !dbg !12 + %48 = load i64, ptr %1, align 4, !dbg !14 + %49 = and i64 %48, 4, !dbg !14 + %.not = icmp eq i64 %49, 0, !dbg !14 + br i1 %.not, label %__barray_mask_borrow.exit242, label %panic.i241, !dbg !14 + +panic.i241: ; preds = %__barray_mask_return.exit240 + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !14 + unreachable, !dbg !14 + +__barray_mask_borrow.exit242: ; preds = %__barray_mask_return.exit240 + %50 = or disjoint i64 %48, 4, !dbg !14 + store i64 %50, ptr %1, align 4, !dbg !14 + %51 = getelementptr inbounds nuw i8, ptr %0, i64 16, !dbg !16 + %52 = load i64, ptr %51, align 4, !dbg !16 + tail call void @___rxy(i64 %52, double 0x400921FB54442D18, double 0.000000e+00), !dbg !17 + %53 = load i64, ptr %1, align 4, !dbg !16 + %54 = and i64 %53, 4, !dbg !16 + %.not268 = icmp eq i64 %54, 0, !dbg !16 + br i1 %.not268, label %panic.i243, label %__barray_mask_return.exit244, !dbg !16 + +panic.i243: ; preds = %__barray_mask_borrow.exit242 + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !16 + unreachable, !dbg !16 + +__barray_mask_return.exit244: ; preds = %__barray_mask_borrow.exit242 + %55 = and i64 %53, -5, !dbg !16 + store i64 %55, ptr %1, align 4, !dbg !16 + store i64 %52, ptr %51, align 4, !dbg !16 + %56 = load i64, ptr %1, align 4, !dbg !18 + %57 = and i64 %56, 8, !dbg !18 + %.not269 = icmp eq i64 %57, 0, !dbg !18 + br i1 %.not269, label %__barray_mask_borrow.exit246, label %panic.i245, !dbg !18 + +panic.i245: ; preds = %__barray_mask_return.exit244 + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !18 + unreachable, !dbg !18 + +__barray_mask_borrow.exit246: ; preds = %__barray_mask_return.exit244 + %58 = or disjoint i64 %56, 8, !dbg !18 + store i64 %58, ptr %1, align 4, !dbg !18 + %59 = getelementptr inbounds nuw i8, ptr %0, i64 24, !dbg !20 + %60 = load i64, ptr %59, align 4, !dbg !20 + tail call void @___rxy(i64 %60, double 0x400921FB54442D18, double 0.000000e+00), !dbg !21 + %61 = load i64, ptr %1, align 4, !dbg !20 + %62 = and i64 %61, 8, !dbg !20 + %.not270 = icmp eq i64 %62, 0, !dbg !20 + br i1 %.not270, label %panic.i247, label %__barray_mask_return.exit248, !dbg !20 + +panic.i247: ; preds = %__barray_mask_borrow.exit246 + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !20 + unreachable, !dbg !20 + +__barray_mask_return.exit248: ; preds = %__barray_mask_borrow.exit246 + %63 = and i64 %61, -9, !dbg !20 + store i64 %63, ptr %1, align 4, !dbg !20 + store i64 %60, ptr %59, align 4, !dbg !20 + %64 = load i64, ptr %1, align 4, !dbg !22 + %65 = and i64 %64, 512, !dbg !22 + %.not271 = icmp eq i64 %65, 0, !dbg !22 + br i1 %.not271, label %__barray_mask_borrow.exit250, label %panic.i249, !dbg !22 + +panic.i249: ; preds = %__barray_mask_return.exit248 + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !22 + unreachable, !dbg !22 + +__barray_mask_borrow.exit250: ; preds = %__barray_mask_return.exit248 + %66 = or disjoint i64 %64, 512, !dbg !22 + store i64 %66, ptr %1, align 4, !dbg !22 + %67 = getelementptr inbounds nuw i8, ptr %0, i64 72, !dbg !24 + %68 = load i64, ptr %67, align 4, !dbg !24 + tail call void @___rxy(i64 %68, double 0x400921FB54442D18, double 0.000000e+00), !dbg !25 + %69 = load i64, ptr %1, align 4, !dbg !24 + %70 = and i64 %69, 512, !dbg !24 + %.not272 = icmp eq i64 %70, 0, !dbg !24 + br i1 %.not272, label %panic.i251, label %__barray_mask_return.exit252, !dbg !24 + +panic.i251: ; preds = %__barray_mask_borrow.exit250 + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !24 + unreachable, !dbg !24 + +__barray_mask_return.exit252: ; preds = %__barray_mask_borrow.exit250 + %71 = and i64 %69, -513, !dbg !24 + store i64 %71, ptr %1, align 4, !dbg !24 + store i64 %68, ptr %67, align 4, !dbg !24 + %72 = insertvalue { { ptr, ptr, i64 }, i64 } poison, { ptr, ptr, i64 } %"116.fca.2.insert", 0, !dbg !26 + %73 = tail call ptr @heap_alloc(i64 240), !dbg !43 + %74 = tail call ptr @heap_alloc(i64 8), !dbg !43 + store i64 -1, ptr %74, align 1, !dbg !43 + br label %__barray_check_bounds.exit.i.i + +75: ; preds = %loop_body.i + %76 = lshr i64 %.fca.2.extract82.i.i, 6, !dbg !44 + %77 = getelementptr i64, ptr %.fca.1.extract81.i.i, i64 %76, !dbg !44 + %78 = load i64, ptr %77, align 4, !dbg !44 + %79 = and i64 %.fca.2.extract82.i.i, 63, !dbg !44 + %80 = sub nuw nsw i64 64, %79, !dbg !44 + %81 = lshr i64 -1, %80, !dbg !44 + %82 = icmp eq i64 %79, 0, !dbg !44 + %83 = select i1 %82, i64 0, i64 %81, !dbg !44 + %84 = or i64 %78, %83, !dbg !44 + store i64 %84, ptr %77, align 4, !dbg !44 + %last_valid.i.i.i = add i64 %.fca.2.extract82.i.i, 9, !dbg !44 + %85 = lshr i64 %last_valid.i.i.i, 6, !dbg !44 + %86 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i.i, i64 %85, !dbg !44 + %87 = load i64, ptr %86, align 4, !dbg !44 + %88 = and i64 %last_valid.i.i.i, 63, !dbg !44 + %89 = shl nsw i64 -2, %88, !dbg !44 + %90 = icmp eq i64 %88, 63, !dbg !44 + %91 = select i1 %90, i64 0, i64 %89, !dbg !44 + %92 = or i64 %87, %91, !dbg !44 + store i64 %92, ptr %86, align 4, !dbg !44 + %reass.sub.i.i.i = sub nsw i64 %85, %76, !dbg !44 + %.not.i.i.i = icmp eq i64 %reass.sub.i.i.i, -1, !dbg !44 + br i1 %.not.i.i.i, label %"__hugr__.guppylang.std.quantum.measure_array$10.149.exit", label %mask_block_ok.i.i.i, !dbg !44 + +93: ; preds = %mask_block_ok.i.i.i + %94 = add nuw i64 %.02.i.i.i, 1, !dbg !44 + %exitcond.not.i.i.i = icmp eq i64 %.02.i.i.i, %reass.sub.i.i.i, !dbg !44 + br i1 %exitcond.not.i.i.i, label %"__hugr__.guppylang.std.quantum.measure_array$10.149.exit", label %mask_block_ok.i.i.i, !dbg !44 + +mask_block_ok.i.i.i: ; preds = %75, %93 + %.02.i.i.i = phi i64 [ %94, %93 ], [ 0, %75 ], !dbg !44 + %gep.i.i.i = getelementptr i64, ptr %77, i64 %.02.i.i.i, !dbg !44 + %95 = load i64, ptr %gep.i.i.i, align 4, !dbg !44 + %96 = icmp eq i64 %95, -1, !dbg !44 + br i1 %96, label %93, label %mask_block_err.i.i.i, !dbg !44 + +mask_block_err.i.i.i: ; preds = %mask_block_ok.i.i.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0"), !dbg !44 + unreachable, !dbg !44 + +__barray_check_bounds.exit.i.i: ; preds = %loop_body.i, %__barray_mask_return.exit252 + %.fca.2.extract82.i187.i = phi i64 [ 0, %__barray_mask_return.exit252 ], [ %.fca.2.extract82.i.i, %loop_body.i ] + %.fca.1.extract81.i186.i = phi ptr [ %1, %__barray_mask_return.exit252 ], [ %.fca.1.extract81.i.i, %loop_body.i ] + %.fca.0.extract80.i185.i = phi ptr [ %0, %__barray_mask_return.exit252 ], [ %.fca.0.extract80.i.i, %loop_body.i ] + %"163_0.sroa.15.0184.i" = phi i64 [ 0, %__barray_mask_return.exit252 ], [ %97, %loop_body.i ] + %.pn165183.i = phi { { ptr, ptr, i64 }, i64 } [ %72, %__barray_mask_return.exit252 ], [ %112, %loop_body.i ] + %97 = add nuw nsw i64 %"163_0.sroa.15.0184.i", 1, !dbg !54 + %98 = add i64 %"163_0.sroa.15.0184.i", %.fca.2.extract82.i187.i, !dbg !55 + %99 = lshr i64 %98, 6, !dbg !56 + %100 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i186.i, i64 %99, !dbg !56 + %101 = load i64, ptr %100, align 4, !dbg !56 + %102 = and i64 %98, 63, !dbg !56 + %103 = lshr i64 %101, %102, !dbg !56 + %104 = trunc i64 %103 to i1, !dbg !56 + br i1 %104, label %panic.i.i.i, label %__barray_check_bounds.exit.i, !dbg !56 + +panic.i.i.i: ; preds = %__barray_check_bounds.exit.i.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !56 + unreachable, !dbg !56 + +__barray_check_bounds.exit.i: ; preds = %__barray_check_bounds.exit.i.i + %105 = shl nuw i64 1, %102, !dbg !56 + %106 = xor i64 %105, %101, !dbg !56 + store i64 %106, ptr %100, align 4, !dbg !56 + %107 = getelementptr inbounds i64, ptr %.fca.0.extract80.i185.i, i64 %98, !dbg !55 + %108 = load i64, ptr %107, align 4, !dbg !55 + %lazy_measure.i = tail call i64 @___lazy_measure(i64 %108) + tail call void @___qfree(i64 %108) + %109 = load i64, ptr %74, align 4 + %110 = lshr i64 %109, %"163_0.sroa.15.0184.i" + %111 = trunc i64 %110 to i1 + br i1 %111, label %loop_body.i, label %panic.i.i + +panic.i.i: ; preds = %__barray_check_bounds.exit.i + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") + unreachable + +loop_body.i: ; preds = %__barray_check_bounds.exit.i + %"182_054.fca.1.insert.i" = insertvalue { i1, i64, i1 } { i1 true, i64 poison, i1 undef }, i64 %lazy_measure.i, 1 + %"182_054.fca.2.insert.i" = insertvalue { i1, i64, i1 } %"182_054.fca.1.insert.i", i1 undef, 2 + %112 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn165183.i, i64 %97, 1 + %113 = shl nuw nsw i64 1, %"163_0.sroa.15.0184.i" + %114 = xor i64 %109, %113 + store i64 %114, ptr %74, align 4 + %115 = getelementptr inbounds nuw { i1, i64, i1 }, ptr %73, i64 %"163_0.sroa.15.0184.i" + store { i1, i64, i1 } %"182_054.fca.2.insert.i", ptr %115, align 4 + %116 = extractvalue { { ptr, ptr, i64 }, i64 } %.pn165183.i, 0 + %.fca.0.extract80.i.i = extractvalue { ptr, ptr, i64 } %116, 0 + %.fca.1.extract81.i.i = extractvalue { ptr, ptr, i64 } %116, 1 + %.fca.2.extract82.i.i = extractvalue { ptr, ptr, i64 } %116, 2 + %exitcond.not.i = icmp eq i64 %97, 10, !dbg !58 + br i1 %exitcond.not.i, label %75, label %__barray_check_bounds.exit.i.i + +"__hugr__.guppylang.std.quantum.measure_array$10.149.exit": ; preds = %93, %75 + tail call void @heap_free(ptr %.fca.0.extract80.i.i), !dbg !44 + tail call void @heap_free(ptr nonnull %.fca.1.extract81.i.i), !dbg !44 + %117 = load i64, ptr %74, align 4 + %118 = trunc i64 %117 to i1 + br i1 %118, label %cond_exit_369.thread, label %__barray_mask_borrow.exit259 + +cond_exit_369: ; preds = %cond_exit_369.thread.9 + tail call void @heap_free(ptr %73) + tail call void @heap_free(ptr nonnull %74) + ret void + +mask_block_err.i: ; preds = %cond_exit_369.thread.9 + tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") + unreachable + +__barray_mask_borrow.exit259: ; preds = %"__hugr__.guppylang.std.quantum.measure_array$10.149.exit" + %119 = or disjoint i64 %117, 1, !dbg !12 + store i64 %119, ptr %74, align 4, !dbg !12 + %120 = load { i1, i64, i1 }, ptr %73, align 4 + %.fca.0.extract167 = extractvalue { i1, i64, i1 } %120, 0 + br i1 %.fca.0.extract167, label %cond_392_case_1, label %cond_exit_369.thread + +cond_exit_369.thread: ; preds = %cond_392_case_1, %__barray_mask_borrow.exit259, %"__hugr__.guppylang.std.quantum.measure_array$10.149.exit" + %121 = phi i64 [ %.pre, %cond_392_case_1 ], [ %119, %__barray_mask_borrow.exit259 ], [ %117, %"__hugr__.guppylang.std.quantum.measure_array$10.149.exit" ] + %122 = and i64 %121, 2 + %.not290 = icmp eq i64 %122, 0 + br i1 %.not290, label %__barray_mask_borrow.exit259.1, label %cond_exit_369.thread.1 + +__barray_mask_borrow.exit259.1: ; preds = %cond_exit_369.thread + %123 = or disjoint i64 %121, 2, !dbg !12 + store i64 %123, ptr %74, align 4, !dbg !12 + %124 = getelementptr inbounds nuw i8, ptr %73, i64 24 + %125 = load { i1, i64, i1 }, ptr %124, align 4 + %.fca.0.extract167.1 = extractvalue { i1, i64, i1 } %125, 0 + br i1 %.fca.0.extract167.1, label %cond_392_case_1.1, label %cond_exit_369.thread.1 + +cond_392_case_1.1: ; preds = %__barray_mask_borrow.exit259.1 + %.fca.1.extract.1 = extractvalue { i1, i64, i1 } %125, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.1) + %.pre281 = load i64, ptr %74, align 4 + br label %cond_exit_369.thread.1 + +cond_exit_369.thread.1: ; preds = %cond_392_case_1.1, %__barray_mask_borrow.exit259.1, %cond_exit_369.thread + %126 = phi i64 [ %.pre281, %cond_392_case_1.1 ], [ %123, %__barray_mask_borrow.exit259.1 ], [ %121, %cond_exit_369.thread ] + %127 = and i64 %126, 4 + %.not291 = icmp eq i64 %127, 0 + br i1 %.not291, label %__barray_mask_borrow.exit259.2, label %cond_exit_369.thread.2 + +__barray_mask_borrow.exit259.2: ; preds = %cond_exit_369.thread.1 + %128 = or disjoint i64 %126, 4, !dbg !12 + store i64 %128, ptr %74, align 4, !dbg !12 + %129 = getelementptr inbounds nuw i8, ptr %73, i64 48 + %130 = load { i1, i64, i1 }, ptr %129, align 4 + %.fca.0.extract167.2 = extractvalue { i1, i64, i1 } %130, 0 + br i1 %.fca.0.extract167.2, label %cond_392_case_1.2, label %cond_exit_369.thread.2 + +cond_392_case_1.2: ; preds = %__barray_mask_borrow.exit259.2 + %.fca.1.extract.2 = extractvalue { i1, i64, i1 } %130, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.2) + %.pre282 = load i64, ptr %74, align 4 + br label %cond_exit_369.thread.2 + +cond_exit_369.thread.2: ; preds = %cond_392_case_1.2, %__barray_mask_borrow.exit259.2, %cond_exit_369.thread.1 + %131 = phi i64 [ %.pre282, %cond_392_case_1.2 ], [ %128, %__barray_mask_borrow.exit259.2 ], [ %126, %cond_exit_369.thread.1 ] + %132 = and i64 %131, 8 + %.not292 = icmp eq i64 %132, 0 + br i1 %.not292, label %__barray_mask_borrow.exit259.3, label %cond_exit_369.thread.3 + +__barray_mask_borrow.exit259.3: ; preds = %cond_exit_369.thread.2 + %133 = or disjoint i64 %131, 8, !dbg !12 + store i64 %133, ptr %74, align 4, !dbg !12 + %134 = getelementptr inbounds nuw i8, ptr %73, i64 72 + %135 = load { i1, i64, i1 }, ptr %134, align 4 + %.fca.0.extract167.3 = extractvalue { i1, i64, i1 } %135, 0 + br i1 %.fca.0.extract167.3, label %cond_392_case_1.3, label %cond_exit_369.thread.3 + +cond_392_case_1.3: ; preds = %__barray_mask_borrow.exit259.3 + %.fca.1.extract.3 = extractvalue { i1, i64, i1 } %135, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.3) + %.pre283 = load i64, ptr %74, align 4 + br label %cond_exit_369.thread.3 + +cond_exit_369.thread.3: ; preds = %cond_392_case_1.3, %__barray_mask_borrow.exit259.3, %cond_exit_369.thread.2 + %136 = phi i64 [ %.pre283, %cond_392_case_1.3 ], [ %133, %__barray_mask_borrow.exit259.3 ], [ %131, %cond_exit_369.thread.2 ] + %137 = and i64 %136, 16 + %.not293 = icmp eq i64 %137, 0 + br i1 %.not293, label %__barray_mask_borrow.exit259.4, label %cond_exit_369.thread.4 + +__barray_mask_borrow.exit259.4: ; preds = %cond_exit_369.thread.3 + %138 = or disjoint i64 %136, 16, !dbg !12 + store i64 %138, ptr %74, align 4, !dbg !12 + %139 = getelementptr inbounds nuw i8, ptr %73, i64 96 + %140 = load { i1, i64, i1 }, ptr %139, align 4 + %.fca.0.extract167.4 = extractvalue { i1, i64, i1 } %140, 0 + br i1 %.fca.0.extract167.4, label %cond_392_case_1.4, label %cond_exit_369.thread.4 + +cond_392_case_1.4: ; preds = %__barray_mask_borrow.exit259.4 + %.fca.1.extract.4 = extractvalue { i1, i64, i1 } %140, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.4) + %.pre284 = load i64, ptr %74, align 4 + br label %cond_exit_369.thread.4 + +cond_exit_369.thread.4: ; preds = %cond_392_case_1.4, %__barray_mask_borrow.exit259.4, %cond_exit_369.thread.3 + %141 = phi i64 [ %.pre284, %cond_392_case_1.4 ], [ %138, %__barray_mask_borrow.exit259.4 ], [ %136, %cond_exit_369.thread.3 ] + %142 = and i64 %141, 32 + %.not294 = icmp eq i64 %142, 0 + br i1 %.not294, label %__barray_mask_borrow.exit259.5, label %cond_exit_369.thread.5 + +__barray_mask_borrow.exit259.5: ; preds = %cond_exit_369.thread.4 + %143 = or disjoint i64 %141, 32, !dbg !12 + store i64 %143, ptr %74, align 4, !dbg !12 + %144 = getelementptr inbounds nuw i8, ptr %73, i64 120 + %145 = load { i1, i64, i1 }, ptr %144, align 4 + %.fca.0.extract167.5 = extractvalue { i1, i64, i1 } %145, 0 + br i1 %.fca.0.extract167.5, label %cond_392_case_1.5, label %cond_exit_369.thread.5 + +cond_392_case_1.5: ; preds = %__barray_mask_borrow.exit259.5 + %.fca.1.extract.5 = extractvalue { i1, i64, i1 } %145, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.5) + %.pre285 = load i64, ptr %74, align 4 + br label %cond_exit_369.thread.5 + +cond_exit_369.thread.5: ; preds = %cond_392_case_1.5, %__barray_mask_borrow.exit259.5, %cond_exit_369.thread.4 + %146 = phi i64 [ %.pre285, %cond_392_case_1.5 ], [ %143, %__barray_mask_borrow.exit259.5 ], [ %141, %cond_exit_369.thread.4 ] + %147 = and i64 %146, 64 + %.not295 = icmp eq i64 %147, 0 + br i1 %.not295, label %__barray_mask_borrow.exit259.6, label %cond_exit_369.thread.6 + +__barray_mask_borrow.exit259.6: ; preds = %cond_exit_369.thread.5 + %148 = or disjoint i64 %146, 64, !dbg !12 + store i64 %148, ptr %74, align 4, !dbg !12 + %149 = getelementptr inbounds nuw i8, ptr %73, i64 144 + %150 = load { i1, i64, i1 }, ptr %149, align 4 + %.fca.0.extract167.6 = extractvalue { i1, i64, i1 } %150, 0 + br i1 %.fca.0.extract167.6, label %cond_392_case_1.6, label %cond_exit_369.thread.6 + +cond_392_case_1.6: ; preds = %__barray_mask_borrow.exit259.6 + %.fca.1.extract.6 = extractvalue { i1, i64, i1 } %150, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.6) + %.pre286 = load i64, ptr %74, align 4 + br label %cond_exit_369.thread.6 + +cond_exit_369.thread.6: ; preds = %cond_392_case_1.6, %__barray_mask_borrow.exit259.6, %cond_exit_369.thread.5 + %151 = phi i64 [ %.pre286, %cond_392_case_1.6 ], [ %148, %__barray_mask_borrow.exit259.6 ], [ %146, %cond_exit_369.thread.5 ] + %152 = and i64 %151, 128 + %.not296 = icmp eq i64 %152, 0 + br i1 %.not296, label %__barray_mask_borrow.exit259.7, label %cond_exit_369.thread.7 + +__barray_mask_borrow.exit259.7: ; preds = %cond_exit_369.thread.6 + %153 = or disjoint i64 %151, 128, !dbg !12 + store i64 %153, ptr %74, align 4, !dbg !12 + %154 = getelementptr inbounds nuw i8, ptr %73, i64 168 + %155 = load { i1, i64, i1 }, ptr %154, align 4 + %.fca.0.extract167.7 = extractvalue { i1, i64, i1 } %155, 0 + br i1 %.fca.0.extract167.7, label %cond_392_case_1.7, label %cond_exit_369.thread.7 + +cond_392_case_1.7: ; preds = %__barray_mask_borrow.exit259.7 + %.fca.1.extract.7 = extractvalue { i1, i64, i1 } %155, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.7) + %.pre287 = load i64, ptr %74, align 4 + br label %cond_exit_369.thread.7 + +cond_exit_369.thread.7: ; preds = %cond_392_case_1.7, %__barray_mask_borrow.exit259.7, %cond_exit_369.thread.6 + %156 = phi i64 [ %.pre287, %cond_392_case_1.7 ], [ %153, %__barray_mask_borrow.exit259.7 ], [ %151, %cond_exit_369.thread.6 ] + %157 = and i64 %156, 256 + %.not297 = icmp eq i64 %157, 0 + br i1 %.not297, label %__barray_mask_borrow.exit259.8, label %cond_exit_369.thread.8 + +__barray_mask_borrow.exit259.8: ; preds = %cond_exit_369.thread.7 + %158 = or disjoint i64 %156, 256, !dbg !12 + store i64 %158, ptr %74, align 4, !dbg !12 + %159 = getelementptr inbounds nuw i8, ptr %73, i64 192 + %160 = load { i1, i64, i1 }, ptr %159, align 4 + %.fca.0.extract167.8 = extractvalue { i1, i64, i1 } %160, 0 + br i1 %.fca.0.extract167.8, label %cond_392_case_1.8, label %cond_exit_369.thread.8 + +cond_392_case_1.8: ; preds = %__barray_mask_borrow.exit259.8 + %.fca.1.extract.8 = extractvalue { i1, i64, i1 } %160, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.8) + %.pre288 = load i64, ptr %74, align 4 + br label %cond_exit_369.thread.8 + +cond_exit_369.thread.8: ; preds = %cond_392_case_1.8, %__barray_mask_borrow.exit259.8, %cond_exit_369.thread.7 + %161 = phi i64 [ %.pre288, %cond_392_case_1.8 ], [ %158, %__barray_mask_borrow.exit259.8 ], [ %156, %cond_exit_369.thread.7 ] + %162 = and i64 %161, 512 + %.not298 = icmp eq i64 %162, 0 + br i1 %.not298, label %__barray_mask_borrow.exit259.9, label %cond_exit_369.thread.9 + +__barray_mask_borrow.exit259.9: ; preds = %cond_exit_369.thread.8 + %163 = or disjoint i64 %161, 512, !dbg !12 + store i64 %163, ptr %74, align 4, !dbg !12 + %164 = getelementptr inbounds nuw i8, ptr %73, i64 216 + %165 = load { i1, i64, i1 }, ptr %164, align 4 + %.fca.0.extract167.9 = extractvalue { i1, i64, i1 } %165, 0 + br i1 %.fca.0.extract167.9, label %cond_392_case_1.9, label %cond_exit_369.thread.9 + +cond_392_case_1.9: ; preds = %__barray_mask_borrow.exit259.9 + %.fca.1.extract.9 = extractvalue { i1, i64, i1 } %165, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract.9) + %.pre289 = load i64, ptr %74, align 4 + br label %cond_exit_369.thread.9 + +cond_exit_369.thread.9: ; preds = %cond_392_case_1.9, %__barray_mask_borrow.exit259.9, %cond_exit_369.thread.8 + %166 = phi i64 [ %.pre289, %cond_392_case_1.9 ], [ %163, %__barray_mask_borrow.exit259.9 ], [ %161, %cond_exit_369.thread.8 ] + %167 = or i64 %166, -1024 + store i64 %167, ptr %74, align 4 + %168 = icmp eq i64 %167, -1 + br i1 %168, label %cond_exit_369, label %mask_block_err.i + +cond_392_case_1: ; preds = %__barray_mask_borrow.exit259 + %.fca.1.extract = extractvalue { i1, i64, i1 } %120, 1 + tail call void @___dec_future_refcount(i64 %.fca.1.extract) + %.pre = load i64, ptr %74, align 4 + br label %cond_exit_369.thread +} + declare ptr @heap_alloc(i64) local_unnamed_addr ; Function Attrs: noreturn @@ -27,603 +627,12 @@ declare i64 @___qalloc() local_unnamed_addr declare void @___reset(i64) local_unnamed_addr -define i64 @qmain(i64 %0) local_unnamed_addr { +define i64 @qmain(i64 %0) local_unnamed_addr !dbg !59 { entry: - tail call void @setup(i64 %0) - %1 = tail call ptr @heap_alloc(i64 80) - %2 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %2, align 1 - %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.not.i.i, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i - -cond_207_case_0.i.i: ; preds = %cond_exit_20.i.8, %cond_exit_20.i.7, %cond_exit_20.i.6, %cond_exit_20.i.5, %cond_exit_20.i.4, %cond_exit_20.i.3, %cond_exit_20.i.2, %cond_exit_20.i.1, %cond_exit_20.i, %entry - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__barray_check_bounds.exit.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - %3 = load i64, ptr %2, align 4 - %4 = trunc i64 %3 to i1 - br i1 %4, label %cond_exit_20.i, label %panic.i.i - -panic.i.i: ; preds = %__barray_check_bounds.exit.i.9, %__barray_check_bounds.exit.i.8, %__barray_check_bounds.exit.i.7, %__barray_check_bounds.exit.i.6, %__barray_check_bounds.exit.i.5, %__barray_check_bounds.exit.i.4, %__barray_check_bounds.exit.i.3, %__barray_check_bounds.exit.i.2, %__barray_check_bounds.exit.i.1, %__barray_check_bounds.exit.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -cond_exit_20.i: ; preds = %__barray_check_bounds.exit.i - %5 = and i64 %3, -2 - store i64 %5, ptr %2, align 4 - store i64 %qalloc.i.i, ptr %1, align 4 - %qalloc.i.i.1 = tail call i64 @___qalloc() - %not_max.not.not.i.i.1 = icmp eq i64 %qalloc.i.i.1, -1 - br i1 %not_max.not.not.i.i.1, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.1 - -__barray_check_bounds.exit.i.1: ; preds = %cond_exit_20.i - tail call void @___reset(i64 %qalloc.i.i.1) - %6 = load i64, ptr %2, align 4 - %7 = and i64 %6, 2 - %.not = icmp eq i64 %7, 0 - br i1 %.not, label %panic.i.i, label %cond_exit_20.i.1 - -cond_exit_20.i.1: ; preds = %__barray_check_bounds.exit.i.1 - %8 = and i64 %6, -3 - store i64 %8, ptr %2, align 4 - %9 = getelementptr inbounds nuw i8, ptr %1, i64 8 - store i64 %qalloc.i.i.1, ptr %9, align 4 - %qalloc.i.i.2 = tail call i64 @___qalloc() - %not_max.not.not.i.i.2 = icmp eq i64 %qalloc.i.i.2, -1 - br i1 %not_max.not.not.i.i.2, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.2 - -__barray_check_bounds.exit.i.2: ; preds = %cond_exit_20.i.1 - tail call void @___reset(i64 %qalloc.i.i.2) - %10 = load i64, ptr %2, align 4 - %11 = and i64 %10, 4 - %.not1 = icmp eq i64 %11, 0 - br i1 %.not1, label %panic.i.i, label %cond_exit_20.i.2 - -cond_exit_20.i.2: ; preds = %__barray_check_bounds.exit.i.2 - %12 = and i64 %10, -5 - store i64 %12, ptr %2, align 4 - %13 = getelementptr inbounds nuw i8, ptr %1, i64 16 - store i64 %qalloc.i.i.2, ptr %13, align 4 - %qalloc.i.i.3 = tail call i64 @___qalloc() - %not_max.not.not.i.i.3 = icmp eq i64 %qalloc.i.i.3, -1 - br i1 %not_max.not.not.i.i.3, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.3 - -__barray_check_bounds.exit.i.3: ; preds = %cond_exit_20.i.2 - tail call void @___reset(i64 %qalloc.i.i.3) - %14 = load i64, ptr %2, align 4 - %15 = and i64 %14, 8 - %.not2 = icmp eq i64 %15, 0 - br i1 %.not2, label %panic.i.i, label %cond_exit_20.i.3 - -cond_exit_20.i.3: ; preds = %__barray_check_bounds.exit.i.3 - %16 = and i64 %14, -9 - store i64 %16, ptr %2, align 4 - %17 = getelementptr inbounds nuw i8, ptr %1, i64 24 - store i64 %qalloc.i.i.3, ptr %17, align 4 - %qalloc.i.i.4 = tail call i64 @___qalloc() - %not_max.not.not.i.i.4 = icmp eq i64 %qalloc.i.i.4, -1 - br i1 %not_max.not.not.i.i.4, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.4 - -__barray_check_bounds.exit.i.4: ; preds = %cond_exit_20.i.3 - tail call void @___reset(i64 %qalloc.i.i.4) - %18 = load i64, ptr %2, align 4 - %19 = and i64 %18, 16 - %.not3 = icmp eq i64 %19, 0 - br i1 %.not3, label %panic.i.i, label %cond_exit_20.i.4 - -cond_exit_20.i.4: ; preds = %__barray_check_bounds.exit.i.4 - %20 = and i64 %18, -17 - store i64 %20, ptr %2, align 4 - %21 = getelementptr inbounds nuw i8, ptr %1, i64 32 - store i64 %qalloc.i.i.4, ptr %21, align 4 - %qalloc.i.i.5 = tail call i64 @___qalloc() - %not_max.not.not.i.i.5 = icmp eq i64 %qalloc.i.i.5, -1 - br i1 %not_max.not.not.i.i.5, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.5 - -__barray_check_bounds.exit.i.5: ; preds = %cond_exit_20.i.4 - tail call void @___reset(i64 %qalloc.i.i.5) - %22 = load i64, ptr %2, align 4 - %23 = and i64 %22, 32 - %.not4 = icmp eq i64 %23, 0 - br i1 %.not4, label %panic.i.i, label %cond_exit_20.i.5 - -cond_exit_20.i.5: ; preds = %__barray_check_bounds.exit.i.5 - %24 = and i64 %22, -33 - store i64 %24, ptr %2, align 4 - %25 = getelementptr inbounds nuw i8, ptr %1, i64 40 - store i64 %qalloc.i.i.5, ptr %25, align 4 - %qalloc.i.i.6 = tail call i64 @___qalloc() - %not_max.not.not.i.i.6 = icmp eq i64 %qalloc.i.i.6, -1 - br i1 %not_max.not.not.i.i.6, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.6 - -__barray_check_bounds.exit.i.6: ; preds = %cond_exit_20.i.5 - tail call void @___reset(i64 %qalloc.i.i.6) - %26 = load i64, ptr %2, align 4 - %27 = and i64 %26, 64 - %.not5 = icmp eq i64 %27, 0 - br i1 %.not5, label %panic.i.i, label %cond_exit_20.i.6 - -cond_exit_20.i.6: ; preds = %__barray_check_bounds.exit.i.6 - %28 = and i64 %26, -65 - store i64 %28, ptr %2, align 4 - %29 = getelementptr inbounds nuw i8, ptr %1, i64 48 - store i64 %qalloc.i.i.6, ptr %29, align 4 - %qalloc.i.i.7 = tail call i64 @___qalloc() - %not_max.not.not.i.i.7 = icmp eq i64 %qalloc.i.i.7, -1 - br i1 %not_max.not.not.i.i.7, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.7 - -__barray_check_bounds.exit.i.7: ; preds = %cond_exit_20.i.6 - tail call void @___reset(i64 %qalloc.i.i.7) - %30 = load i64, ptr %2, align 4 - %31 = and i64 %30, 128 - %.not6 = icmp eq i64 %31, 0 - br i1 %.not6, label %panic.i.i, label %cond_exit_20.i.7 - -cond_exit_20.i.7: ; preds = %__barray_check_bounds.exit.i.7 - %32 = and i64 %30, -129 - store i64 %32, ptr %2, align 4 - %33 = getelementptr inbounds nuw i8, ptr %1, i64 56 - store i64 %qalloc.i.i.7, ptr %33, align 4 - %qalloc.i.i.8 = tail call i64 @___qalloc() - %not_max.not.not.i.i.8 = icmp eq i64 %qalloc.i.i.8, -1 - br i1 %not_max.not.not.i.i.8, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.8 - -__barray_check_bounds.exit.i.8: ; preds = %cond_exit_20.i.7 - tail call void @___reset(i64 %qalloc.i.i.8) - %34 = load i64, ptr %2, align 4 - %35 = and i64 %34, 256 - %.not7 = icmp eq i64 %35, 0 - br i1 %.not7, label %panic.i.i, label %cond_exit_20.i.8 - -cond_exit_20.i.8: ; preds = %__barray_check_bounds.exit.i.8 - %36 = and i64 %34, -257 - store i64 %36, ptr %2, align 4 - %37 = getelementptr inbounds nuw i8, ptr %1, i64 64 - store i64 %qalloc.i.i.8, ptr %37, align 4 - %qalloc.i.i.9 = tail call i64 @___qalloc() - %not_max.not.not.i.i.9 = icmp eq i64 %qalloc.i.i.9, -1 - br i1 %not_max.not.not.i.i.9, label %cond_207_case_0.i.i, label %__barray_check_bounds.exit.i.9 - -__barray_check_bounds.exit.i.9: ; preds = %cond_exit_20.i.8 - tail call void @___reset(i64 %qalloc.i.i.9) - %38 = load i64, ptr %2, align 4 - %39 = and i64 %38, 512 - %.not8 = icmp eq i64 %39, 0 - br i1 %.not8, label %panic.i.i, label %cond_exit_20.i.9 - -cond_exit_20.i.9: ; preds = %__barray_check_bounds.exit.i.9 - %40 = and i64 %38, -513 - store i64 %40, ptr %2, align 4 - %41 = getelementptr inbounds nuw i8, ptr %1, i64 72 - store i64 %qalloc.i.i.9, ptr %41, align 4 - %"116.fca.0.insert.i" = insertvalue { ptr, ptr, i64 } poison, ptr %1, 0 - %"116.fca.1.insert.i" = insertvalue { ptr, ptr, i64 } %"116.fca.0.insert.i", ptr %2, 1 - %"116.fca.2.insert.i" = insertvalue { ptr, ptr, i64 } %"116.fca.1.insert.i", i64 0, 2 - %42 = load i64, ptr %2, align 4 - %43 = trunc i64 %42 to i1 - br i1 %43, label %panic.i238.i, label %__barray_mask_borrow.exit.i - -panic.i238.i: ; preds = %cond_exit_20.i.9 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit.i: ; preds = %cond_exit_20.i.9 - %44 = or disjoint i64 %42, 1 - store i64 %44, ptr %2, align 4 - %45 = load i64, ptr %1, align 4 - tail call void @___rxy(i64 %45, double 0x400921FB54442D18, double 0.000000e+00) - %46 = load i64, ptr %2, align 4 - %47 = trunc i64 %46 to i1 - br i1 %47, label %__barray_mask_return.exit240.i, label %panic.i239.i - -panic.i239.i: ; preds = %__barray_mask_borrow.exit.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit240.i: ; preds = %__barray_mask_borrow.exit.i - %48 = and i64 %46, -2 - store i64 %48, ptr %2, align 4 - store i64 %45, ptr %1, align 4 - %49 = load i64, ptr %2, align 4 - %50 = and i64 %49, 4 - %.not.i = icmp eq i64 %50, 0 - br i1 %.not.i, label %__barray_mask_borrow.exit242.i, label %panic.i241.i - -panic.i241.i: ; preds = %__barray_mask_return.exit240.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit242.i: ; preds = %__barray_mask_return.exit240.i - %51 = or disjoint i64 %49, 4 - store i64 %51, ptr %2, align 4 - %52 = load i64, ptr %13, align 4 - tail call void @___rxy(i64 %52, double 0x400921FB54442D18, double 0.000000e+00) - %53 = load i64, ptr %2, align 4 - %54 = and i64 %53, 4 - %.not268.i = icmp eq i64 %54, 0 - br i1 %.not268.i, label %panic.i243.i, label %__barray_mask_return.exit244.i - -panic.i243.i: ; preds = %__barray_mask_borrow.exit242.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit244.i: ; preds = %__barray_mask_borrow.exit242.i - %55 = and i64 %53, -5 - store i64 %55, ptr %2, align 4 - store i64 %52, ptr %13, align 4 - %56 = load i64, ptr %2, align 4 - %57 = and i64 %56, 8 - %.not269.i = icmp eq i64 %57, 0 - br i1 %.not269.i, label %__barray_mask_borrow.exit246.i, label %panic.i245.i - -panic.i245.i: ; preds = %__barray_mask_return.exit244.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit246.i: ; preds = %__barray_mask_return.exit244.i - %58 = or disjoint i64 %56, 8 - store i64 %58, ptr %2, align 4 - %59 = load i64, ptr %17, align 4 - tail call void @___rxy(i64 %59, double 0x400921FB54442D18, double 0.000000e+00) - %60 = load i64, ptr %2, align 4 - %61 = and i64 %60, 8 - %.not270.i = icmp eq i64 %61, 0 - br i1 %.not270.i, label %panic.i247.i, label %__barray_mask_return.exit248.i - -panic.i247.i: ; preds = %__barray_mask_borrow.exit246.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit248.i: ; preds = %__barray_mask_borrow.exit246.i - %62 = and i64 %60, -9 - store i64 %62, ptr %2, align 4 - store i64 %59, ptr %17, align 4 - %63 = load i64, ptr %2, align 4 - %64 = and i64 %63, 512 - %.not271.i = icmp eq i64 %64, 0 - br i1 %.not271.i, label %__barray_mask_borrow.exit250.i, label %panic.i249.i - -panic.i249.i: ; preds = %__barray_mask_return.exit248.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_mask_borrow.exit250.i: ; preds = %__barray_mask_return.exit248.i - %65 = or disjoint i64 %63, 512 - store i64 %65, ptr %2, align 4 - %66 = load i64, ptr %41, align 4 - tail call void @___rxy(i64 %66, double 0x400921FB54442D18, double 0.000000e+00) - %67 = load i64, ptr %2, align 4 - %68 = and i64 %67, 512 - %.not272.i = icmp eq i64 %68, 0 - br i1 %.not272.i, label %panic.i251.i, label %__barray_mask_return.exit252.i - -panic.i251.i: ; preds = %__barray_mask_borrow.exit250.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -__barray_mask_return.exit252.i: ; preds = %__barray_mask_borrow.exit250.i - %69 = and i64 %67, -513 - store i64 %69, ptr %2, align 4 - store i64 %66, ptr %41, align 4 - %70 = insertvalue { { ptr, ptr, i64 }, i64 } poison, { ptr, ptr, i64 } %"116.fca.2.insert.i", 0 - %71 = tail call ptr @heap_alloc(i64 240) - %72 = tail call ptr @heap_alloc(i64 8) - store i64 -1, ptr %72, align 1 - br label %__barray_check_bounds.exit.i.i.i - -73: ; preds = %loop_body.i.i - %74 = lshr i64 %.fca.2.extract82.i.i.i, 6 - %75 = getelementptr i64, ptr %.fca.1.extract81.i.i.i, i64 %74 - %76 = load i64, ptr %75, align 4 - %77 = and i64 %.fca.2.extract82.i.i.i, 63 - %78 = sub nuw nsw i64 64, %77 - %79 = lshr i64 -1, %78 - %80 = icmp eq i64 %77, 0 - %81 = select i1 %80, i64 0, i64 %79 - %82 = or i64 %76, %81 - store i64 %82, ptr %75, align 4 - %last_valid.i.i.i.i = add i64 %.fca.2.extract82.i.i.i, 9 - %83 = lshr i64 %last_valid.i.i.i.i, 6 - %84 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i.i.i, i64 %83 - %85 = load i64, ptr %84, align 4 - %86 = and i64 %last_valid.i.i.i.i, 63 - %87 = shl nsw i64 -2, %86 - %88 = icmp eq i64 %86, 63 - %89 = select i1 %88, i64 0, i64 %87 - %90 = or i64 %85, %89 - store i64 %90, ptr %84, align 4 - %reass.sub.i.i.i.i = sub nsw i64 %83, %74 - %.not.i.i.i.i = icmp eq i64 %reass.sub.i.i.i.i, -1 - br i1 %.not.i.i.i.i, label %"__hugr__.$measure_array$$n(10).280.exit.i", label %mask_block_ok.i.i.i.i - -91: ; preds = %mask_block_ok.i.i.i.i - %92 = add nuw i64 %.02.i.i.i.i, 1 - %exitcond.not.i.i.i.i = icmp eq i64 %.02.i.i.i.i, %reass.sub.i.i.i.i - br i1 %exitcond.not.i.i.i.i, label %"__hugr__.$measure_array$$n(10).280.exit.i", label %mask_block_ok.i.i.i.i - -mask_block_ok.i.i.i.i: ; preds = %73, %91 - %.02.i.i.i.i = phi i64 [ %92, %91 ], [ 0, %73 ] - %gep.i.i.i.i = getelementptr i64, ptr %75, i64 %.02.i.i.i.i - %93 = load i64, ptr %gep.i.i.i.i, align 4 - %94 = icmp eq i64 %93, -1 - br i1 %94, label %91, label %mask_block_err.i.i.i.i - -mask_block_err.i.i.i.i: ; preds = %mask_block_ok.i.i.i.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_check_bounds.exit.i.i.i: ; preds = %loop_body.i.i, %__barray_mask_return.exit252.i - %.fca.2.extract82.i187.i.i = phi i64 [ 0, %__barray_mask_return.exit252.i ], [ %.fca.2.extract82.i.i.i, %loop_body.i.i ] - %.fca.1.extract81.i186.i.i = phi ptr [ %2, %__barray_mask_return.exit252.i ], [ %.fca.1.extract81.i.i.i, %loop_body.i.i ] - %.fca.0.extract80.i185.i.i = phi ptr [ %1, %__barray_mask_return.exit252.i ], [ %.fca.0.extract80.i.i.i, %loop_body.i.i ] - %"306_0.sroa.15.0184.i.i" = phi i64 [ 0, %__barray_mask_return.exit252.i ], [ %95, %loop_body.i.i ] - %.pn165183.i.i = phi { { ptr, ptr, i64 }, i64 } [ %70, %__barray_mask_return.exit252.i ], [ %110, %loop_body.i.i ] - %95 = add nuw nsw i64 %"306_0.sroa.15.0184.i.i", 1 - %96 = add i64 %"306_0.sroa.15.0184.i.i", %.fca.2.extract82.i187.i.i - %97 = lshr i64 %96, 6 - %98 = getelementptr inbounds nuw i64, ptr %.fca.1.extract81.i186.i.i, i64 %97 - %99 = load i64, ptr %98, align 4 - %100 = and i64 %96, 63 - %101 = lshr i64 %99, %100 - %102 = trunc i64 %101 to i1 - br i1 %102, label %panic.i.i.i.i, label %__barray_check_bounds.exit.i.i - -panic.i.i.i.i: ; preds = %__barray_check_bounds.exit.i.i.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0") - unreachable - -__barray_check_bounds.exit.i.i: ; preds = %__barray_check_bounds.exit.i.i.i - %103 = shl nuw i64 1, %100 - %104 = xor i64 %103, %99 - store i64 %104, ptr %98, align 4 - %105 = getelementptr inbounds i64, ptr %.fca.0.extract80.i185.i.i, i64 %96 - %106 = load i64, ptr %105, align 4 - %lazy_measure.i.i = tail call i64 @___lazy_measure(i64 %106) - tail call void @___qfree(i64 %106) - %107 = load i64, ptr %72, align 4 - %108 = lshr i64 %107, %"306_0.sroa.15.0184.i.i" - %109 = trunc i64 %108 to i1 - br i1 %109, label %loop_body.i.i, label %panic.i.i.i - -panic.i.i.i: ; preds = %__barray_check_bounds.exit.i.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") - unreachable - -loop_body.i.i: ; preds = %__barray_check_bounds.exit.i.i - %"371_054.fca.1.insert.i.i" = insertvalue { i1, i64, i1 } { i1 true, i64 poison, i1 undef }, i64 %lazy_measure.i.i, 1 - %"371_054.fca.2.insert.i.i" = insertvalue { i1, i64, i1 } %"371_054.fca.1.insert.i.i", i1 undef, 2 - %110 = insertvalue { { ptr, ptr, i64 }, i64 } %.pn165183.i.i, i64 %95, 1 - %111 = shl nuw nsw i64 1, %"306_0.sroa.15.0184.i.i" - %112 = xor i64 %107, %111 - store i64 %112, ptr %72, align 4 - %113 = getelementptr inbounds nuw { i1, i64, i1 }, ptr %71, i64 %"306_0.sroa.15.0184.i.i" - store { i1, i64, i1 } %"371_054.fca.2.insert.i.i", ptr %113, align 4 - %114 = extractvalue { { ptr, ptr, i64 }, i64 } %.pn165183.i.i, 0 - %.fca.0.extract80.i.i.i = extractvalue { ptr, ptr, i64 } %114, 0 - %.fca.1.extract81.i.i.i = extractvalue { ptr, ptr, i64 } %114, 1 - %.fca.2.extract82.i.i.i = extractvalue { ptr, ptr, i64 } %114, 2 - %exitcond.not.i.i = icmp eq i64 %95, 10 - br i1 %exitcond.not.i.i, label %73, label %__barray_check_bounds.exit.i.i.i - -"__hugr__.$measure_array$$n(10).280.exit.i": ; preds = %91, %73 - tail call void @heap_free(ptr %.fca.0.extract80.i.i.i) - tail call void @heap_free(ptr nonnull %.fca.1.extract81.i.i.i) - %115 = load i64, ptr %72, align 4 - %116 = trunc i64 %115 to i1 - br i1 %116, label %cond_exit_89.thread.i, label %__barray_mask_borrow.exit259.i - -mask_block_err.i.i: ; preds = %cond_exit_89.thread.9.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") - unreachable - -__barray_mask_borrow.exit259.i: ; preds = %"__hugr__.$measure_array$$n(10).280.exit.i" - %117 = or disjoint i64 %115, 1 - store i64 %117, ptr %72, align 4 - %118 = load { i1, i64, i1 }, ptr %71, align 4 - %.fca.0.extract167.i = extractvalue { i1, i64, i1 } %118, 0 - br i1 %.fca.0.extract167.i, label %cond_392_case_1.i, label %cond_exit_89.thread.i - -cond_exit_89.thread.i: ; preds = %cond_392_case_1.i, %__barray_mask_borrow.exit259.i, %"__hugr__.$measure_array$$n(10).280.exit.i" - %119 = phi i64 [ %.pre.i, %cond_392_case_1.i ], [ %117, %__barray_mask_borrow.exit259.i ], [ %115, %"__hugr__.$measure_array$$n(10).280.exit.i" ] - %120 = and i64 %119, 2 - %.not290.i = icmp eq i64 %120, 0 - br i1 %.not290.i, label %__barray_mask_borrow.exit259.1.i, label %cond_exit_89.thread.1.i - -__barray_mask_borrow.exit259.1.i: ; preds = %cond_exit_89.thread.i - %121 = or disjoint i64 %119, 2 - store i64 %121, ptr %72, align 4 - %122 = getelementptr inbounds nuw i8, ptr %71, i64 24 - %123 = load { i1, i64, i1 }, ptr %122, align 4 - %.fca.0.extract167.1.i = extractvalue { i1, i64, i1 } %123, 0 - br i1 %.fca.0.extract167.1.i, label %cond_392_case_1.1.i, label %cond_exit_89.thread.1.i - -cond_392_case_1.1.i: ; preds = %__barray_mask_borrow.exit259.1.i - %.fca.1.extract.1.i = extractvalue { i1, i64, i1 } %123, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.1.i) - %.pre281.i = load i64, ptr %72, align 4 - br label %cond_exit_89.thread.1.i - -cond_exit_89.thread.1.i: ; preds = %cond_392_case_1.1.i, %__barray_mask_borrow.exit259.1.i, %cond_exit_89.thread.i - %124 = phi i64 [ %.pre281.i, %cond_392_case_1.1.i ], [ %121, %__barray_mask_borrow.exit259.1.i ], [ %119, %cond_exit_89.thread.i ] - %125 = and i64 %124, 4 - %.not291.i = icmp eq i64 %125, 0 - br i1 %.not291.i, label %__barray_mask_borrow.exit259.2.i, label %cond_exit_89.thread.2.i - -__barray_mask_borrow.exit259.2.i: ; preds = %cond_exit_89.thread.1.i - %126 = or disjoint i64 %124, 4 - store i64 %126, ptr %72, align 4 - %127 = getelementptr inbounds nuw i8, ptr %71, i64 48 - %128 = load { i1, i64, i1 }, ptr %127, align 4 - %.fca.0.extract167.2.i = extractvalue { i1, i64, i1 } %128, 0 - br i1 %.fca.0.extract167.2.i, label %cond_392_case_1.2.i, label %cond_exit_89.thread.2.i - -cond_392_case_1.2.i: ; preds = %__barray_mask_borrow.exit259.2.i - %.fca.1.extract.2.i = extractvalue { i1, i64, i1 } %128, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.2.i) - %.pre282.i = load i64, ptr %72, align 4 - br label %cond_exit_89.thread.2.i - -cond_exit_89.thread.2.i: ; preds = %cond_392_case_1.2.i, %__barray_mask_borrow.exit259.2.i, %cond_exit_89.thread.1.i - %129 = phi i64 [ %.pre282.i, %cond_392_case_1.2.i ], [ %126, %__barray_mask_borrow.exit259.2.i ], [ %124, %cond_exit_89.thread.1.i ] - %130 = and i64 %129, 8 - %.not292.i = icmp eq i64 %130, 0 - br i1 %.not292.i, label %__barray_mask_borrow.exit259.3.i, label %cond_exit_89.thread.3.i - -__barray_mask_borrow.exit259.3.i: ; preds = %cond_exit_89.thread.2.i - %131 = or disjoint i64 %129, 8 - store i64 %131, ptr %72, align 4 - %132 = getelementptr inbounds nuw i8, ptr %71, i64 72 - %133 = load { i1, i64, i1 }, ptr %132, align 4 - %.fca.0.extract167.3.i = extractvalue { i1, i64, i1 } %133, 0 - br i1 %.fca.0.extract167.3.i, label %cond_392_case_1.3.i, label %cond_exit_89.thread.3.i - -cond_392_case_1.3.i: ; preds = %__barray_mask_borrow.exit259.3.i - %.fca.1.extract.3.i = extractvalue { i1, i64, i1 } %133, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.3.i) - %.pre283.i = load i64, ptr %72, align 4 - br label %cond_exit_89.thread.3.i - -cond_exit_89.thread.3.i: ; preds = %cond_392_case_1.3.i, %__barray_mask_borrow.exit259.3.i, %cond_exit_89.thread.2.i - %134 = phi i64 [ %.pre283.i, %cond_392_case_1.3.i ], [ %131, %__barray_mask_borrow.exit259.3.i ], [ %129, %cond_exit_89.thread.2.i ] - %135 = and i64 %134, 16 - %.not293.i = icmp eq i64 %135, 0 - br i1 %.not293.i, label %__barray_mask_borrow.exit259.4.i, label %cond_exit_89.thread.4.i - -__barray_mask_borrow.exit259.4.i: ; preds = %cond_exit_89.thread.3.i - %136 = or disjoint i64 %134, 16 - store i64 %136, ptr %72, align 4 - %137 = getelementptr inbounds nuw i8, ptr %71, i64 96 - %138 = load { i1, i64, i1 }, ptr %137, align 4 - %.fca.0.extract167.4.i = extractvalue { i1, i64, i1 } %138, 0 - br i1 %.fca.0.extract167.4.i, label %cond_392_case_1.4.i, label %cond_exit_89.thread.4.i - -cond_392_case_1.4.i: ; preds = %__barray_mask_borrow.exit259.4.i - %.fca.1.extract.4.i = extractvalue { i1, i64, i1 } %138, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.4.i) - %.pre284.i = load i64, ptr %72, align 4 - br label %cond_exit_89.thread.4.i - -cond_exit_89.thread.4.i: ; preds = %cond_392_case_1.4.i, %__barray_mask_borrow.exit259.4.i, %cond_exit_89.thread.3.i - %139 = phi i64 [ %.pre284.i, %cond_392_case_1.4.i ], [ %136, %__barray_mask_borrow.exit259.4.i ], [ %134, %cond_exit_89.thread.3.i ] - %140 = and i64 %139, 32 - %.not294.i = icmp eq i64 %140, 0 - br i1 %.not294.i, label %__barray_mask_borrow.exit259.5.i, label %cond_exit_89.thread.5.i - -__barray_mask_borrow.exit259.5.i: ; preds = %cond_exit_89.thread.4.i - %141 = or disjoint i64 %139, 32 - store i64 %141, ptr %72, align 4 - %142 = getelementptr inbounds nuw i8, ptr %71, i64 120 - %143 = load { i1, i64, i1 }, ptr %142, align 4 - %.fca.0.extract167.5.i = extractvalue { i1, i64, i1 } %143, 0 - br i1 %.fca.0.extract167.5.i, label %cond_392_case_1.5.i, label %cond_exit_89.thread.5.i - -cond_392_case_1.5.i: ; preds = %__barray_mask_borrow.exit259.5.i - %.fca.1.extract.5.i = extractvalue { i1, i64, i1 } %143, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.5.i) - %.pre285.i = load i64, ptr %72, align 4 - br label %cond_exit_89.thread.5.i - -cond_exit_89.thread.5.i: ; preds = %cond_392_case_1.5.i, %__barray_mask_borrow.exit259.5.i, %cond_exit_89.thread.4.i - %144 = phi i64 [ %.pre285.i, %cond_392_case_1.5.i ], [ %141, %__barray_mask_borrow.exit259.5.i ], [ %139, %cond_exit_89.thread.4.i ] - %145 = and i64 %144, 64 - %.not295.i = icmp eq i64 %145, 0 - br i1 %.not295.i, label %__barray_mask_borrow.exit259.6.i, label %cond_exit_89.thread.6.i - -__barray_mask_borrow.exit259.6.i: ; preds = %cond_exit_89.thread.5.i - %146 = or disjoint i64 %144, 64 - store i64 %146, ptr %72, align 4 - %147 = getelementptr inbounds nuw i8, ptr %71, i64 144 - %148 = load { i1, i64, i1 }, ptr %147, align 4 - %.fca.0.extract167.6.i = extractvalue { i1, i64, i1 } %148, 0 - br i1 %.fca.0.extract167.6.i, label %cond_392_case_1.6.i, label %cond_exit_89.thread.6.i - -cond_392_case_1.6.i: ; preds = %__barray_mask_borrow.exit259.6.i - %.fca.1.extract.6.i = extractvalue { i1, i64, i1 } %148, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.6.i) - %.pre286.i = load i64, ptr %72, align 4 - br label %cond_exit_89.thread.6.i - -cond_exit_89.thread.6.i: ; preds = %cond_392_case_1.6.i, %__barray_mask_borrow.exit259.6.i, %cond_exit_89.thread.5.i - %149 = phi i64 [ %.pre286.i, %cond_392_case_1.6.i ], [ %146, %__barray_mask_borrow.exit259.6.i ], [ %144, %cond_exit_89.thread.5.i ] - %150 = and i64 %149, 128 - %.not296.i = icmp eq i64 %150, 0 - br i1 %.not296.i, label %__barray_mask_borrow.exit259.7.i, label %cond_exit_89.thread.7.i - -__barray_mask_borrow.exit259.7.i: ; preds = %cond_exit_89.thread.6.i - %151 = or disjoint i64 %149, 128 - store i64 %151, ptr %72, align 4 - %152 = getelementptr inbounds nuw i8, ptr %71, i64 168 - %153 = load { i1, i64, i1 }, ptr %152, align 4 - %.fca.0.extract167.7.i = extractvalue { i1, i64, i1 } %153, 0 - br i1 %.fca.0.extract167.7.i, label %cond_392_case_1.7.i, label %cond_exit_89.thread.7.i - -cond_392_case_1.7.i: ; preds = %__barray_mask_borrow.exit259.7.i - %.fca.1.extract.7.i = extractvalue { i1, i64, i1 } %153, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.7.i) - %.pre287.i = load i64, ptr %72, align 4 - br label %cond_exit_89.thread.7.i - -cond_exit_89.thread.7.i: ; preds = %cond_392_case_1.7.i, %__barray_mask_borrow.exit259.7.i, %cond_exit_89.thread.6.i - %154 = phi i64 [ %.pre287.i, %cond_392_case_1.7.i ], [ %151, %__barray_mask_borrow.exit259.7.i ], [ %149, %cond_exit_89.thread.6.i ] - %155 = and i64 %154, 256 - %.not297.i = icmp eq i64 %155, 0 - br i1 %.not297.i, label %__barray_mask_borrow.exit259.8.i, label %cond_exit_89.thread.8.i - -__barray_mask_borrow.exit259.8.i: ; preds = %cond_exit_89.thread.7.i - %156 = or disjoint i64 %154, 256 - store i64 %156, ptr %72, align 4 - %157 = getelementptr inbounds nuw i8, ptr %71, i64 192 - %158 = load { i1, i64, i1 }, ptr %157, align 4 - %.fca.0.extract167.8.i = extractvalue { i1, i64, i1 } %158, 0 - br i1 %.fca.0.extract167.8.i, label %cond_392_case_1.8.i, label %cond_exit_89.thread.8.i - -cond_392_case_1.8.i: ; preds = %__barray_mask_borrow.exit259.8.i - %.fca.1.extract.8.i = extractvalue { i1, i64, i1 } %158, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.8.i) - %.pre288.i = load i64, ptr %72, align 4 - br label %cond_exit_89.thread.8.i - -cond_exit_89.thread.8.i: ; preds = %cond_392_case_1.8.i, %__barray_mask_borrow.exit259.8.i, %cond_exit_89.thread.7.i - %159 = phi i64 [ %.pre288.i, %cond_392_case_1.8.i ], [ %156, %__barray_mask_borrow.exit259.8.i ], [ %154, %cond_exit_89.thread.7.i ] - %160 = and i64 %159, 512 - %.not298.i = icmp eq i64 %160, 0 - br i1 %.not298.i, label %__barray_mask_borrow.exit259.9.i, label %cond_exit_89.thread.9.i - -__barray_mask_borrow.exit259.9.i: ; preds = %cond_exit_89.thread.8.i - %161 = or disjoint i64 %159, 512 - store i64 %161, ptr %72, align 4 - %162 = getelementptr inbounds nuw i8, ptr %71, i64 216 - %163 = load { i1, i64, i1 }, ptr %162, align 4 - %.fca.0.extract167.9.i = extractvalue { i1, i64, i1 } %163, 0 - br i1 %.fca.0.extract167.9.i, label %cond_392_case_1.9.i, label %cond_exit_89.thread.9.i - -cond_392_case_1.9.i: ; preds = %__barray_mask_borrow.exit259.9.i - %.fca.1.extract.9.i = extractvalue { i1, i64, i1 } %163, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.9.i) - %.pre289.i = load i64, ptr %72, align 4 - br label %cond_exit_89.thread.9.i - -cond_exit_89.thread.9.i: ; preds = %cond_392_case_1.9.i, %__barray_mask_borrow.exit259.9.i, %cond_exit_89.thread.8.i - %164 = phi i64 [ %.pre289.i, %cond_392_case_1.9.i ], [ %161, %__barray_mask_borrow.exit259.9.i ], [ %159, %cond_exit_89.thread.8.i ] - %165 = or i64 %164, -1024 - store i64 %165, ptr %72, align 4 - %166 = icmp eq i64 %165, -1 - br i1 %166, label %__hugr__.main.1.exit, label %mask_block_err.i.i - -cond_392_case_1.i: ; preds = %__barray_mask_borrow.exit259.i - %.fca.1.extract.i = extractvalue { i1, i64, i1 } %118, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.i) - %.pre.i = load i64, ptr %72, align 4 - br label %cond_exit_89.thread.i - -__hugr__.main.1.exit: ; preds = %cond_exit_89.thread.9.i - tail call void @heap_free(ptr %71) - tail call void @heap_free(ptr nonnull %72) - %167 = tail call i64 @teardown() - ret i64 %167 + tail call void @setup(i64 %0), !dbg !63 + tail call void @"__hugr__.__main__.measure_qb_array..main.1"(), !dbg !63 + %1 = tail call i64 @teardown(), !dbg !63 + ret i64 %1, !dbg !63 } declare void @setup(i64) local_unnamed_addr @@ -632,6 +641,71 @@ declare i64 @teardown() local_unnamed_addr attributes #0 = { noreturn } -!name = !{!0} - -!0 = !{!"mainlib"} +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} +!name = !{!3} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v0.32.0)-v0.21.11", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "file:///Users/george.hodgkins/proj/clone-anduril") +!3 = !{!"mainlib"} +!4 = distinct !DISubprogram(name: "measure_qb_array..main", linkageName: "__hugr__.__main__.measure_qb_array..main.1", scope: null, file: !5, line: 101, type: !6, scopeLine: 102, spFlags: DISPFlagDefinition, unit: !1) +!5 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "") +!6 = !DISubroutineType(types: !7) +!7 = !{null} +!8 = !DILocation(line: 102, column: 13, scope: !4) +!9 = !DILocation(line: 102, column: 19, scope: !4) +!10 = !DILocation(line: 103, column: 10, scope: !4, inlinedAt: !11) +!11 = distinct !DILocation(line: 103, column: 10, scope: !4) +!12 = !DILocation(line: 103, column: 10, scope: !4) +!13 = !DILocation(line: 103, column: 8, scope: !4) +!14 = !DILocation(line: 103, column: 10, scope: !4, inlinedAt: !15) +!15 = distinct !DILocation(line: 104, column: 10, scope: !4) +!16 = !DILocation(line: 104, column: 10, scope: !4) +!17 = !DILocation(line: 104, column: 8, scope: !4) +!18 = !DILocation(line: 103, column: 10, scope: !4, inlinedAt: !19) +!19 = distinct !DILocation(line: 105, column: 10, scope: !4) +!20 = !DILocation(line: 105, column: 10, scope: !4) +!21 = !DILocation(line: 105, column: 8, scope: !4) +!22 = !DILocation(line: 103, column: 10, scope: !4, inlinedAt: !23) +!23 = distinct !DILocation(line: 106, column: 10, scope: !4) +!24 = !DILocation(line: 106, column: 10, scope: !4) +!25 = !DILocation(line: 106, column: 8, scope: !4) +!26 = !DILocation(line: 84, column: 25, scope: !27, inlinedAt: !37) +!27 = distinct !DISubprogram(name: "std.array.array.__iter__$qubit&10", linkageName: "__hugr__.guppylang.std.array.array.__iter__$qubit&10.190", scope: null, file: !28, line: 83, type: !29, scopeLine: 84, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!28 = !DIFile(filename: "/Users/george.hodgkins/proj/clone-anduril/.venv/lib/python3.10/site-packages/guppylang/std/array.py", directory: "") +!29 = !DISubroutineType(types: !30) +!30 = !{!31, !33} +!31 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ { ptr, ptr, i64 }, i64 }", file: !2, size: 32, align: 8, elements: !32) +!32 = !{!33, !36} +!33 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ ptr, ptr, i64 }", file: !2, size: 24, align: 8, elements: !34) +!34 = !{!35, !35, !36} +!35 = !DIBasicType(name: "ptr", size: 64, encoding: DW_ATE_address) +!36 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!37 = distinct !DILocation(line: 382, column: 37, scope: !38, inlinedAt: !42) +!38 = distinct !DISubprogram(name: "std.quantum.measure_array$10", linkageName: "__hugr__.guppylang.std.quantum.measure_array$10.149", scope: null, file: !39, line: 380, type: !40, scopeLine: 382, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!39 = !DIFile(filename: "/Users/george.hodgkins/proj/clone-anduril/.venv/lib/python3.10/site-packages/guppylang/std/quantum/__init__.py", directory: "") +!40 = !DISubroutineType(types: !41) +!41 = !{!33, !33} +!42 = distinct !DILocation(line: 107, column: 8, scope: !4) +!43 = !DILocation(line: 382, column: 11, scope: !38, inlinedAt: !42) +!44 = !DILocation(line: 276, column: 8, scope: !45, inlinedAt: !53) +!45 = distinct !DISubprogram(name: "std.array.ArrayIter.__next__$qubit&10", linkageName: "__hugr__.guppylang.std.array.ArrayIter.__next__$qubit&10.202", scope: null, file: !28, line: 270, type: !46, scopeLine: 273, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!46 = !DISubroutineType(types: !47) +!47 = !{!48, !31} +!48 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i1, { { { ptr, ptr, i64 }, i64 }, i64 } }", file: !2, size: 40, align: 8, elements: !49) +!49 = !{!50, !51} +!50 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) +!51 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ { { ptr, ptr, i64 }, i64 }, i64 }", file: !2, size: 40, align: 8, elements: !52) +!52 = !{!31, !36} +!53 = distinct !DILocation(line: 382, column: 37, scope: !38, inlinedAt: !42) +!54 = !DILocation(line: 275, column: 50, scope: !45, inlinedAt: !53) +!55 = !DILocation(line: 274, column: 19, scope: !45, inlinedAt: !53) +!56 = !DILocation(line: 103, column: 10, scope: !4, inlinedAt: !57) +!57 = distinct !DILocation(line: 274, column: 19, scope: !45, inlinedAt: !53) +!58 = !DILocation(line: 273, column: 11, scope: !45, inlinedAt: !53) +!59 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !60, type: !61, spFlags: DISPFlagDefinition, unit: !1) +!60 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") +!61 = !DISubroutineType(types: !62) +!62 = !{!36, !36} +!63 = !DILocation(line: 0, scope: !59) diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-no_results/no_results_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-no_results/no_results_x86_64-windows-msvc index a85084143..3711c495a 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-no_results/no_results_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-no_results/no_results_x86_64-windows-msvc @@ -5,6 +5,26 @@ target triple = "x86_64-windows-msvc" @"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." +define void @"__hugr__.__main__.no_results..bar.1"() local_unnamed_addr !dbg !4 { +alloca_block: + %qalloc.i = tail call i64 @___qalloc(), !dbg !8 + %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 + br i1 %not_max.not.not.i, label %cond_18_case_0.i, label %__hugr__.__tk2_qalloc.14.exit, !dbg !8 + +cond_18_case_0.i: ; preds = %alloca_block + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + unreachable, !dbg !8 + +__hugr__.__tk2_qalloc.14.exit: ; preds = %alloca_block + tail call void @___reset(i64 %qalloc.i), !dbg !8 + tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 + tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 + %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) + ret void +} + declare i64 @___lazy_measure(i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -22,26 +42,12 @@ declare void @___rxy(i64, double, double) local_unnamed_addr declare void @___rz(i64, double) local_unnamed_addr -define i64 @qmain(i64 %0) local_unnamed_addr { +define i64 @qmain(i64 %0) local_unnamed_addr !dbg !10 { entry: - tail call void @setup(i64 %0) - %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.not.i.i, label %cond_18_case_0.i.i, label %__hugr__.bar.1.exit - -cond_18_case_0.i.i: ; preds = %entry - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.bar.1.exit: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - tail call void @___rxy(i64 %qalloc.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i.i, double 0x400921FB54442D18) - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i.i) - tail call void @___qfree(i64 %qalloc.i.i) - tail call void @___dec_future_refcount(i64 %lazy_measure.i) - %1 = tail call i64 @teardown() - ret i64 %1 + tail call void @setup(i64 %0), !dbg !15 + tail call void @"__hugr__.__main__.no_results..bar.1"(), !dbg !15 + %1 = tail call i64 @teardown(), !dbg !15 + ret i64 %1, !dbg !15 } declare void @setup(i64) local_unnamed_addr @@ -50,6 +56,23 @@ declare i64 @teardown() local_unnamed_addr attributes #0 = { noreturn } -!name = !{!0} - -!0 = !{!"mainlib"} +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} +!name = !{!3} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v0.32.0)-v0.21.11", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "file:///Users/george.hodgkins/proj/clone-anduril") +!3 = !{!"mainlib"} +!4 = distinct !DISubprogram(name: "no_results..bar", linkageName: "__hugr__.__main__.no_results..bar.1", scope: null, file: !5, line: 64, type: !6, scopeLine: 65, spFlags: DISPFlagDefinition, unit: !1) +!5 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "") +!6 = !DISubroutineType(types: !7) +!7 = !{null} +!8 = !DILocation(line: 65, column: 20, scope: !4) +!9 = !DILocation(line: 66, column: 8, scope: !4) +!10 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !11, type: !12, spFlags: DISPFlagDefinition, unit: !1) +!11 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") +!12 = !DISubroutineType(types: !13) +!13 = !{!14, !14} +!14 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!15 = !DILocation(line: 0, scope: !10) diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-postselect_exit/postselect_exit_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-postselect_exit/postselect_exit_x86_64-windows-msvc index e2509c87a..2b718dadb 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-postselect_exit/postselect_exit_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-postselect_exit/postselect_exit_x86_64-windows-msvc @@ -7,6 +7,38 @@ target triple = "x86_64-windows-msvc" @res_c.1C9EF4D1.0 = private constant [12 x i8] c"\0BUSER:BOOL:c" @"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." +define void @"__hugr__.__main__.postselect_exit..main.1"() local_unnamed_addr !dbg !4 { +alloca_block: + %qalloc.i = tail call i64 @___qalloc(), !dbg !8 + %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 + br i1 %not_max.not.not.i, label %cond_45_case_0.i, label %__hugr__.__tk2_qalloc.41.exit, !dbg !8 + +cond_45_case_0.i: ; preds = %alloca_block + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + unreachable, !dbg !8 + +__hugr__.__tk2_qalloc.41.exit: ; preds = %alloca_block + tail call void @___reset(i64 %qalloc.i), !dbg !8 + tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 + tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 + %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + tail call void @___qfree(i64 %qalloc.i) + tail call void @___inc_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 %0, label %cond_98_case_1 + +cond_98_case_1: ; preds = %__hugr__.__tk2_qalloc.41.exit + %read_bool66 = 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_c.1C9EF4D1.0, i64 11, i1 %read_bool66), !dbg !10 + ret void + +0: ; preds = %__hugr__.__tk2_qalloc.41.exit + tail call void @panic(i32 42, ptr nonnull @s_Postselect.13DF1CD0.0), !dbg !11 + unreachable +} + declare i64 @___lazy_measure(i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -30,38 +62,12 @@ declare void @___rxy(i64, double, double) local_unnamed_addr declare void @___rz(i64, double) local_unnamed_addr -define i64 @qmain(i64 %0) local_unnamed_addr { +define i64 @qmain(i64 %0) local_unnamed_addr !dbg !12 { entry: - tail call void @setup(i64 %0) - %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.not.i.i, label %cond_45_case_0.i.i, label %__hugr__.__tk2_qalloc.41.exit.i - -cond_45_case_0.i.i: ; preds = %entry - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_qalloc.41.exit.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - tail call void @___rxy(i64 %qalloc.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i.i, double 0x400921FB54442D18) - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i.i) - tail call void @___qfree(i64 %qalloc.i.i) - tail call void @___inc_future_refcount(i64 %lazy_measure.i) - %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) - tail call void @___dec_future_refcount(i64 %lazy_measure.i) - br i1 %read_bool.i, label %1, label %__hugr__.main.1.exit - -1: ; preds = %__hugr__.__tk2_qalloc.41.exit.i - tail call void @panic(i32 42, ptr nonnull @s_Postselect.13DF1CD0.0) - unreachable - -__hugr__.main.1.exit: ; preds = %__hugr__.__tk2_qalloc.41.exit.i - %read_bool66.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_bool66.i) - %2 = tail call i64 @teardown() - ret i64 %2 + tail call void @setup(i64 %0), !dbg !17 + tail call void @"__hugr__.__main__.postselect_exit..main.1"(), !dbg !17 + %1 = tail call i64 @teardown(), !dbg !17 + ret i64 %1, !dbg !17 } declare void @setup(i64) local_unnamed_addr @@ -70,6 +76,25 @@ declare i64 @teardown() local_unnamed_addr attributes #0 = { noreturn } -!name = !{!0} - -!0 = !{!"mainlib"} +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} +!name = !{!3} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v0.32.0)-v0.21.11", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "file:///Users/george.hodgkins/proj/clone-anduril") +!3 = !{!"mainlib"} +!4 = distinct !DISubprogram(name: "postselect_exit..main", linkageName: "__hugr__.__main__.postselect_exit..main.1", scope: null, file: !5, line: 131, type: !6, scopeLine: 132, spFlags: DISPFlagDefinition, unit: !1) +!5 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "") +!6 = !DISubroutineType(types: !7) +!7 = !{null} +!8 = !DILocation(line: 132, column: 12, scope: !4) +!9 = !DILocation(line: 133, column: 8, scope: !4) +!10 = !DILocation(line: 137, column: 8, scope: !4) +!11 = !DILocation(line: 136, column: 12, scope: !4) +!12 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !13, type: !14, spFlags: DISPFlagDefinition, unit: !1) +!13 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") +!14 = !DISubroutineType(types: !15) +!15 = !{!16, !16} +!16 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!17 = !DILocation(line: 0, scope: !12) diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-postselect_panic/postselect_panic_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-postselect_panic/postselect_panic_x86_64-windows-msvc index 203df071d..caf9eab07 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-postselect_panic/postselect_panic_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-postselect_panic/postselect_panic_x86_64-windows-msvc @@ -7,6 +7,38 @@ target triple = "x86_64-windows-msvc" @res_c.1C9EF4D1.0 = private constant [12 x i8] c"\0BUSER:BOOL:c" @"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." +define void @"__hugr__.__main__.postselect_panic..main.1"() local_unnamed_addr !dbg !4 { +alloca_block: + %qalloc.i = tail call i64 @___qalloc(), !dbg !8 + %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 + br i1 %not_max.not.not.i, label %cond_43_case_0.i, label %__hugr__.__tk2_qalloc.39.exit, !dbg !8 + +cond_43_case_0.i: ; preds = %alloca_block + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + unreachable, !dbg !8 + +__hugr__.__tk2_qalloc.39.exit: ; preds = %alloca_block + tail call void @___reset(i64 %qalloc.i), !dbg !8 + tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 + tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 + %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + tail call void @___qfree(i64 %qalloc.i) + tail call void @___inc_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 %0, label %cond_96_case_1 + +cond_96_case_1: ; preds = %__hugr__.__tk2_qalloc.39.exit + %read_bool65 = 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_c.1C9EF4D1.0, i64 11, i1 %read_bool65), !dbg !10 + ret void + +0: ; preds = %__hugr__.__tk2_qalloc.39.exit + tail call void @panic(i32 1001, ptr nonnull @s_Postselect.13DF1CD0.0), !dbg !11 + unreachable +} + declare i64 @___lazy_measure(i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -30,38 +62,12 @@ declare void @___rxy(i64, double, double) local_unnamed_addr declare void @___rz(i64, double) local_unnamed_addr -define i64 @qmain(i64 %0) local_unnamed_addr { +define i64 @qmain(i64 %0) local_unnamed_addr !dbg !12 { entry: - tail call void @setup(i64 %0) - %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.not.i.i, label %cond_43_case_0.i.i, label %__hugr__.__tk2_qalloc.39.exit.i - -cond_43_case_0.i.i: ; preds = %entry - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_qalloc.39.exit.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - tail call void @___rxy(i64 %qalloc.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i.i, double 0x400921FB54442D18) - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i.i) - tail call void @___qfree(i64 %qalloc.i.i) - tail call void @___inc_future_refcount(i64 %lazy_measure.i) - %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) - tail call void @___dec_future_refcount(i64 %lazy_measure.i) - br i1 %read_bool.i, label %1, label %__hugr__.main.1.exit - -1: ; preds = %__hugr__.__tk2_qalloc.39.exit.i - tail call void @panic(i32 1001, ptr nonnull @s_Postselect.13DF1CD0.0) - unreachable - -__hugr__.main.1.exit: ; preds = %__hugr__.__tk2_qalloc.39.exit.i - %read_bool65.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_bool65.i) - %2 = tail call i64 @teardown() - ret i64 %2 + tail call void @setup(i64 %0), !dbg !17 + tail call void @"__hugr__.__main__.postselect_panic..main.1"(), !dbg !17 + %1 = tail call i64 @teardown(), !dbg !17 + ret i64 %1, !dbg !17 } declare void @setup(i64) local_unnamed_addr @@ -70,6 +76,25 @@ declare i64 @teardown() local_unnamed_addr attributes #0 = { noreturn } -!name = !{!0} - -!0 = !{!"mainlib"} +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} +!name = !{!3} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v0.32.0)-v0.21.11", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "file:///Users/george.hodgkins/proj/clone-anduril") +!3 = !{!"mainlib"} +!4 = distinct !DISubprogram(name: "postselect_panic..main", linkageName: "__hugr__.__main__.postselect_panic..main.1", scope: null, file: !5, line: 144, type: !6, scopeLine: 145, spFlags: DISPFlagDefinition, unit: !1) +!5 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "") +!6 = !DISubroutineType(types: !7) +!7 = !{null} +!8 = !DILocation(line: 145, column: 12, scope: !4) +!9 = !DILocation(line: 146, column: 8, scope: !4) +!10 = !DILocation(line: 150, column: 8, scope: !4) +!11 = !DILocation(line: 149, column: 12, scope: !4) +!12 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !13, type: !14, spFlags: DISPFlagDefinition, unit: !1) +!13 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") +!14 = !DISubroutineType(types: !15) +!15 = !{!16, !16} +!16 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!17 = !DILocation(line: 0, scope: !12) diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-print_current_shot/print_current_shot_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-print_current_shot/print_current_shot_x86_64-windows-msvc index 8b23d24de..ff20d6479 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-print_current_shot/print_current_shot_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-print_current_shot/print_current_shot_x86_64-windows-msvc @@ -5,23 +5,50 @@ target triple = "x86_64-windows-msvc" @res_shot.6D86EAF7.0 = private constant [14 x i8] c"\0DUSER:INT:shot" +define void @"__hugr__.__main__.print_current_shot..main.1"() local_unnamed_addr !dbg !4 { +alloca_block: + %shot = tail call i64 @get_current_shot(), !dbg !8 + tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot), !dbg !9 + ret void +} + declare i64 @get_current_shot() local_unnamed_addr declare void @print_int(ptr, i64, i64) local_unnamed_addr -define i64 @qmain(i64 %0) local_unnamed_addr { +define i64 @qmain(i64 %0) local_unnamed_addr !dbg !10 { entry: - tail call void @setup(i64 %0) - %shot.i = tail call i64 @get_current_shot() - tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot.i) - %1 = tail call i64 @teardown() - ret i64 %1 + tail call void @setup(i64 %0), !dbg !15 + %shot.i = tail call i64 @get_current_shot(), !dbg !16 + tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot.i), !dbg !18 + %1 = tail call i64 @teardown(), !dbg !15 + ret i64 %1, !dbg !15 } declare void @setup(i64) local_unnamed_addr declare i64 @teardown() local_unnamed_addr -!name = !{!0} - -!0 = !{!"mainlib"} +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} +!name = !{!3} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v0.32.0)-v0.21.11", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "file:///Users/george.hodgkins/proj/clone-anduril") +!3 = !{!"mainlib"} +!4 = distinct !DISubprogram(name: "print_current_shot..main", linkageName: "__hugr__.__main__.print_current_shot..main.1", scope: null, file: !5, line: 194, type: !6, scopeLine: 195, spFlags: DISPFlagDefinition, unit: !1) +!5 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "") +!6 = !DISubroutineType(types: !7) +!7 = !{null} +!8 = !DILocation(line: 195, column: 23, scope: !4) +!9 = !DILocation(line: 195, column: 8, scope: !4) +!10 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !11, type: !12, spFlags: DISPFlagDefinition, unit: !1) +!11 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") +!12 = !DISubroutineType(types: !13) +!13 = !{!14, !14} +!14 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!15 = !DILocation(line: 0, scope: !10) +!16 = !DILocation(line: 195, column: 23, scope: !4, inlinedAt: !17) +!17 = distinct !DILocation(line: 0, scope: !10) +!18 = !DILocation(line: 195, column: 8, scope: !4, inlinedAt: !17) diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-rng/rng_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-rng/rng_x86_64-windows-msvc index ecfd7366c..2c4553e01 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-rng/rng_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-rng/rng_x86_64-windows-msvc @@ -11,6 +11,32 @@ target triple = "x86_64-windows-msvc" @res_rfloat2.4DAB941F.0 = private constant [19 x i8] c"\12USER:FLOAT:rfloat2" @res_rint_bnd2.169DE399.0 = private constant [19 x i8] c"\12USER:INT:rint_bnd2" +define void @"__hugr__.__main__.rng..main.1"() local_unnamed_addr !dbg !4 { +alloca_block: + tail call void @random_seed(i64 42), !dbg !8 + %rint = tail call i32 @random_int(), !dbg !17 + %rint14 = tail call i32 @random_int(), !dbg !18 + %rfloat = tail call double @random_float(), !dbg !19 + %rintb = tail call i32 @random_rng(i32 100), !dbg !20 + %0 = sext i32 %rintb to i64, !dbg !20 + %1 = sext i32 %rint14 to i64, !dbg !18 + %2 = sext i32 %rint to i64, !dbg !17 + tail call void @print_int(ptr nonnull @res_rint.B928E41E.0, i64 13, i64 %2), !dbg !21 + tail call void @print_int(ptr nonnull @res_rint1.0884EC03.0, i64 14, i64 %1), !dbg !22 + tail call void @print_float(ptr nonnull @res_rfloat.F0E4DD2C.0, i64 17, double %rfloat), !dbg !23 + tail call void @print_int(ptr nonnull @res_rint_bnd.CB1E6B0D.0, i64 17, i64 %0), !dbg !24 + tail call void @random_seed(i64 84), !dbg !25 + %rint47 = tail call i32 @random_int(), !dbg !27 + %rfloat49 = tail call double @random_float(), !dbg !28 + %rintb52 = tail call i32 @random_rng(i32 200), !dbg !29 + %3 = sext i32 %rintb52 to i64, !dbg !29 + %4 = sext i32 %rint47 to i64, !dbg !27 + tail call void @print_int(ptr nonnull @res_rint2.F0335598.0, i64 14, i64 %4), !dbg !30 + tail call void @print_float(ptr nonnull @res_rfloat2.4DAB941F.0, i64 18, double %rfloat49), !dbg !31 + tail call void @print_int(ptr nonnull @res_rint_bnd2.169DE399.0, i64 18, i64 %3), !dbg !32 + ret void +} + declare i32 @random_int() local_unnamed_addr declare double @random_float() local_unnamed_addr @@ -23,38 +49,57 @@ declare void @print_float(ptr, i64, double) local_unnamed_addr declare void @random_seed(i64) local_unnamed_addr -define i64 @qmain(i64 %0) local_unnamed_addr { +define i64 @qmain(i64 %0) local_unnamed_addr !dbg !33 { entry: - tail call void @setup(i64 %0) - tail call void @random_seed(i64 42) - %rint.i = tail call i32 @random_int() - %rint14.i = tail call i32 @random_int() - %rfloat.i = tail call double @random_float() - %rintb.i = tail call i32 @random_rng(i32 100) - %1 = sext i32 %rintb.i to i64 - %2 = sext i32 %rint14.i to i64 - %3 = sext i32 %rint.i to i64 - tail call void @print_int(ptr nonnull @res_rint.B928E41E.0, i64 13, i64 %3) - tail call void @print_int(ptr nonnull @res_rint1.0884EC03.0, i64 14, i64 %2) - tail call void @print_float(ptr nonnull @res_rfloat.F0E4DD2C.0, i64 17, double %rfloat.i) - tail call void @print_int(ptr nonnull @res_rint_bnd.CB1E6B0D.0, i64 17, i64 %1) - tail call void @random_seed(i64 84) - %rint47.i = tail call i32 @random_int() - %rfloat49.i = tail call double @random_float() - %rintb52.i = tail call i32 @random_rng(i32 200) - %4 = sext i32 %rintb52.i to i64 - %5 = sext i32 %rint47.i to i64 - tail call void @print_int(ptr nonnull @res_rint2.F0335598.0, i64 14, i64 %5) - tail call void @print_float(ptr nonnull @res_rfloat2.4DAB941F.0, i64 18, double %rfloat49.i) - tail call void @print_int(ptr nonnull @res_rint_bnd2.169DE399.0, i64 18, i64 %4) - %6 = tail call i64 @teardown() - ret i64 %6 + tail call void @setup(i64 %0), !dbg !37 + tail call void @"__hugr__.__main__.rng..main.1"(), !dbg !37 + %1 = tail call i64 @teardown(), !dbg !37 + ret i64 %1, !dbg !37 } declare void @setup(i64) local_unnamed_addr declare i64 @teardown() local_unnamed_addr -!name = !{!0} +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} +!name = !{!3} -!0 = !{!"mainlib"} +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v0.32.0)-v0.21.11", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "file:///Users/george.hodgkins/proj/clone-anduril") +!3 = !{!"mainlib"} +!4 = distinct !DISubprogram(name: "rng..main", linkageName: "__hugr__.__main__.rng..main.1", scope: null, file: !5, line: 202, type: !6, scopeLine: 203, spFlags: DISPFlagDefinition, unit: !1) +!5 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "") +!6 = !DISubroutineType(types: !7) +!7 = !{null} +!8 = !DILocation(line: 44, column: 15, scope: !9, inlinedAt: !16) +!9 = distinct !DISubprogram(name: "std.qsystem.random.RNG.__new__", linkageName: "__hugr__.guppylang.std.qsystem.random.RNG.__new__.72", scope: null, file: !10, line: 42, type: !11, scopeLine: 44, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!10 = !DIFile(filename: "/Users/george.hodgkins/proj/clone-anduril/.venv/lib/python3.10/site-packages/guppylang/std/qsystem/random.py", directory: "") +!11 = !DISubroutineType(types: !12) +!12 = !{!13, !15} +!13 = !DICompositeType(tag: DW_TAG_structure_type, name: "{}", file: !2, align: 8, elements: !14) +!14 = !{} +!15 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!16 = distinct !DILocation(line: 203, column: 14, scope: !4) +!17 = !DILocation(line: 204, column: 15, scope: !4) +!18 = !DILocation(line: 205, column: 16, scope: !4) +!19 = !DILocation(line: 206, column: 17, scope: !4) +!20 = !DILocation(line: 207, column: 19, scope: !4) +!21 = !DILocation(line: 209, column: 8, scope: !4) +!22 = !DILocation(line: 210, column: 8, scope: !4) +!23 = !DILocation(line: 211, column: 8, scope: !4) +!24 = !DILocation(line: 212, column: 8, scope: !4) +!25 = !DILocation(line: 44, column: 15, scope: !9, inlinedAt: !26) +!26 = distinct !DILocation(line: 213, column: 14, scope: !4) +!27 = !DILocation(line: 214, column: 15, scope: !4) +!28 = !DILocation(line: 215, column: 17, scope: !4) +!29 = !DILocation(line: 216, column: 19, scope: !4) +!30 = !DILocation(line: 218, column: 8, scope: !4) +!31 = !DILocation(line: 219, column: 8, scope: !4) +!32 = !DILocation(line: 220, column: 8, scope: !4) +!33 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !34, type: !35, spFlags: DISPFlagDefinition, unit: !1) +!34 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") +!35 = !DISubroutineType(types: !36) +!36 = !{!15, !15} +!37 = !DILocation(line: 0, scope: !33) diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-rus/rus_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-rus/rus_x86_64-windows-msvc index d9e8e4d01..c1be11f51 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-rus/rus_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-rus/rus_x86_64-windows-msvc @@ -6,6 +6,93 @@ target triple = "x86_64-windows-msvc" @res_result.457DE32D.0 = private constant [17 x i8] c"\10USER:BOOL:result" @"e_No more qu.3B2EEBF0.0" = private constant [47 x i8] c".EXIT:INT:No more qubits available to allocate." +define void @"__hugr__.__main__.rus..main.1"() local_unnamed_addr !dbg !4 { +alloca_block: + %qalloc.i = tail call i64 @___qalloc(), !dbg !8 + %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 + br i1 %not_max.not.not.i, label %cond_87_case_0.i, label %__hugr__.__tk2_qalloc.83.exit, !dbg !8 + +cond_87_case_0.i: ; preds = %alloca_block + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + unreachable, !dbg !8 + +__hugr__.__tk2_qalloc.83.exit: ; preds = %alloca_block + tail call void @___reset(i64 %qalloc.i), !dbg !8 + %qalloc.i132.i = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i133.i = icmp eq i64 %qalloc.i132.i, -1, !dbg !9 + br i1 %not_max.not.not.i133.i, label %cond_101_case_0.i.i, label %__hugr__.__tk2_qalloc.97.exit.i, !dbg !9 + +cond_101_case_0.i.i: ; preds = %cond_242_case_1.backedge.i, %__hugr__.__tk2_qalloc.83.exit + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 + unreachable, !dbg !9 + +__hugr__.__tk2_qalloc.97.exit.i: ; preds = %__hugr__.__tk2_qalloc.83.exit, %cond_242_case_1.backedge.i + %qalloc.i134.i = phi i64 [ %qalloc.i.i, %cond_242_case_1.backedge.i ], [ %qalloc.i132.i, %__hugr__.__tk2_qalloc.83.exit ] + tail call void @___reset(i64 %qalloc.i134.i), !dbg !9 + %qalloc.i128.i = tail call i64 @___qalloc(), !dbg !15 + %not_max.not.not.i129.i = icmp eq i64 %qalloc.i128.i, -1, !dbg !15 + br i1 %not_max.not.not.i129.i, label %cond_115_case_0.i.i, label %__hugr__.__tk2_qalloc.111.exit.i, !dbg !15 + +cond_115_case_0.i.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !15 + unreachable, !dbg !15 + +__hugr__.__tk2_qalloc.111.exit.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i + tail call void @___reset(i64 %qalloc.i128.i), !dbg !15 + tail call void @___rxy(i64 %qalloc.i128.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !16 + tail call void @___rz(i64 %qalloc.i128.i, double 0x400921FB54442D18), !dbg !16 + tail call void @___rxy(i64 %qalloc.i134.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !17 + tail call void @___rz(i64 %qalloc.i134.i, double 0x400921FB54442D18), !dbg !17 + tail call void @___rz(i64 %qalloc.i134.i, double 0xBFE921FB54442D18), !dbg !18 + tail call void @___rxy(i64 %qalloc.i134.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18), !dbg !19 + tail call void @___rzz(i64 %qalloc.i128.i, i64 %qalloc.i134.i, double 0x3FF921FB54442D18), !dbg !19 + tail call void @___rz(i64 %qalloc.i128.i, double 0xBFF921FB54442D18), !dbg !19 + tail call void @___rxy(i64 %qalloc.i134.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18), !dbg !19 + tail call void @___rz(i64 %qalloc.i134.i, double 0xBFF921FB54442D18), !dbg !19 + tail call void @___rz(i64 %qalloc.i134.i, double 0x3FE921FB54442D18), !dbg !20 + %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i134.i) + tail call void @___qfree(i64 %qalloc.i134.i) + %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) + tail call void @___dec_future_refcount(i64 %lazy_measure.i) + br i1 %read_bool.i, label %cond_256_case_1.i, label %0 + +0: ; preds = %__hugr__.__tk2_qalloc.111.exit.i + tail call void @___qfree(i64 %qalloc.i128.i), !dbg !21 + br label %cond_242_case_1.backedge.i + +cond_242_case_1.backedge.i: ; preds = %1, %0 + %qalloc.i.i = tail call i64 @___qalloc(), !dbg !9 + %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1, !dbg !9 + br i1 %not_max.not.not.i.i, label %cond_101_case_0.i.i, label %__hugr__.__tk2_qalloc.97.exit.i, !dbg !9 + +cond_256_case_1.i: ; preds = %__hugr__.__tk2_qalloc.111.exit.i + tail call void @___rz(i64 %qalloc.i, double 0x3FE921FB54442D18), !dbg !22 + tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !23 + tail call void @___rxy(i64 %qalloc.i128.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18), !dbg !24 + tail call void @___rzz(i64 %qalloc.i, i64 %qalloc.i128.i, double 0x3FF921FB54442D18), !dbg !24 + tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18), !dbg !24 + tail call void @___rxy(i64 %qalloc.i128.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18), !dbg !24 + tail call void @___rz(i64 %qalloc.i128.i, double 0xBFF921FB54442D18), !dbg !24 + tail call void @___rz(i64 %qalloc.i128.i, double 0x3FE921FB54442D18), !dbg !25 + %lazy_measure67.i = tail call i64 @___lazy_measure(i64 %qalloc.i128.i) + tail call void @___qfree(i64 %qalloc.i128.i) + %read_bool80.i = tail call i1 @___read_future_bool(i64 %lazy_measure67.i) + tail call void @___dec_future_refcount(i64 %lazy_measure67.i) + br i1 %read_bool80.i, label %"__hugr__.__main__.rus..rus.17.exit", label %1 + +1: ; preds = %cond_256_case_1.i + tail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00), !dbg !26 + br label %cond_242_case_1.backedge.i + +"__hugr__.__main__.rus..rus.17.exit": ; preds = %cond_256_case_1.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) + tail call void @print_bool(ptr nonnull @res_result.457DE32D.0, i64 16, i1 %read_bool), !dbg !27 + ret void +} + declare i64 @___lazy_measure(i64) local_unnamed_addr declare void @___qfree(i64) local_unnamed_addr @@ -29,93 +116,12 @@ 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 { +define i64 @qmain(i64 %0) local_unnamed_addr !dbg !28 { entry: - tail call void @setup(i64 %0) - %qalloc.i.i = tail call i64 @___qalloc() - %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1 - br i1 %not_max.not.not.i.i, label %cond_87_case_0.i.i, label %__hugr__.__tk2_qalloc.83.exit.i - -cond_87_case_0.i.i: ; preds = %entry - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_qalloc.83.exit.i: ; preds = %entry - tail call void @___reset(i64 %qalloc.i.i) - %qalloc.i132.i.i = tail call i64 @___qalloc() - %not_max.not.not.i133.i.i = icmp eq i64 %qalloc.i132.i.i, -1 - br i1 %not_max.not.not.i133.i.i, label %cond_101_case_0.i.i.i, label %__hugr__.__tk2_qalloc.97.exit.i.i - -cond_101_case_0.i.i.i: ; preds = %cond_242_case_1.backedge.i.i, %__hugr__.__tk2_qalloc.83.exit.i - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_qalloc.97.exit.i.i: ; preds = %__hugr__.__tk2_qalloc.83.exit.i, %cond_242_case_1.backedge.i.i - %qalloc.i134.i.i = phi i64 [ %qalloc.i.i.i, %cond_242_case_1.backedge.i.i ], [ %qalloc.i132.i.i, %__hugr__.__tk2_qalloc.83.exit.i ] - tail call void @___reset(i64 %qalloc.i134.i.i) - %qalloc.i128.i.i = tail call i64 @___qalloc() - %not_max.not.not.i129.i.i = icmp eq i64 %qalloc.i128.i.i, -1 - br i1 %not_max.not.not.i129.i.i, label %cond_115_case_0.i.i.i, label %__hugr__.__tk2_qalloc.111.exit.i.i - -cond_115_case_0.i.i.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i.i - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0") - unreachable - -__hugr__.__tk2_qalloc.111.exit.i.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i.i - tail call void @___reset(i64 %qalloc.i128.i.i) - tail call void @___rxy(i64 %qalloc.i128.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i128.i.i, double 0x400921FB54442D18) - tail call void @___rxy(i64 %qalloc.i134.i.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i134.i.i, double 0x400921FB54442D18) - tail call void @___rz(i64 %qalloc.i134.i.i, double 0xBFE921FB54442D18) - tail call void @___rxy(i64 %qalloc.i134.i.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rzz(i64 %qalloc.i128.i.i, i64 %qalloc.i134.i.i, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i128.i.i, double 0xBFF921FB54442D18) - tail call void @___rxy(i64 %qalloc.i134.i.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18) - tail call void @___rz(i64 %qalloc.i134.i.i, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i134.i.i, double 0x3FE921FB54442D18) - %lazy_measure.i.i = tail call i64 @___lazy_measure(i64 %qalloc.i134.i.i) - tail call void @___qfree(i64 %qalloc.i134.i.i) - %read_bool.i.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i.i) - tail call void @___dec_future_refcount(i64 %lazy_measure.i.i) - br i1 %read_bool.i.i, label %cond_256_case_1.i.i, label %1 - -1: ; preds = %__hugr__.__tk2_qalloc.111.exit.i.i - tail call void @___qfree(i64 %qalloc.i128.i.i) - br label %cond_242_case_1.backedge.i.i - -cond_242_case_1.backedge.i.i: ; preds = %2, %1 - %qalloc.i.i.i = tail call i64 @___qalloc() - %not_max.not.not.i.i.i = icmp eq i64 %qalloc.i.i.i, -1 - br i1 %not_max.not.not.i.i.i, label %cond_101_case_0.i.i.i, label %__hugr__.__tk2_qalloc.97.exit.i.i - -cond_256_case_1.i.i: ; preds = %__hugr__.__tk2_qalloc.111.exit.i.i - tail call void @___rz(i64 %qalloc.i.i, double 0x3FE921FB54442D18) - tail call void @___rz(i64 %qalloc.i.i, double 0x400921FB54442D18) - tail call void @___rxy(i64 %qalloc.i128.i.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18) - tail call void @___rzz(i64 %qalloc.i.i, i64 %qalloc.i128.i.i, double 0x3FF921FB54442D18) - tail call void @___rz(i64 %qalloc.i.i, double 0xBFF921FB54442D18) - tail call void @___rxy(i64 %qalloc.i128.i.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18) - tail call void @___rz(i64 %qalloc.i128.i.i, double 0xBFF921FB54442D18) - tail call void @___rz(i64 %qalloc.i128.i.i, double 0x3FE921FB54442D18) - %lazy_measure67.i.i = tail call i64 @___lazy_measure(i64 %qalloc.i128.i.i) - tail call void @___qfree(i64 %qalloc.i128.i.i) - %read_bool80.i.i = tail call i1 @___read_future_bool(i64 %lazy_measure67.i.i) - tail call void @___dec_future_refcount(i64 %lazy_measure67.i.i) - br i1 %read_bool80.i.i, label %__hugr__.main.1.exit, label %2 - -2: ; preds = %cond_256_case_1.i.i - tail call void @___rxy(i64 %qalloc.i.i, double 0x400921FB54442D18, double 0.000000e+00) - br label %cond_242_case_1.backedge.i.i - -__hugr__.main.1.exit: ; preds = %cond_256_case_1.i.i - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i.i) - tail call void @___qfree(i64 %qalloc.i.i) - %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) - tail call void @___dec_future_refcount(i64 %lazy_measure.i) - tail call void @print_bool(ptr nonnull @res_result.457DE32D.0, i64 16, i1 %read_bool.i) - %3 = tail call i64 @teardown() - ret i64 %3 + tail call void @setup(i64 %0), !dbg !30 + tail call void @"__hugr__.__main__.rus..main.1"(), !dbg !30 + %1 = tail call i64 @teardown(), !dbg !30 + ret i64 %1, !dbg !30 } declare void @setup(i64) local_unnamed_addr @@ -124,6 +130,38 @@ declare i64 @teardown() local_unnamed_addr attributes #0 = { noreturn } -!name = !{!0} - -!0 = !{!"mainlib"} +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} +!name = !{!3} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "guppylang (guppylang-internals-v0.32.0)-v0.21.11", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!2 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "file:///Users/george.hodgkins/proj/clone-anduril") +!3 = !{!"mainlib"} +!4 = distinct !DISubprogram(name: "rus..main", linkageName: "__hugr__.__main__.rus..main.1", scope: null, file: !5, line: 184, type: !6, scopeLine: 185, spFlags: DISPFlagDefinition, unit: !1) +!5 = !DIFile(filename: "/Users/george.hodgkins/proj/tket2/qis-compiler/python/tests/generate_hugrs.py", directory: "") +!6 = !DISubroutineType(types: !7) +!7 = !{null} +!8 = !DILocation(line: 185, column: 12, scope: !4) +!9 = !DILocation(line: 160, column: 19, scope: !10, inlinedAt: !14) +!10 = distinct !DISubprogram(name: "rus..rus", linkageName: "__hugr__.__main__.rus..rus.17", scope: null, file: !5, line: 157, type: !11, scopeLine: 158, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!11 = !DISubroutineType(types: !12) +!12 = !{!13, !13} +!13 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) +!14 = distinct !DILocation(line: 186, column: 8, scope: !4) +!15 = !DILocation(line: 160, column: 28, scope: !10, inlinedAt: !14) +!16 = !DILocation(line: 162, column: 12, scope: !10, inlinedAt: !14) +!17 = !DILocation(line: 161, column: 12, scope: !10, inlinedAt: !14) +!18 = !DILocation(line: 164, column: 12, scope: !10, inlinedAt: !14) +!19 = !DILocation(line: 165, column: 12, scope: !10, inlinedAt: !14) +!20 = !DILocation(line: 166, column: 12, scope: !10, inlinedAt: !14) +!21 = !DILocation(line: 169, column: 16, scope: !10, inlinedAt: !14) +!22 = !DILocation(line: 172, column: 12, scope: !10, inlinedAt: !14) +!23 = !DILocation(line: 173, column: 12, scope: !10, inlinedAt: !14) +!24 = !DILocation(line: 174, column: 12, scope: !10, inlinedAt: !14) +!25 = !DILocation(line: 175, column: 12, scope: !10, inlinedAt: !14) +!26 = !DILocation(line: 181, column: 12, scope: !10, inlinedAt: !14) +!27 = !DILocation(line: 187, column: 8, scope: !4) +!28 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !29, type: !11, spFlags: DISPFlagDefinition, unit: !1) +!29 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") +!30 = !DILocation(line: 0, scope: !28) diff --git a/qis-compiler/python/tests/test_basic_generation.py b/qis-compiler/python/tests/test_basic_generation.py index f829cf2c8..1413d443d 100644 --- a/qis-compiler/python/tests/test_basic_generation.py +++ b/qis-compiler/python/tests/test_basic_generation.py @@ -71,7 +71,7 @@ def test_unsupported_pytket_ops() -> None: @pytest.mark.parametrize("target_triple", triples) def test_llvm(snapshot: Snapshot, hugr_file: str, target_triple: str) -> None: hugr_envelope = load(hugr_file) - ir = compile_to_llvm_ir(hugr_envelope, target_triple=target_triple) # type: ignore[call-arg] + ir = compile_to_llvm_ir(hugr_envelope, target_triple=target_triple, emit_debug=True) # type: ignore[call-arg] snapshot.assert_match(ir, f"{hugr_file}_{target_triple}") From b2c4e207bab8d07eb752c14b42d507179f5097ec Mon Sep 17 00:00:00 2001 From: George Hodgkins Date: Mon, 20 Apr 2026 10:27:20 -0600 Subject: [PATCH 06/11] Update insta to match hugr --- qis-compiler/Cargo.toml | 2 +- tket/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qis-compiler/Cargo.toml b/qis-compiler/Cargo.toml index 699ad52c8..6d0983ae0 100644 --- a/qis-compiler/Cargo.toml +++ b/qis-compiler/Cargo.toml @@ -43,7 +43,7 @@ typetag.workspace = true # Defined here so it can be overridden by the codspeed CI job # using `cargo add`. -insta = "1.47.0" +insta = "1.47.2" [package.metadata.cargo-machete] ignored = ["cbindgen", "pyo3-build-config"] diff --git a/tket/Cargo.toml b/tket/Cargo.toml index 350740203..1d54ecc2b 100644 --- a/tket/Cargo.toml +++ b/tket/Cargo.toml @@ -92,7 +92,7 @@ proptest-recurse = { workspace = true } # Defined here so it can be overridden by the codspeed CI job # using `cargo add`. criterion = { version = "0.8.2", features = ["html_reports"] } -insta = "1.47.0" +insta = "1.47.2" [[bench]] name = "bench_main" From 9e9990c9e43e85e31b9324ac0c77eeeb940daafe Mon Sep 17 00:00:00 2001 From: George Hodgkins Date: Mon, 20 Apr 2026 11:00:19 -0600 Subject: [PATCH 07/11] Update to latest version of hugr PR --- Cargo.lock | 14 +++++++------- .../discard_qb_array_aarch64-apple-darwin | 2 +- .../flip_some_aarch64-apple-darwin | 2 +- .../measure_qb_array_aarch64-apple-darwin | 2 +- .../no_results_aarch64-apple-darwin | 2 +- .../postselect_exit_aarch64-apple-darwin | 2 +- .../postselect_panic_aarch64-apple-darwin | 2 +- .../print_current_shot_aarch64-apple-darwin | 2 +- .../rng_aarch64-apple-darwin | 2 +- .../rus_aarch64-apple-darwin | 2 +- .../discard_qb_array_x86_64-apple-darwin | 2 +- .../flip_some_x86_64-apple-darwin | 2 +- .../measure_qb_array_x86_64-apple-darwin | 2 +- .../no_results_x86_64-apple-darwin | 2 +- .../postselect_exit_x86_64-apple-darwin | 2 +- .../postselect_panic_x86_64-apple-darwin | 2 +- .../print_current_shot_x86_64-apple-darwin | 2 +- .../rng_x86_64-apple-darwin | 2 +- .../rus_x86_64-apple-darwin | 2 +- .../discard_qb_array_x86_64-unknown-linux-gnu | 2 +- .../flip_some_x86_64-unknown-linux-gnu | 2 +- .../measure_qb_array_x86_64-unknown-linux-gnu | 2 +- .../no_results_x86_64-unknown-linux-gnu | 2 +- .../postselect_exit_x86_64-unknown-linux-gnu | 2 +- .../postselect_panic_x86_64-unknown-linux-gnu | 2 +- .../print_current_shot_x86_64-unknown-linux-gnu | 2 +- .../rng_x86_64-unknown-linux-gnu | 2 +- .../rus_x86_64-unknown-linux-gnu | 2 +- .../discard_qb_array_x86_64-windows-msvc | 2 +- .../flip_some_x86_64-windows-msvc | 2 +- .../measure_qb_array_x86_64-windows-msvc | 2 +- .../no_results_x86_64-windows-msvc | 2 +- .../postselect_exit_x86_64-windows-msvc | 2 +- .../postselect_panic_x86_64-windows-msvc | 2 +- .../print_current_shot_x86_64-windows-msvc | 2 +- .../rng_x86_64-windows-msvc | 2 +- .../rus_x86_64-windows-msvc | 2 +- qis-compiler/rust/lib.rs | 11 ++++++++++- ...debug__test__emit_debug_codegen@llvm21_2.snap | 8 ++++---- ..._emit_debug_codegen@pre-mem2reg@llvm21_2.snap | 8 ++++---- ...res__test__emit_futures_codegen@llvm21_1.snap | 8 ++++---- ...res__test__emit_futures_codegen@llvm21_2.snap | 8 ++++---- ...res__test__emit_futures_codegen@llvm21_3.snap | 8 ++++---- ...res__test__emit_futures_codegen@llvm21_4.snap | 8 ++++---- ...res__test__emit_futures_codegen@llvm21_5.snap | 8 ++++---- ...res__test__emit_futures_codegen@llvm21_6.snap | 8 ++++---- ...mit_futures_codegen@pre-mem2reg@llvm21_1.snap | 8 ++++---- ...mit_futures_codegen@pre-mem2reg@llvm21_2.snap | 8 ++++---- ...mit_futures_codegen@pre-mem2reg@llvm21_3.snap | 8 ++++---- ...mit_futures_codegen@pre-mem2reg@llvm21_4.snap | 8 ++++---- ...mit_futures_codegen@pre-mem2reg@llvm21_5.snap | 8 ++++---- ...mit_futures_codegen@pre-mem2reg@llvm21_6.snap | 8 ++++---- ..._llvm__prelude__test__exit_emit@llvm21_0.snap | 8 ++++---- ...de__test__exit_emit@pre-mem2reg@llvm21_0.snap | 8 ++++---- ...llvm__prelude__test__panic_emit@llvm21_0.snap | 8 ++++---- ...e__test__panic_emit@pre-mem2reg@llvm21_0.snap | 8 ++++---- ...tem__test__emit_qsystem_codegen@llvm21_1.snap | 8 ++++---- ...em__test__emit_qsystem_codegen@llvm21_10.snap | 8 ++++---- ...tem__test__emit_qsystem_codegen@llvm21_2.snap | 8 ++++---- ...tem__test__emit_qsystem_codegen@llvm21_3.snap | 8 ++++---- ...tem__test__emit_qsystem_codegen@llvm21_4.snap | 8 ++++---- ...tem__test__emit_qsystem_codegen@llvm21_5.snap | 8 ++++---- ...tem__test__emit_qsystem_codegen@llvm21_6.snap | 8 ++++---- ...tem__test__emit_qsystem_codegen@llvm21_7.snap | 8 ++++---- ...tem__test__emit_qsystem_codegen@llvm21_8.snap | 8 ++++---- ...tem__test__emit_qsystem_codegen@llvm21_9.snap | 8 ++++---- ...mit_qsystem_codegen@pre-mem2reg@llvm21_1.snap | 8 ++++---- ...it_qsystem_codegen@pre-mem2reg@llvm21_10.snap | 8 ++++---- ...mit_qsystem_codegen@pre-mem2reg@llvm21_2.snap | 8 ++++---- ...mit_qsystem_codegen@pre-mem2reg@llvm21_3.snap | 8 ++++---- ...mit_qsystem_codegen@pre-mem2reg@llvm21_4.snap | 8 ++++---- ...mit_qsystem_codegen@pre-mem2reg@llvm21_5.snap | 8 ++++---- ...mit_qsystem_codegen@pre-mem2reg@llvm21_6.snap | 8 ++++---- ...mit_qsystem_codegen@pre-mem2reg@llvm21_7.snap | 8 ++++---- ...mit_qsystem_codegen@pre-mem2reg@llvm21_8.snap | 8 ++++---- ...mit_qsystem_codegen@pre-mem2reg@llvm21_9.snap | 8 ++++---- ...random__test__emit_random_codegen@llvm21.snap | 8 ++++---- ...ndom__test__emit_random_codegen@llvm21_1.snap | 8 ++++---- ...ndom__test__emit_random_codegen@llvm21_2.snap | 8 ++++---- ...ndom__test__emit_random_codegen@llvm21_3.snap | 8 ++++---- ...ndom__test__emit_random_codegen@llvm21_4.snap | 8 ++++---- ...ndom__test__emit_random_codegen@llvm21_5.snap | 6 +++--- ...__emit_random_codegen@pre-mem2reg@llvm21.snap | 8 ++++---- ...emit_random_codegen@pre-mem2reg@llvm21_1.snap | 8 ++++---- ...emit_random_codegen@pre-mem2reg@llvm21_2.snap | 8 ++++---- ...emit_random_codegen@pre-mem2reg@llvm21_3.snap | 8 ++++---- ...emit_random_codegen@pre-mem2reg@llvm21_4.snap | 8 ++++---- ...emit_random_codegen@pre-mem2reg@llvm21_5.snap | 6 +++--- ...sult__test__emit_result_codegen@llvm21_1.snap | 8 ++++---- ...ult__test__emit_result_codegen@llvm21_11.snap | 8 ++++---- ...ult__test__emit_result_codegen@llvm21_12.snap | 8 ++++---- ...ult__test__emit_result_codegen@llvm21_13.snap | 8 ++++---- ...ult__test__emit_result_codegen@llvm21_15.snap | 8 ++++---- ...ult__test__emit_result_codegen@llvm21_16.snap | 8 ++++---- ...sult__test__emit_result_codegen@llvm21_2.snap | 8 ++++---- ...sult__test__emit_result_codegen@llvm21_3.snap | 8 ++++---- ...sult__test__emit_result_codegen@llvm21_4.snap | 8 ++++---- ...sult__test__emit_result_codegen@llvm21_5.snap | 8 ++++---- ...sult__test__emit_result_codegen@llvm21_7.snap | 8 ++++---- ...sult__test__emit_result_codegen@llvm21_9.snap | 8 ++++---- ...emit_result_codegen@pre-mem2reg@llvm21_1.snap | 8 ++++---- ...mit_result_codegen@pre-mem2reg@llvm21_11.snap | 8 ++++---- ...mit_result_codegen@pre-mem2reg@llvm21_12.snap | 8 ++++---- ...mit_result_codegen@pre-mem2reg@llvm21_13.snap | 8 ++++---- ...mit_result_codegen@pre-mem2reg@llvm21_15.snap | 8 ++++---- ...mit_result_codegen@pre-mem2reg@llvm21_16.snap | 8 ++++---- ...emit_result_codegen@pre-mem2reg@llvm21_2.snap | 8 ++++---- ...emit_result_codegen@pre-mem2reg@llvm21_3.snap | 8 ++++---- ...emit_result_codegen@pre-mem2reg@llvm21_4.snap | 8 ++++---- ...emit_result_codegen@pre-mem2reg@llvm21_5.snap | 8 ++++---- ...emit_result_codegen@pre-mem2reg@llvm21_7.snap | 8 ++++---- ...emit_result_codegen@pre-mem2reg@llvm21_9.snap | 8 ++++---- ...utils__test__emit_utils_codegen@llvm21_1.snap | 8 ++++---- ..._emit_utils_codegen@pre-mem2reg@llvm21_1.snap | 8 ++++---- ..._llvm__bool__test__emit_all_ops@llvm21_1.snap | 8 ++++---- ..._llvm__bool__test__emit_all_ops@llvm21_2.snap | 6 +++--- ..._llvm__bool__test__emit_all_ops@llvm21_3.snap | 8 ++++---- ..._llvm__bool__test__emit_all_ops@llvm21_4.snap | 8 ++++---- ..._llvm__bool__test__emit_all_ops@llvm21_5.snap | 8 ++++---- ..._llvm__bool__test__emit_all_ops@llvm21_6.snap | 8 ++++---- ..._llvm__bool__test__emit_all_ops@llvm21_7.snap | 8 ++++---- ..._test__emit_all_ops@pre-mem2reg@llvm21_1.snap | 8 ++++---- ..._test__emit_all_ops@pre-mem2reg@llvm21_2.snap | 8 ++++---- ..._test__emit_all_ops@pre-mem2reg@llvm21_3.snap | 8 ++++---- ..._test__emit_all_ops@pre-mem2reg@llvm21_4.snap | 8 ++++---- ..._test__emit_all_ops@pre-mem2reg@llvm21_5.snap | 8 ++++---- ..._test__emit_all_ops@pre-mem2reg@llvm21_6.snap | 8 ++++---- ..._test__emit_all_ops@pre-mem2reg@llvm21_7.snap | 8 ++++---- ...m__rotation__test__emit_all_ops@llvm21_0.snap | 14 +++++++------- ..._test__emit_all_ops@pre-mem2reg@llvm21_0.snap | 16 ++++++++-------- 130 files changed, 425 insertions(+), 416 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c4454db91..885becb2a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -210,7 +210,7 @@ dependencies = [ "bitflags", "cexpr", "clang-sys", - "itertools 0.13.0", + "itertools 0.10.5", "log", "prettyplease", "proc-macro2", @@ -1150,7 +1150,7 @@ dependencies = [ [[package]] name = "hugr" version = "0.27.0" -source = "git+https://github.com/quantinuum/hugr?branch=george%2Fdebuginfo#806fb94ce459bed6faf7f3d4dbdb5a942c5b2a00" +source = "git+https://github.com/quantinuum/hugr?branch=george%2Fdebuginfo#4ebb9b8e2e4cdbc62117c65f86ca26bbc145350e" dependencies = [ "hugr-core", "hugr-llvm", @@ -1160,7 +1160,7 @@ dependencies = [ [[package]] name = "hugr-cli" version = "0.27.0" -source = "git+https://github.com/quantinuum/hugr?branch=george%2Fdebuginfo#806fb94ce459bed6faf7f3d4dbdb5a942c5b2a00" +source = "git+https://github.com/quantinuum/hugr?branch=george%2Fdebuginfo#4ebb9b8e2e4cdbc62117c65f86ca26bbc145350e" dependencies = [ "anyhow", "clap", @@ -1180,7 +1180,7 @@ dependencies = [ [[package]] name = "hugr-core" version = "0.27.0" -source = "git+https://github.com/quantinuum/hugr?branch=george%2Fdebuginfo#806fb94ce459bed6faf7f3d4dbdb5a942c5b2a00" +source = "git+https://github.com/quantinuum/hugr?branch=george%2Fdebuginfo#4ebb9b8e2e4cdbc62117c65f86ca26bbc145350e" dependencies = [ "base64", "cgmath", @@ -1217,7 +1217,7 @@ dependencies = [ [[package]] name = "hugr-llvm" version = "0.27.0" -source = "git+https://github.com/quantinuum/hugr?branch=george%2Fdebuginfo#806fb94ce459bed6faf7f3d4dbdb5a942c5b2a00" +source = "git+https://github.com/quantinuum/hugr?branch=george%2Fdebuginfo#4ebb9b8e2e4cdbc62117c65f86ca26bbc145350e" dependencies = [ "anyhow", "cc", @@ -1237,7 +1237,7 @@ dependencies = [ [[package]] name = "hugr-model" version = "0.27.0" -source = "git+https://github.com/quantinuum/hugr?branch=george%2Fdebuginfo#806fb94ce459bed6faf7f3d4dbdb5a942c5b2a00" +source = "git+https://github.com/quantinuum/hugr?branch=george%2Fdebuginfo#4ebb9b8e2e4cdbc62117c65f86ca26bbc145350e" dependencies = [ "base64", "bumpalo", @@ -2247,7 +2247,7 @@ dependencies = [ "derive_more 0.99.20", "fxhash", "itertools 0.13.0", - "petgraph 0.8.3", + "petgraph 0.6.5", "serde", "slotmap_fork_lmondada", "thiserror 1.0.69", diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-discard_qb_array/discard_qb_array_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-discard_qb_array/discard_qb_array_aarch64-apple-darwin index c38aa64a4..cf39d3ddb 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-discard_qb_array/discard_qb_array_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-discard_qb_array/discard_qb_array_aarch64-apple-darwin @@ -392,7 +392,7 @@ attributes #0 = { noreturn } !25 = !DILocation(line: 392, column: 4, scope: !11, inlinedAt: !26) !26 = distinct !DILocation(line: 392, column: 4, scope: !11, inlinedAt: !20) !27 = !DILocation(line: 392, column: 4, scope: !11, inlinedAt: !20) -!28 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !29, type: !30, spFlags: DISPFlagDefinition, unit: !1) +!28 = distinct !DISubprogram(name: "qmain", linkageName: "qmain", scope: null, file: !29, type: !30, spFlags: DISPFlagDefinition, unit: !1) !29 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") !30 = !DISubroutineType(types: !31) !31 = !{!18, !18} diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-flip_some/flip_some_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-flip_some/flip_some_aarch64-apple-darwin index 32e9fd682..2f6c7ab3e 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-flip_some/flip_some_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-flip_some/flip_some_aarch64-apple-darwin @@ -133,7 +133,7 @@ attributes #0 = { noreturn } !16 = !DILocation(line: 84, column: 8, scope: !4) !17 = !DILocation(line: 81, column: 8, scope: !4) !18 = !DILocation(line: 85, column: 8, scope: !4) -!19 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !20, type: !21, spFlags: DISPFlagDefinition, unit: !1) +!19 = distinct !DISubprogram(name: "qmain", linkageName: "qmain", scope: null, file: !20, type: !21, spFlags: DISPFlagDefinition, unit: !1) !20 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") !21 = !DISubroutineType(types: !22) !22 = !{!23, !23} diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-measure_qb_array/measure_qb_array_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-measure_qb_array/measure_qb_array_aarch64-apple-darwin index d53e7915c..cbc2ada33 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-measure_qb_array/measure_qb_array_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-measure_qb_array/measure_qb_array_aarch64-apple-darwin @@ -532,7 +532,7 @@ attributes #0 = { noreturn } !56 = !DILocation(line: 103, column: 10, scope: !4, inlinedAt: !57) !57 = distinct !DILocation(line: 274, column: 19, scope: !45, inlinedAt: !53) !58 = !DILocation(line: 273, column: 11, scope: !45, inlinedAt: !53) -!59 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !60, type: !61, spFlags: DISPFlagDefinition, unit: !1) +!59 = distinct !DISubprogram(name: "qmain", linkageName: "qmain", scope: null, file: !60, type: !61, spFlags: DISPFlagDefinition, unit: !1) !60 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") !61 = !DISubroutineType(types: !62) !62 = !{!36, !36} diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-no_results/no_results_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-no_results/no_results_aarch64-apple-darwin index dd5169a69..df22866bb 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-no_results/no_results_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-no_results/no_results_aarch64-apple-darwin @@ -70,7 +70,7 @@ attributes #0 = { noreturn } !7 = !{null} !8 = !DILocation(line: 65, column: 20, scope: !4) !9 = !DILocation(line: 66, column: 8, scope: !4) -!10 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !11, type: !12, spFlags: DISPFlagDefinition, unit: !1) +!10 = distinct !DISubprogram(name: "qmain", linkageName: "qmain", scope: null, file: !11, type: !12, spFlags: DISPFlagDefinition, unit: !1) !11 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") !12 = !DISubroutineType(types: !13) !13 = !{!14, !14} diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-postselect_exit/postselect_exit_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-postselect_exit/postselect_exit_aarch64-apple-darwin index 7be3d51b8..358d4805b 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-postselect_exit/postselect_exit_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-postselect_exit/postselect_exit_aarch64-apple-darwin @@ -92,7 +92,7 @@ attributes #0 = { noreturn } !9 = !DILocation(line: 133, column: 8, scope: !4) !10 = !DILocation(line: 137, column: 8, scope: !4) !11 = !DILocation(line: 136, column: 12, scope: !4) -!12 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !13, type: !14, spFlags: DISPFlagDefinition, unit: !1) +!12 = distinct !DISubprogram(name: "qmain", linkageName: "qmain", scope: null, file: !13, type: !14, spFlags: DISPFlagDefinition, unit: !1) !13 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") !14 = !DISubroutineType(types: !15) !15 = !{!16, !16} diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-postselect_panic/postselect_panic_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-postselect_panic/postselect_panic_aarch64-apple-darwin index 9a2bd54b5..7d1a561f7 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-postselect_panic/postselect_panic_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-postselect_panic/postselect_panic_aarch64-apple-darwin @@ -92,7 +92,7 @@ attributes #0 = { noreturn } !9 = !DILocation(line: 146, column: 8, scope: !4) !10 = !DILocation(line: 150, column: 8, scope: !4) !11 = !DILocation(line: 149, column: 12, scope: !4) -!12 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !13, type: !14, spFlags: DISPFlagDefinition, unit: !1) +!12 = distinct !DISubprogram(name: "qmain", linkageName: "qmain", scope: null, file: !13, type: !14, spFlags: DISPFlagDefinition, unit: !1) !13 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") !14 = !DISubroutineType(types: !15) !15 = !{!16, !16} diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-print_current_shot/print_current_shot_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-print_current_shot/print_current_shot_aarch64-apple-darwin index 2c054a4e3..ed52d3abc 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-print_current_shot/print_current_shot_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-print_current_shot/print_current_shot_aarch64-apple-darwin @@ -43,7 +43,7 @@ declare i64 @teardown() local_unnamed_addr !7 = !{null} !8 = !DILocation(line: 195, column: 23, scope: !4) !9 = !DILocation(line: 195, column: 8, scope: !4) -!10 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !11, type: !12, spFlags: DISPFlagDefinition, unit: !1) +!10 = distinct !DISubprogram(name: "qmain", linkageName: "qmain", scope: null, file: !11, type: !12, spFlags: DISPFlagDefinition, unit: !1) !11 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") !12 = !DISubroutineType(types: !13) !13 = !{!14, !14} diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-rng/rng_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-rng/rng_aarch64-apple-darwin index 700e60d31..02d59c7f9 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-rng/rng_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-rng/rng_aarch64-apple-darwin @@ -98,7 +98,7 @@ declare i64 @teardown() local_unnamed_addr !30 = !DILocation(line: 218, column: 8, scope: !4) !31 = !DILocation(line: 219, column: 8, scope: !4) !32 = !DILocation(line: 220, column: 8, scope: !4) -!33 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !34, type: !35, spFlags: DISPFlagDefinition, unit: !1) +!33 = distinct !DISubprogram(name: "qmain", linkageName: "qmain", scope: null, file: !34, type: !35, spFlags: DISPFlagDefinition, unit: !1) !34 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") !35 = !DISubroutineType(types: !36) !36 = !{!15, !15} diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-rus/rus_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-rus/rus_aarch64-apple-darwin index b8197fce9..261e661bf 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-rus/rus_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-rus/rus_aarch64-apple-darwin @@ -162,6 +162,6 @@ attributes #0 = { noreturn } !25 = !DILocation(line: 175, column: 12, scope: !10, inlinedAt: !14) !26 = !DILocation(line: 181, column: 12, scope: !10, inlinedAt: !14) !27 = !DILocation(line: 187, column: 8, scope: !4) -!28 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !29, type: !11, spFlags: DISPFlagDefinition, unit: !1) +!28 = distinct !DISubprogram(name: "qmain", linkageName: "qmain", scope: null, file: !29, type: !11, spFlags: DISPFlagDefinition, unit: !1) !29 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") !30 = !DILocation(line: 0, scope: !28) diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-discard_qb_array/discard_qb_array_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-discard_qb_array/discard_qb_array_x86_64-apple-darwin index aed473f76..24ec6374c 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-discard_qb_array/discard_qb_array_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-discard_qb_array/discard_qb_array_x86_64-apple-darwin @@ -401,7 +401,7 @@ attributes #0 = { noreturn } !25 = !DILocation(line: 392, column: 4, scope: !11, inlinedAt: !26) !26 = distinct !DILocation(line: 392, column: 4, scope: !11, inlinedAt: !20) !27 = !DILocation(line: 392, column: 4, scope: !11, inlinedAt: !20) -!28 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !29, type: !30, spFlags: DISPFlagDefinition, unit: !1) +!28 = distinct !DISubprogram(name: "qmain", linkageName: "qmain", scope: null, file: !29, type: !30, spFlags: DISPFlagDefinition, unit: !1) !29 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") !30 = !DISubroutineType(types: !31) !31 = !{!18, !18} diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-flip_some/flip_some_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-flip_some/flip_some_x86_64-apple-darwin index 734caf448..591fc3b9f 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-flip_some/flip_some_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-flip_some/flip_some_x86_64-apple-darwin @@ -133,7 +133,7 @@ attributes #0 = { noreturn } !16 = !DILocation(line: 84, column: 8, scope: !4) !17 = !DILocation(line: 81, column: 8, scope: !4) !18 = !DILocation(line: 85, column: 8, scope: !4) -!19 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !20, type: !21, spFlags: DISPFlagDefinition, unit: !1) +!19 = distinct !DISubprogram(name: "qmain", linkageName: "qmain", scope: null, file: !20, type: !21, spFlags: DISPFlagDefinition, unit: !1) !20 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") !21 = !DISubroutineType(types: !22) !22 = !{!23, !23} diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-measure_qb_array/measure_qb_array_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-measure_qb_array/measure_qb_array_x86_64-apple-darwin index b00f92367..f3acc089a 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-measure_qb_array/measure_qb_array_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-measure_qb_array/measure_qb_array_x86_64-apple-darwin @@ -704,7 +704,7 @@ attributes #0 = { noreturn } !56 = !DILocation(line: 103, column: 10, scope: !4, inlinedAt: !57) !57 = distinct !DILocation(line: 274, column: 19, scope: !45, inlinedAt: !53) !58 = !DILocation(line: 273, column: 11, scope: !45, inlinedAt: !53) -!59 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !60, type: !61, spFlags: DISPFlagDefinition, unit: !1) +!59 = distinct !DISubprogram(name: "qmain", linkageName: "qmain", scope: null, file: !60, type: !61, spFlags: DISPFlagDefinition, unit: !1) !60 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") !61 = !DISubroutineType(types: !62) !62 = !{!36, !36} diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-no_results/no_results_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-no_results/no_results_x86_64-apple-darwin index c803dc3ff..a4231ba53 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-no_results/no_results_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-no_results/no_results_x86_64-apple-darwin @@ -70,7 +70,7 @@ attributes #0 = { noreturn } !7 = !{null} !8 = !DILocation(line: 65, column: 20, scope: !4) !9 = !DILocation(line: 66, column: 8, scope: !4) -!10 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !11, type: !12, spFlags: DISPFlagDefinition, unit: !1) +!10 = distinct !DISubprogram(name: "qmain", linkageName: "qmain", scope: null, file: !11, type: !12, spFlags: DISPFlagDefinition, unit: !1) !11 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") !12 = !DISubroutineType(types: !13) !13 = !{!14, !14} diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-postselect_exit/postselect_exit_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-postselect_exit/postselect_exit_x86_64-apple-darwin index dbdd8a2e2..871710e73 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-postselect_exit/postselect_exit_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-postselect_exit/postselect_exit_x86_64-apple-darwin @@ -92,7 +92,7 @@ attributes #0 = { noreturn } !9 = !DILocation(line: 133, column: 8, scope: !4) !10 = !DILocation(line: 137, column: 8, scope: !4) !11 = !DILocation(line: 136, column: 12, scope: !4) -!12 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !13, type: !14, spFlags: DISPFlagDefinition, unit: !1) +!12 = distinct !DISubprogram(name: "qmain", linkageName: "qmain", scope: null, file: !13, type: !14, spFlags: DISPFlagDefinition, unit: !1) !13 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") !14 = !DISubroutineType(types: !15) !15 = !{!16, !16} diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-postselect_panic/postselect_panic_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-postselect_panic/postselect_panic_x86_64-apple-darwin index d8b99f675..f22baba7c 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-postselect_panic/postselect_panic_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-postselect_panic/postselect_panic_x86_64-apple-darwin @@ -92,7 +92,7 @@ attributes #0 = { noreturn } !9 = !DILocation(line: 146, column: 8, scope: !4) !10 = !DILocation(line: 150, column: 8, scope: !4) !11 = !DILocation(line: 149, column: 12, scope: !4) -!12 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !13, type: !14, spFlags: DISPFlagDefinition, unit: !1) +!12 = distinct !DISubprogram(name: "qmain", linkageName: "qmain", scope: null, file: !13, type: !14, spFlags: DISPFlagDefinition, unit: !1) !13 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") !14 = !DISubroutineType(types: !15) !15 = !{!16, !16} diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-print_current_shot/print_current_shot_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-print_current_shot/print_current_shot_x86_64-apple-darwin index 954cbffb7..bfef10ffc 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-print_current_shot/print_current_shot_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-print_current_shot/print_current_shot_x86_64-apple-darwin @@ -43,7 +43,7 @@ declare i64 @teardown() local_unnamed_addr !7 = !{null} !8 = !DILocation(line: 195, column: 23, scope: !4) !9 = !DILocation(line: 195, column: 8, scope: !4) -!10 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !11, type: !12, spFlags: DISPFlagDefinition, unit: !1) +!10 = distinct !DISubprogram(name: "qmain", linkageName: "qmain", scope: null, file: !11, type: !12, spFlags: DISPFlagDefinition, unit: !1) !11 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") !12 = !DISubroutineType(types: !13) !13 = !{!14, !14} diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-rng/rng_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-rng/rng_x86_64-apple-darwin index 8d3201680..2543ea77b 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-rng/rng_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-rng/rng_x86_64-apple-darwin @@ -98,7 +98,7 @@ declare i64 @teardown() local_unnamed_addr !30 = !DILocation(line: 218, column: 8, scope: !4) !31 = !DILocation(line: 219, column: 8, scope: !4) !32 = !DILocation(line: 220, column: 8, scope: !4) -!33 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !34, type: !35, spFlags: DISPFlagDefinition, unit: !1) +!33 = distinct !DISubprogram(name: "qmain", linkageName: "qmain", scope: null, file: !34, type: !35, spFlags: DISPFlagDefinition, unit: !1) !34 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") !35 = !DISubroutineType(types: !36) !36 = !{!15, !15} diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-rus/rus_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-rus/rus_x86_64-apple-darwin index edf1ec6e7..a97de453f 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-rus/rus_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-rus/rus_x86_64-apple-darwin @@ -162,6 +162,6 @@ attributes #0 = { noreturn } !25 = !DILocation(line: 175, column: 12, scope: !10, inlinedAt: !14) !26 = !DILocation(line: 181, column: 12, scope: !10, inlinedAt: !14) !27 = !DILocation(line: 187, column: 8, scope: !4) -!28 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !29, type: !11, spFlags: DISPFlagDefinition, unit: !1) +!28 = distinct !DISubprogram(name: "qmain", linkageName: "qmain", scope: null, file: !29, type: !11, spFlags: DISPFlagDefinition, unit: !1) !29 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") !30 = !DILocation(line: 0, scope: !28) diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-discard_qb_array/discard_qb_array_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-discard_qb_array/discard_qb_array_x86_64-unknown-linux-gnu index e250e09b1..86eb72ab6 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-discard_qb_array/discard_qb_array_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-discard_qb_array/discard_qb_array_x86_64-unknown-linux-gnu @@ -401,7 +401,7 @@ attributes #0 = { noreturn } !25 = !DILocation(line: 392, column: 4, scope: !11, inlinedAt: !26) !26 = distinct !DILocation(line: 392, column: 4, scope: !11, inlinedAt: !20) !27 = !DILocation(line: 392, column: 4, scope: !11, inlinedAt: !20) -!28 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !29, type: !30, spFlags: DISPFlagDefinition, unit: !1) +!28 = distinct !DISubprogram(name: "qmain", linkageName: "qmain", scope: null, file: !29, type: !30, spFlags: DISPFlagDefinition, unit: !1) !29 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") !30 = !DISubroutineType(types: !31) !31 = !{!18, !18} diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-flip_some/flip_some_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-flip_some/flip_some_x86_64-unknown-linux-gnu index be123ff59..8b43e04cd 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-flip_some/flip_some_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-flip_some/flip_some_x86_64-unknown-linux-gnu @@ -133,7 +133,7 @@ attributes #0 = { noreturn } !16 = !DILocation(line: 84, column: 8, scope: !4) !17 = !DILocation(line: 81, column: 8, scope: !4) !18 = !DILocation(line: 85, column: 8, scope: !4) -!19 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !20, type: !21, spFlags: DISPFlagDefinition, unit: !1) +!19 = distinct !DISubprogram(name: "qmain", linkageName: "qmain", scope: null, file: !20, type: !21, spFlags: DISPFlagDefinition, unit: !1) !20 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") !21 = !DISubroutineType(types: !22) !22 = !{!23, !23} diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-measure_qb_array/measure_qb_array_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-measure_qb_array/measure_qb_array_x86_64-unknown-linux-gnu index 3b702ad35..770237bf2 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-measure_qb_array/measure_qb_array_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-measure_qb_array/measure_qb_array_x86_64-unknown-linux-gnu @@ -704,7 +704,7 @@ attributes #0 = { noreturn } !56 = !DILocation(line: 103, column: 10, scope: !4, inlinedAt: !57) !57 = distinct !DILocation(line: 274, column: 19, scope: !45, inlinedAt: !53) !58 = !DILocation(line: 273, column: 11, scope: !45, inlinedAt: !53) -!59 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !60, type: !61, spFlags: DISPFlagDefinition, unit: !1) +!59 = distinct !DISubprogram(name: "qmain", linkageName: "qmain", scope: null, file: !60, type: !61, spFlags: DISPFlagDefinition, unit: !1) !60 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") !61 = !DISubroutineType(types: !62) !62 = !{!36, !36} diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-no_results/no_results_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-no_results/no_results_x86_64-unknown-linux-gnu index 0499d2d4c..2b0bd5a60 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-no_results/no_results_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-no_results/no_results_x86_64-unknown-linux-gnu @@ -70,7 +70,7 @@ attributes #0 = { noreturn } !7 = !{null} !8 = !DILocation(line: 65, column: 20, scope: !4) !9 = !DILocation(line: 66, column: 8, scope: !4) -!10 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !11, type: !12, spFlags: DISPFlagDefinition, unit: !1) +!10 = distinct !DISubprogram(name: "qmain", linkageName: "qmain", scope: null, file: !11, type: !12, spFlags: DISPFlagDefinition, unit: !1) !11 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") !12 = !DISubroutineType(types: !13) !13 = !{!14, !14} diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-postselect_exit/postselect_exit_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-postselect_exit/postselect_exit_x86_64-unknown-linux-gnu index 543c442bb..38469c430 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-postselect_exit/postselect_exit_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-postselect_exit/postselect_exit_x86_64-unknown-linux-gnu @@ -92,7 +92,7 @@ attributes #0 = { noreturn } !9 = !DILocation(line: 133, column: 8, scope: !4) !10 = !DILocation(line: 137, column: 8, scope: !4) !11 = !DILocation(line: 136, column: 12, scope: !4) -!12 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !13, type: !14, spFlags: DISPFlagDefinition, unit: !1) +!12 = distinct !DISubprogram(name: "qmain", linkageName: "qmain", scope: null, file: !13, type: !14, spFlags: DISPFlagDefinition, unit: !1) !13 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") !14 = !DISubroutineType(types: !15) !15 = !{!16, !16} diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-postselect_panic/postselect_panic_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-postselect_panic/postselect_panic_x86_64-unknown-linux-gnu index e8054d2de..70c237edc 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-postselect_panic/postselect_panic_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-postselect_panic/postselect_panic_x86_64-unknown-linux-gnu @@ -92,7 +92,7 @@ attributes #0 = { noreturn } !9 = !DILocation(line: 146, column: 8, scope: !4) !10 = !DILocation(line: 150, column: 8, scope: !4) !11 = !DILocation(line: 149, column: 12, scope: !4) -!12 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !13, type: !14, spFlags: DISPFlagDefinition, unit: !1) +!12 = distinct !DISubprogram(name: "qmain", linkageName: "qmain", scope: null, file: !13, type: !14, spFlags: DISPFlagDefinition, unit: !1) !13 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") !14 = !DISubroutineType(types: !15) !15 = !{!16, !16} diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-print_current_shot/print_current_shot_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-print_current_shot/print_current_shot_x86_64-unknown-linux-gnu index 133f80e36..5b6f4a73a 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-print_current_shot/print_current_shot_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-print_current_shot/print_current_shot_x86_64-unknown-linux-gnu @@ -43,7 +43,7 @@ declare i64 @teardown() local_unnamed_addr !7 = !{null} !8 = !DILocation(line: 195, column: 23, scope: !4) !9 = !DILocation(line: 195, column: 8, scope: !4) -!10 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !11, type: !12, spFlags: DISPFlagDefinition, unit: !1) +!10 = distinct !DISubprogram(name: "qmain", linkageName: "qmain", scope: null, file: !11, type: !12, spFlags: DISPFlagDefinition, unit: !1) !11 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") !12 = !DISubroutineType(types: !13) !13 = !{!14, !14} diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-rng/rng_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-rng/rng_x86_64-unknown-linux-gnu index f4ebbecde..802e05075 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-rng/rng_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-rng/rng_x86_64-unknown-linux-gnu @@ -98,7 +98,7 @@ declare i64 @teardown() local_unnamed_addr !30 = !DILocation(line: 218, column: 8, scope: !4) !31 = !DILocation(line: 219, column: 8, scope: !4) !32 = !DILocation(line: 220, column: 8, scope: !4) -!33 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !34, type: !35, spFlags: DISPFlagDefinition, unit: !1) +!33 = distinct !DISubprogram(name: "qmain", linkageName: "qmain", scope: null, file: !34, type: !35, spFlags: DISPFlagDefinition, unit: !1) !34 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") !35 = !DISubroutineType(types: !36) !36 = !{!15, !15} diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-rus/rus_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-rus/rus_x86_64-unknown-linux-gnu index 012e3c910..9b2a555e5 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-rus/rus_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-rus/rus_x86_64-unknown-linux-gnu @@ -162,6 +162,6 @@ attributes #0 = { noreturn } !25 = !DILocation(line: 175, column: 12, scope: !10, inlinedAt: !14) !26 = !DILocation(line: 181, column: 12, scope: !10, inlinedAt: !14) !27 = !DILocation(line: 187, column: 8, scope: !4) -!28 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !29, type: !11, spFlags: DISPFlagDefinition, unit: !1) +!28 = distinct !DISubprogram(name: "qmain", linkageName: "qmain", scope: null, file: !29, type: !11, spFlags: DISPFlagDefinition, unit: !1) !29 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") !30 = !DILocation(line: 0, scope: !28) diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-discard_qb_array/discard_qb_array_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-discard_qb_array/discard_qb_array_x86_64-windows-msvc index ab9bd24bd..f9bb0b2b8 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-discard_qb_array/discard_qb_array_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-discard_qb_array/discard_qb_array_x86_64-windows-msvc @@ -401,7 +401,7 @@ attributes #0 = { noreturn } !25 = !DILocation(line: 392, column: 4, scope: !11, inlinedAt: !26) !26 = distinct !DILocation(line: 392, column: 4, scope: !11, inlinedAt: !20) !27 = !DILocation(line: 392, column: 4, scope: !11, inlinedAt: !20) -!28 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !29, type: !30, spFlags: DISPFlagDefinition, unit: !1) +!28 = distinct !DISubprogram(name: "qmain", linkageName: "qmain", scope: null, file: !29, type: !30, spFlags: DISPFlagDefinition, unit: !1) !29 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") !30 = !DISubroutineType(types: !31) !31 = !{!18, !18} diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-flip_some/flip_some_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-flip_some/flip_some_x86_64-windows-msvc index 2158bafd8..4ff3138cb 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-flip_some/flip_some_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-flip_some/flip_some_x86_64-windows-msvc @@ -133,7 +133,7 @@ attributes #0 = { noreturn } !16 = !DILocation(line: 84, column: 8, scope: !4) !17 = !DILocation(line: 81, column: 8, scope: !4) !18 = !DILocation(line: 85, column: 8, scope: !4) -!19 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !20, type: !21, spFlags: DISPFlagDefinition, unit: !1) +!19 = distinct !DISubprogram(name: "qmain", linkageName: "qmain", scope: null, file: !20, type: !21, spFlags: DISPFlagDefinition, unit: !1) !20 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") !21 = !DISubroutineType(types: !22) !22 = !{!23, !23} diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-measure_qb_array/measure_qb_array_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-measure_qb_array/measure_qb_array_x86_64-windows-msvc index 411bd8191..419d2b9a8 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-measure_qb_array/measure_qb_array_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-measure_qb_array/measure_qb_array_x86_64-windows-msvc @@ -704,7 +704,7 @@ attributes #0 = { noreturn } !56 = !DILocation(line: 103, column: 10, scope: !4, inlinedAt: !57) !57 = distinct !DILocation(line: 274, column: 19, scope: !45, inlinedAt: !53) !58 = !DILocation(line: 273, column: 11, scope: !45, inlinedAt: !53) -!59 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !60, type: !61, spFlags: DISPFlagDefinition, unit: !1) +!59 = distinct !DISubprogram(name: "qmain", linkageName: "qmain", scope: null, file: !60, type: !61, spFlags: DISPFlagDefinition, unit: !1) !60 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") !61 = !DISubroutineType(types: !62) !62 = !{!36, !36} diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-no_results/no_results_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-no_results/no_results_x86_64-windows-msvc index 3711c495a..3272e6249 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-no_results/no_results_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-no_results/no_results_x86_64-windows-msvc @@ -70,7 +70,7 @@ attributes #0 = { noreturn } !7 = !{null} !8 = !DILocation(line: 65, column: 20, scope: !4) !9 = !DILocation(line: 66, column: 8, scope: !4) -!10 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !11, type: !12, spFlags: DISPFlagDefinition, unit: !1) +!10 = distinct !DISubprogram(name: "qmain", linkageName: "qmain", scope: null, file: !11, type: !12, spFlags: DISPFlagDefinition, unit: !1) !11 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") !12 = !DISubroutineType(types: !13) !13 = !{!14, !14} diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-postselect_exit/postselect_exit_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-postselect_exit/postselect_exit_x86_64-windows-msvc index 2b718dadb..2b142ff01 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-postselect_exit/postselect_exit_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-postselect_exit/postselect_exit_x86_64-windows-msvc @@ -92,7 +92,7 @@ attributes #0 = { noreturn } !9 = !DILocation(line: 133, column: 8, scope: !4) !10 = !DILocation(line: 137, column: 8, scope: !4) !11 = !DILocation(line: 136, column: 12, scope: !4) -!12 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !13, type: !14, spFlags: DISPFlagDefinition, unit: !1) +!12 = distinct !DISubprogram(name: "qmain", linkageName: "qmain", scope: null, file: !13, type: !14, spFlags: DISPFlagDefinition, unit: !1) !13 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") !14 = !DISubroutineType(types: !15) !15 = !{!16, !16} diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-postselect_panic/postselect_panic_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-postselect_panic/postselect_panic_x86_64-windows-msvc index caf9eab07..4012ba1cc 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-postselect_panic/postselect_panic_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-postselect_panic/postselect_panic_x86_64-windows-msvc @@ -92,7 +92,7 @@ attributes #0 = { noreturn } !9 = !DILocation(line: 146, column: 8, scope: !4) !10 = !DILocation(line: 150, column: 8, scope: !4) !11 = !DILocation(line: 149, column: 12, scope: !4) -!12 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !13, type: !14, spFlags: DISPFlagDefinition, unit: !1) +!12 = distinct !DISubprogram(name: "qmain", linkageName: "qmain", scope: null, file: !13, type: !14, spFlags: DISPFlagDefinition, unit: !1) !13 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") !14 = !DISubroutineType(types: !15) !15 = !{!16, !16} diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-print_current_shot/print_current_shot_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-print_current_shot/print_current_shot_x86_64-windows-msvc index ff20d6479..324ca126f 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-print_current_shot/print_current_shot_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-print_current_shot/print_current_shot_x86_64-windows-msvc @@ -43,7 +43,7 @@ declare i64 @teardown() local_unnamed_addr !7 = !{null} !8 = !DILocation(line: 195, column: 23, scope: !4) !9 = !DILocation(line: 195, column: 8, scope: !4) -!10 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !11, type: !12, spFlags: DISPFlagDefinition, unit: !1) +!10 = distinct !DISubprogram(name: "qmain", linkageName: "qmain", scope: null, file: !11, type: !12, spFlags: DISPFlagDefinition, unit: !1) !11 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") !12 = !DISubroutineType(types: !13) !13 = !{!14, !14} diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-rng/rng_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-rng/rng_x86_64-windows-msvc index 2c4553e01..c0a74200b 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-rng/rng_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-rng/rng_x86_64-windows-msvc @@ -98,7 +98,7 @@ declare i64 @teardown() local_unnamed_addr !30 = !DILocation(line: 218, column: 8, scope: !4) !31 = !DILocation(line: 219, column: 8, scope: !4) !32 = !DILocation(line: 220, column: 8, scope: !4) -!33 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !34, type: !35, spFlags: DISPFlagDefinition, unit: !1) +!33 = distinct !DISubprogram(name: "qmain", linkageName: "qmain", scope: null, file: !34, type: !35, spFlags: DISPFlagDefinition, unit: !1) !34 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") !35 = !DISubroutineType(types: !36) !36 = !{!15, !15} diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-rus/rus_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-rus/rus_x86_64-windows-msvc index c1be11f51..40deb85c3 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-rus/rus_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-rus/rus_x86_64-windows-msvc @@ -162,6 +162,6 @@ attributes #0 = { noreturn } !25 = !DILocation(line: 175, column: 12, scope: !10, inlinedAt: !14) !26 = !DILocation(line: 181, column: 12, scope: !10, inlinedAt: !14) !27 = !DILocation(line: 187, column: 8, scope: !4) -!28 = distinct !DISubprogram(name: "main", linkageName: "qmain", scope: null, file: !29, type: !11, spFlags: DISPFlagDefinition, unit: !1) +!28 = distinct !DISubprogram(name: "qmain", linkageName: "qmain", scope: null, file: !29, type: !11, spFlags: DISPFlagDefinition, unit: !1) !29 = !DIFile(filename: "COMPILER_GENERATED_CODE", directory: "") !30 = !DILocation(line: 0, scope: !28) diff --git a/qis-compiler/rust/lib.rs b/qis-compiler/rust/lib.rs index 9ca2cd084..816a70855 100644 --- a/qis-compiler/rust/lib.rs +++ b/qis-compiler/rust/lib.rs @@ -135,11 +135,16 @@ fn get_hugr_llvm_module<'c, 'hugr, 'a: 'c>( module_name: impl AsRef, exts: Rc>, emit_debug: bool, + ptr_bits: u32, ) -> Result<(Module<'c>, Option>)> { let module = context.create_module(module_name.as_ref()); let emit = EmitHugr::new(context, module, namer, exts); Ok(emit - .emit_module(hugr.try_fat(hugr.module_root()).unwrap(), emit_debug)? + .emit_module( + hugr.try_fat(hugr.module_root()).unwrap(), + emit_debug, + ptr_bits, + )? .finish()) } @@ -189,6 +194,9 @@ fn get_module_with_std_exts<'c>( let file = fs::File::create(PathBuf::from(filename))?; hugr.store(file, EnvelopeConfig::text())?; } + let ptr_bits = context + .ptr_sized_int_type(&args.target_machine.get_target_data(), Default::default()) + .get_bit_width(); get_hugr_llvm_module( context, namer, @@ -196,6 +204,7 @@ fn get_module_with_std_exts<'c>( &args.name, Rc::new(codegen_extensions()), emit_debug, + ptr_bits, ) } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@llvm21_2.snap index 8172f7fb3..7346e4787 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@llvm21_2.snap @@ -40,13 +40,13 @@ declare void @print_state_result(ptr, i64, ptr) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !7} !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ ptr, i64 }", file: !2, size: 16, align: 8, elements: !8) !8 = !{!9, !10} !9 = !DIBasicType(name: "ptr", size: 64, encoding: DW_ATE_address) !10 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!11 = !DILocation(line: 5299, column: 65, scope: !3) +!11 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@pre-mem2reg@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@pre-mem2reg@llvm21_2.snap index 905b04933..b05493169 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@pre-mem2reg@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@pre-mem2reg@llvm21_2.snap @@ -49,13 +49,13 @@ declare void @print_state_result(ptr, i64, ptr) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !7} !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ ptr, i64 }", file: !2, size: 16, align: 8, elements: !8) !8 = !{!9, !10} !9 = !DIBasicType(name: "ptr", size: 64, encoding: DW_ATE_address) !10 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!11 = !DILocation(line: 5299, column: 65, scope: !3) +!11 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_1.snap index d118124a6..7b458aa5f 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_1.snap @@ -25,11 +25,11 @@ declare void @___dec_future_refcount(i64) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !8} !7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) !8 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!9 = !DILocation(line: 5299, column: 65, scope: !3) +!9 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_2.snap index 8a5a32420..18a720983 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_2.snap @@ -23,12 +23,12 @@ declare void @___inc_future_refcount(i64) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !9} !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i64, i64 }", file: !2, size: 16, align: 8, elements: !8) !8 = !{!9, !9} !9 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!10 = !DILocation(line: 5299, column: 65, scope: !3) +!10 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_3.snap index 0e2716153..6ab3a80cd 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_3.snap @@ -21,10 +21,10 @@ declare void @___dec_future_refcount(i64) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{null, !7} !7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_4.snap index 9e2ac5419..fc6e4ec7a 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_4.snap @@ -24,10 +24,10 @@ declare void @___dec_future_refcount(i64) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !7} !7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_5.snap index 8a5a32420..18a720983 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_5.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_5.snap @@ -23,12 +23,12 @@ declare void @___inc_future_refcount(i64) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !9} !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i64, i64 }", file: !2, size: 16, align: 8, elements: !8) !8 = !{!9, !9} !9 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!10 = !DILocation(line: 5299, column: 65, scope: !3) +!10 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_6.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_6.snap index 0e2716153..6ab3a80cd 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_6.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_6.snap @@ -21,10 +21,10 @@ declare void @___dec_future_refcount(i64) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{null, !7} !7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_1.snap index 6fbc6c659..4e60fbccf 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_1.snap @@ -34,11 +34,11 @@ declare void @___dec_future_refcount(i64) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !8} !7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) !8 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!9 = !DILocation(line: 5299, column: 65, scope: !3) +!9 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_2.snap index 24362b771..26fb8d770 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_2.snap @@ -38,12 +38,12 @@ declare void @___inc_future_refcount(i64) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !9} !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i64, i64 }", file: !2, size: 16, align: 8, elements: !8) !8 = !{!9, !9} !9 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!10 = !DILocation(line: 5299, column: 65, scope: !3) +!10 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_3.snap index 7a720732f..7b0d3fa7e 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_3.snap @@ -24,10 +24,10 @@ declare void @___dec_future_refcount(i64) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{null, !7} !7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_4.snap index eafd7da3d..c99874439 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_4.snap @@ -33,10 +33,10 @@ declare void @___dec_future_refcount(i64) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !7} !7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_5.snap index 24362b771..26fb8d770 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_5.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_5.snap @@ -38,12 +38,12 @@ declare void @___inc_future_refcount(i64) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !9} !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i64, i64 }", file: !2, size: 16, align: 8, elements: !8) !8 = !{!9, !9} !9 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!10 = !DILocation(line: 5299, column: 65, scope: !3) +!10 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_6.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_6.snap index 7a720732f..7b0d3fa7e 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_6.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_6.snap @@ -24,10 +24,10 @@ declare void @___dec_future_refcount(i64) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{null, !7} !7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@llvm21_0.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@llvm21_0.snap index 316f95a01..f3cd4a3be 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@llvm21_0.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@llvm21_0.snap @@ -30,12 +30,12 @@ attributes #0 = { noreturn } !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !9, !9} !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i64, i64 }", file: !2, size: 16, align: 8, elements: !8) !8 = !{!9, !9} !9 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!10 = !DILocation(line: 5299, column: 65, scope: !3) +!10 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@pre-mem2reg@llvm21_0.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@pre-mem2reg@llvm21_0.snap index a28c7032b..f8402532e 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@pre-mem2reg@llvm21_0.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@pre-mem2reg@llvm21_0.snap @@ -51,12 +51,12 @@ attributes #0 = { noreturn } !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !9, !9} !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i64, i64 }", file: !2, size: 16, align: 8, elements: !8) !8 = !{!9, !9} !9 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!10 = !DILocation(line: 5299, column: 65, scope: !3) +!10 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@llvm21_0.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@llvm21_0.snap index c155d1330..fc0f22bfc 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@llvm21_0.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@llvm21_0.snap @@ -31,12 +31,12 @@ attributes #0 = { noreturn } !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !9, !9} !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i64, i64 }", file: !2, size: 16, align: 8, elements: !8) !8 = !{!9, !9} !9 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!10 = !DILocation(line: 5299, column: 65, scope: !3) +!10 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@pre-mem2reg@llvm21_0.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@pre-mem2reg@llvm21_0.snap index bc5045219..56260ebd8 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@pre-mem2reg@llvm21_0.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@pre-mem2reg@llvm21_0.snap @@ -52,12 +52,12 @@ attributes #0 = { noreturn } !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !9, !9} !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i64, i64 }", file: !2, size: 16, align: 8, elements: !8) !8 = !{!9, !9} !9 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!10 = !DILocation(line: 5299, column: 65, scope: !3) +!10 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_1.snap index 6113ee876..ee7cf84ea 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_1.snap @@ -21,11 +21,11 @@ declare void @___rz(i64, double) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !7, !8} !7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) !8 = !DIBasicType(name: "f64", size: 64, encoding: DW_ATE_float) -!9 = !DILocation(line: 5299, column: 65, scope: !3) +!9 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_10.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_10.snap index 5388c0ca7..9465e5103 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_10.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_10.snap @@ -24,10 +24,10 @@ declare void @___qfree(i64) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !7} !7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_2.snap index 0cfd93fe4..9dc97dbc1 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_2.snap @@ -23,13 +23,13 @@ declare void @___rzz(i64, i64, double) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !9, !9, !10} !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i64, i64 }", file: !2, size: 16, align: 8, elements: !8) !8 = !{!9, !9} !9 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) !10 = !DIBasicType(name: "f64", size: 64, encoding: DW_ATE_float) -!11 = !DILocation(line: 5299, column: 65, scope: !3) +!11 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_3.snap index 7ddd0e285..5acc325f2 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_3.snap @@ -21,11 +21,11 @@ declare void @___rxy(i64, double, double) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !7, !8, !8} !7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) !8 = !DIBasicType(name: "f64", size: 64, encoding: DW_ATE_float) -!9 = !DILocation(line: 5299, column: 65, scope: !3) +!9 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_4.snap index 29166b04d..c983b5d66 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_4.snap @@ -25,13 +25,13 @@ declare void @___qfree(i64) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/ZsHeDgUnyeIVwAutKJHaZEPSZwPXP/ycUvnujGxZKPRCTcNfs/EGLoPGCKHhMq/zeCBZoPGeHBxpWCFCAIgmDOG") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !10} !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i1, i64, i1 }", file: !2, size: 8, align: 8, elements: !8) !8 = !{!9, !10, !9} !9 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) !10 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!11 = !DILocation(line: 27583, column: 497, scope: !3) +!11 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_5.snap index 52bcadf63..1050125e5 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_5.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_5.snap @@ -24,10 +24,10 @@ declare void @___qfree(i64) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !7} !7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_6.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_6.snap index 413865bee..74b7860b9 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_6.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_6.snap @@ -33,13 +33,13 @@ declare void @___reset(i64) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7} !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i1, i64 }", file: !2, size: 8, align: 8, elements: !8) !8 = !{!9, !10} !9 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) !10 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!11 = !DILocation(line: 5299, column: 65, scope: !3) +!11 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_7.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_7.snap index f80ea63f0..ca56683e1 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_7.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_7.snap @@ -21,10 +21,10 @@ declare void @___qfree(i64) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{null, !7} !7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_8.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_8.snap index 4d4d6bc2f..a1f01863d 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_8.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_8.snap @@ -21,10 +21,10 @@ declare void @___reset(i64) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !7} !7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_9.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_9.snap index 9df9b97f3..52beaf24e 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_9.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_9.snap @@ -27,9 +27,9 @@ declare void @___reset(i64) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/ZsHeDgUnyeIVwAutKJHaZEPSZwPXP/ycUvnujGxZKPRCTcNfs/EGLoPGCKHhMq/zeCBZoPGeHBxpWCFCAIgmDOG") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !9} !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i64, { i1, i64, i1 } }", file: !2, size: 16, align: 8, elements: !8) @@ -38,4 +38,4 @@ declare void @___reset(i64) !10 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i1, i64, i1 }", file: !2, size: 8, align: 8, elements: !11) !11 = !{!12, !9, !12} !12 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) -!13 = !DILocation(line: 27583, column: 497, scope: !3) +!13 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_1.snap index 6f25eb9d8..8b518ff49 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_1.snap @@ -33,11 +33,11 @@ declare void @___rz(i64, double) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !7, !8} !7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) !8 = !DIBasicType(name: "f64", size: 64, encoding: DW_ATE_float) -!9 = !DILocation(line: 5299, column: 65, scope: !3) +!9 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_10.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_10.snap index ec57ece0f..e1e647188 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_10.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_10.snap @@ -33,10 +33,10 @@ declare void @___qfree(i64) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !7} !7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_2.snap index 0b1bfa44d..7930a7849 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_2.snap @@ -44,13 +44,13 @@ declare void @___rzz(i64, i64, double) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !9, !9, !10} !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i64, i64 }", file: !2, size: 16, align: 8, elements: !8) !8 = !{!9, !9} !9 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) !10 = !DIBasicType(name: "f64", size: 64, encoding: DW_ATE_float) -!11 = !DILocation(line: 5299, column: 65, scope: !3) +!11 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_3.snap index f5cb3ad99..48bfb5edb 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_3.snap @@ -36,11 +36,11 @@ declare void @___rxy(i64, double, double) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !7, !8, !8} !7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) !8 = !DIBasicType(name: "f64", size: 64, encoding: DW_ATE_float) -!9 = !DILocation(line: 5299, column: 65, scope: !3) +!9 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_4.snap index 8e581fab4..77e9e41c1 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_4.snap @@ -43,13 +43,13 @@ declare void @___qfree(i64) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/ZsHeDgUnyeIVwAutKJHaZEPSZwPXP/ycUvnujGxZKPRCTcNfs/EGLoPGCKHhMq/zeCBZoPGeHBxpWCFCAIgmDOG") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !10} !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i1, i64, i1 }", file: !2, size: 8, align: 8, elements: !8) !8 = !{!9, !10, !9} !9 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) !10 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!11 = !DILocation(line: 27583, column: 497, scope: !3) +!11 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_5.snap index 362921e93..4dcd00614 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_5.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_5.snap @@ -33,10 +33,10 @@ declare void @___qfree(i64) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !7} !7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_6.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_6.snap index 34de8d3db..c5f3d1d06 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_6.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_6.snap @@ -39,13 +39,13 @@ declare void @___reset(i64) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7} !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i1, i64 }", file: !2, size: 8, align: 8, elements: !8) !8 = !{!9, !10} !9 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) !10 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!11 = !DILocation(line: 5299, column: 65, scope: !3) +!11 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_7.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_7.snap index 2d597cc94..094c4ec6b 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_7.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_7.snap @@ -24,10 +24,10 @@ declare void @___qfree(i64) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{null, !7} !7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_8.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_8.snap index 04bba2255..73f258bf1 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_8.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_8.snap @@ -30,10 +30,10 @@ declare void @___reset(i64) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !7} !7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_9.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_9.snap index 1039352ff..5534c4632 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_9.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_9.snap @@ -54,9 +54,9 @@ declare void @___reset(i64) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/ZsHeDgUnyeIVwAutKJHaZEPSZwPXP/ycUvnujGxZKPRCTcNfs/EGLoPGCKHhMq/zeCBZoPGeHBxpWCFCAIgmDOG") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !9} !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i64, { i1, i64, i1 } }", file: !2, size: 16, align: 8, elements: !8) @@ -65,4 +65,4 @@ declare void @___reset(i64) !10 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i1, i64, i1 }", file: !2, size: 8, align: 8, elements: !11) !11 = !{!12, !9, !12} !12 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) -!13 = !DILocation(line: 27583, column: 497, scope: !3) +!13 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21.snap index 8ec684868..856728ff4 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21.snap @@ -21,12 +21,12 @@ declare void @random_advance(i64) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !7, !9} !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{}", file: !2, align: 8, elements: !8) !8 = !{} !9 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!10 = !DILocation(line: 5299, column: 65, scope: !3) +!10 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_1.snap index 9a103cbe6..0df5c38fc 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_1.snap @@ -23,9 +23,9 @@ declare i32 @random_int() !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !10} !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i32, {} }", file: !2, size: 4, align: 8, elements: !8) @@ -33,4 +33,4 @@ declare i32 @random_int() !9 = !DIBasicType(name: "i32", size: 32, encoding: DW_ATE_unsigned) !10 = !DICompositeType(tag: DW_TAG_structure_type, name: "{}", file: !2, align: 8, elements: !11) !11 = !{} -!12 = !DILocation(line: 5299, column: 65, scope: !3) +!12 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_2.snap index dcc04ad7f..2ab14e357 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_2.snap @@ -23,9 +23,9 @@ declare double @random_float() !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !10} !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ double, {} }", file: !2, size: 8, align: 8, elements: !8) @@ -33,4 +33,4 @@ declare double @random_float() !9 = !DIBasicType(name: "f64", size: 64, encoding: DW_ATE_float) !10 = !DICompositeType(tag: DW_TAG_structure_type, name: "{}", file: !2, align: 8, elements: !11) !11 = !{} -!12 = !DILocation(line: 5299, column: 65, scope: !3) +!12 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_3.snap index 69cf5419d..9966edf6b 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_3.snap @@ -23,9 +23,9 @@ declare i32 @random_rng(i32) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !10, !9} !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i32, {} }", file: !2, size: 4, align: 8, elements: !8) @@ -33,4 +33,4 @@ declare i32 @random_rng(i32) !9 = !DIBasicType(name: "i32", size: 32, encoding: DW_ATE_unsigned) !10 = !DICompositeType(tag: DW_TAG_structure_type, name: "{}", file: !2, align: 8, elements: !11) !11 = !{} -!12 = !DILocation(line: 5299, column: 65, scope: !3) +!12 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_4.snap index e6efd23f7..a1e8ab880 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_4.snap @@ -21,11 +21,11 @@ declare void @random_seed(i64) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !8} !7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) !8 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!9 = !DILocation(line: 5299, column: 65, scope: !3) +!9 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_5.snap index e2b63d60e..d4b3694dd 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_5.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_5.snap @@ -18,9 +18,9 @@ entry_block: ; preds = %alloca_block !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{null, !7} !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{}", file: !2, align: 8, elements: !8) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21.snap index 625d8a62a..5a2a4d785 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21.snap @@ -33,12 +33,12 @@ declare void @random_advance(i64) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !7, !9} !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{}", file: !2, align: 8, elements: !8) !8 = !{} !9 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!10 = !DILocation(line: 5299, column: 65, scope: !3) +!10 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_1.snap index 193aba996..8c2c35715 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_1.snap @@ -38,9 +38,9 @@ declare i32 @random_int() !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !10} !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i32, {} }", file: !2, size: 4, align: 8, elements: !8) @@ -48,4 +48,4 @@ declare i32 @random_int() !9 = !DIBasicType(name: "i32", size: 32, encoding: DW_ATE_unsigned) !10 = !DICompositeType(tag: DW_TAG_structure_type, name: "{}", file: !2, align: 8, elements: !11) !11 = !{} -!12 = !DILocation(line: 5299, column: 65, scope: !3) +!12 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_2.snap index 5363f0428..937c2d0b1 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_2.snap @@ -38,9 +38,9 @@ declare double @random_float() !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !10} !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ double, {} }", file: !2, size: 8, align: 8, elements: !8) @@ -48,4 +48,4 @@ declare double @random_float() !9 = !DIBasicType(name: "f64", size: 64, encoding: DW_ATE_float) !10 = !DICompositeType(tag: DW_TAG_structure_type, name: "{}", file: !2, align: 8, elements: !11) !11 = !{} -!12 = !DILocation(line: 5299, column: 65, scope: !3) +!12 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_3.snap index 6f046f8b7..7156bedd6 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_3.snap @@ -41,9 +41,9 @@ declare i32 @random_rng(i32) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !10, !9} !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i32, {} }", file: !2, size: 4, align: 8, elements: !8) @@ -51,4 +51,4 @@ declare i32 @random_rng(i32) !9 = !DIBasicType(name: "i32", size: 32, encoding: DW_ATE_unsigned) !10 = !DICompositeType(tag: DW_TAG_structure_type, name: "{}", file: !2, align: 8, elements: !11) !11 = !{} -!12 = !DILocation(line: 5299, column: 65, scope: !3) +!12 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_4.snap index d2458f384..018ec07f6 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_4.snap @@ -30,11 +30,11 @@ declare void @random_seed(i64) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !8} !7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) !8 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!9 = !DILocation(line: 5299, column: 65, scope: !3) +!9 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_5.snap index 954dba030..85d2be209 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_5.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_5.snap @@ -21,9 +21,9 @@ entry_block: ; preds = %alloca_block !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{null, !7} !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{}", file: !2, align: 8, elements: !8) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_1.snap index f9713917a..475552f1f 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_1.snap @@ -25,10 +25,10 @@ declare void @print_bool(ptr, i64, i1) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{null, !7} !7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_11.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_11.snap index f6c289cfe..f096b4034 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_11.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_11.snap @@ -40,13 +40,13 @@ declare void @print_float_arr(ptr, i64, ptr) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{null, !7} !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ ptr, i64 }", file: !2, size: 16, align: 8, elements: !8) !8 = !{!9, !10} !9 = !DIBasicType(name: "ptr", size: 64, encoding: DW_ATE_address) !10 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!11 = !DILocation(line: 5299, column: 65, scope: !3) +!11 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_12.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_12.snap index b63e8f1df..31a2b180f 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_12.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_12.snap @@ -25,10 +25,10 @@ declare void @print_int(ptr, i64, i64) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{null, !7} !7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_13.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_13.snap index 0cbd18431..039c8605a 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_13.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_13.snap @@ -25,10 +25,10 @@ declare void @print_uint(ptr, i64, i64) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{null, !7} !7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_15.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_15.snap index af44ab21c..acdca3bb3 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_15.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_15.snap @@ -25,10 +25,10 @@ declare void @print_bool(ptr, i64, i1) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{null, !7} !7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_16.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_16.snap index 5b37294cf..ef6fc9d52 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_16.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_16.snap @@ -25,10 +25,10 @@ declare void @print_bool(ptr, i64, i1) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{null, !7} !7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_2.snap index e8f8c086d..95ab43fdc 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_2.snap @@ -25,10 +25,10 @@ declare void @print_int(ptr, i64, i64) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{null, !7} !7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_3.snap index efc0debda..327974f36 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_3.snap @@ -25,10 +25,10 @@ declare void @print_uint(ptr, i64, i64) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{null, !7} !7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_4.snap index 91bbbdf2b..f621c3063 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_4.snap @@ -25,10 +25,10 @@ declare void @print_float(ptr, i64, double) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{null, !7} !7 = !DIBasicType(name: "f64", size: 64, encoding: DW_ATE_float) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_5.snap index 5cc958110..86092d382 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_5.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_5.snap @@ -40,13 +40,13 @@ declare void @print_bool_arr(ptr, i64, ptr) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{null, !7} !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ ptr, i64 }", file: !2, size: 16, align: 8, elements: !8) !8 = !{!9, !10} !9 = !DIBasicType(name: "ptr", size: 64, encoding: DW_ATE_address) !10 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!11 = !DILocation(line: 5299, column: 65, scope: !3) +!11 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_7.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_7.snap index 419c755d8..11f55fa08 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_7.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_7.snap @@ -40,13 +40,13 @@ declare void @print_int_arr(ptr, i64, ptr) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{null, !7} !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ ptr, i64 }", file: !2, size: 16, align: 8, elements: !8) !8 = !{!9, !10} !9 = !DIBasicType(name: "ptr", size: 64, encoding: DW_ATE_address) !10 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!11 = !DILocation(line: 5299, column: 65, scope: !3) +!11 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_9.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_9.snap index 9d8bb59c1..949a9f07d 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_9.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_9.snap @@ -40,13 +40,13 @@ declare void @print_uint_arr(ptr, i64, ptr) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{null, !7} !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ ptr, i64 }", file: !2, size: 16, align: 8, elements: !8) !8 = !{!9, !10} !9 = !DIBasicType(name: "ptr", size: 64, encoding: DW_ATE_address) !10 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!11 = !DILocation(line: 5299, column: 65, scope: !3) +!11 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_1.snap index e3a56be3b..18c07a017 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_1.snap @@ -28,10 +28,10 @@ declare void @print_bool(ptr, i64, i1) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{null, !7} !7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_11.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_11.snap index b66161e33..5f043c576 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_11.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_11.snap @@ -43,13 +43,13 @@ declare void @print_float_arr(ptr, i64, ptr) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{null, !7} !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ ptr, i64 }", file: !2, size: 16, align: 8, elements: !8) !8 = !{!9, !10} !9 = !DIBasicType(name: "ptr", size: 64, encoding: DW_ATE_address) !10 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!11 = !DILocation(line: 5299, column: 65, scope: !3) +!11 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_12.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_12.snap index db07e331b..fbeb0fbad 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_12.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_12.snap @@ -28,10 +28,10 @@ declare void @print_int(ptr, i64, i64) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{null, !7} !7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_13.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_13.snap index 11fa93891..539964e3e 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_13.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_13.snap @@ -28,10 +28,10 @@ declare void @print_uint(ptr, i64, i64) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{null, !7} !7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_15.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_15.snap index 2783e9ced..700dbb9fb 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_15.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_15.snap @@ -28,10 +28,10 @@ declare void @print_bool(ptr, i64, i1) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{null, !7} !7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_16.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_16.snap index 51935ed0c..dd2762c04 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_16.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_16.snap @@ -28,10 +28,10 @@ declare void @print_bool(ptr, i64, i1) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{null, !7} !7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_2.snap index 328b110ce..db9aa8652 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_2.snap @@ -28,10 +28,10 @@ declare void @print_int(ptr, i64, i64) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{null, !7} !7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_3.snap index e4f47f0b8..b5a87bc1b 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_3.snap @@ -28,10 +28,10 @@ declare void @print_uint(ptr, i64, i64) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{null, !7} !7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_4.snap index 11a166d34..87aaa44d3 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_4.snap @@ -28,10 +28,10 @@ declare void @print_float(ptr, i64, double) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{null, !7} !7 = !DIBasicType(name: "f64", size: 64, encoding: DW_ATE_float) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_5.snap index 31b64218e..3de6762f2 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_5.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_5.snap @@ -43,13 +43,13 @@ declare void @print_bool_arr(ptr, i64, ptr) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{null, !7} !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ ptr, i64 }", file: !2, size: 16, align: 8, elements: !8) !8 = !{!9, !10} !9 = !DIBasicType(name: "ptr", size: 64, encoding: DW_ATE_address) !10 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!11 = !DILocation(line: 5299, column: 65, scope: !3) +!11 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_7.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_7.snap index d7ede5e55..73ea632e8 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_7.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_7.snap @@ -43,13 +43,13 @@ declare void @print_int_arr(ptr, i64, ptr) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{null, !7} !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ ptr, i64 }", file: !2, size: 16, align: 8, elements: !8) !8 = !{!9, !10} !9 = !DIBasicType(name: "ptr", size: 64, encoding: DW_ATE_address) !10 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!11 = !DILocation(line: 5299, column: 65, scope: !3) +!11 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_9.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_9.snap index c8130f27b..3ad711ffd 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_9.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_9.snap @@ -43,13 +43,13 @@ declare void @print_uint_arr(ptr, i64, ptr) !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{null, !7} !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ ptr, i64 }", file: !2, size: 16, align: 8, elements: !8) !8 = !{!9, !10} !9 = !DIBasicType(name: "ptr", size: 64, encoding: DW_ATE_address) !10 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!11 = !DILocation(line: 5299, column: 65, scope: !3) +!11 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@llvm21_1.snap index 311452bd1..aa20e70d5 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@llvm21_1.snap @@ -21,10 +21,10 @@ declare i64 @get_current_shot() !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7} !7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@pre-mem2reg@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@pre-mem2reg@llvm21_1.snap index 0904e34f3..3406ddd07 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@pre-mem2reg@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@pre-mem2reg@llvm21_1.snap @@ -27,10 +27,10 @@ declare i64 @get_current_shot() !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7} !7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_1.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_1.snap index f9fbe3dc9..ded722635 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_1.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_1.snap @@ -19,10 +19,10 @@ entry_block: ; preds = %alloca_block !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !7} !7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_2.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_2.snap index 2a99eb081..2c7437ecd 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_2.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_2.snap @@ -18,9 +18,9 @@ entry_block: ; preds = %alloca_block !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !7} !7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_3.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_3.snap index d5b2d7777..689dbacfd 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_3.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_3.snap @@ -19,10 +19,10 @@ entry_block: ; preds = %alloca_block !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !7} !7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_4.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_4.snap index 844a8d27c..cb74f0d29 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_4.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_4.snap @@ -19,10 +19,10 @@ entry_block: ; preds = %alloca_block !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !7, !7} !7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_5.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_5.snap index 03505a411..1c86c8923 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_5.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_5.snap @@ -19,10 +19,10 @@ entry_block: ; preds = %alloca_block !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !7, !7} !7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_6.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_6.snap index f598bfcdc..8641560ff 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_6.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_6.snap @@ -19,10 +19,10 @@ entry_block: ; preds = %alloca_block !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !7, !7} !7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_7.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_7.snap index bf1f84520..baf7429d6 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_7.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@llvm21_7.snap @@ -19,10 +19,10 @@ entry_block: ; preds = %alloca_block !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !7, !7} !7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_1.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_1.snap index 3f6aebf55..2821253e9 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_1.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_1.snap @@ -28,10 +28,10 @@ entry_block: ; preds = %alloca_block !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !7} !7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_2.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_2.snap index eea49cb30..707f5497d 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_2.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_2.snap @@ -27,10 +27,10 @@ entry_block: ; preds = %alloca_block !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !7} !7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_3.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_3.snap index 710e6386c..6ed81fcdb 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_3.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_3.snap @@ -28,10 +28,10 @@ entry_block: ; preds = %alloca_block !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !7} !7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_4.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_4.snap index 9a1decc6e..1d0c832ac 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_4.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_4.snap @@ -31,10 +31,10 @@ entry_block: ; preds = %alloca_block !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !7, !7} !7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_5.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_5.snap index 8a37da0e3..1974e154b 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_5.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_5.snap @@ -31,10 +31,10 @@ entry_block: ; preds = %alloca_block !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !7, !7} !7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_6.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_6.snap index e5216b184..872b80dec 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_6.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_6.snap @@ -31,10 +31,10 @@ entry_block: ; preds = %alloca_block !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !7, !7} !7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_7.snap b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_7.snap index 9420cc329..85d0369ca 100644 --- a/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_7.snap +++ b/tket/src/llvm/snapshots/tket__llvm__bool__test__emit_all_ops@pre-mem2reg@llvm21_7.snap @@ -31,10 +31,10 @@ entry_block: ; preds = %alloca_block !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !7, !7} !7 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@llvm21_0.snap b/tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@llvm21_0.snap index e96eb171f..80b2f8a02 100644 --- a/tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@llvm21_0.snap +++ b/tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@llvm21_0.snap @@ -69,13 +69,13 @@ attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memo !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/FfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC/AphFGIyrhvZsHeDgUnyeIVw.gpy.py", directory: "/RCTcNfsTEG") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 11747, type: !5, scopeLine: 11748, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/FfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC/AphFGIyrhvZsHeDgUnyeIVw.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lA") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{null, !7} !7 = !DIBasicType(name: "f64", size: 64, encoding: DW_ATE_float) -!8 = !DILocation(line: 14941, column: 155, scope: !3) -!9 = !DILocation(line: 18189, column: 496, scope: !3) -!10 = !DILocation(line: 4144, column: 352, scope: !3) -!11 = !DILocation(line: 16024, column: 485, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) +!9 = !DILocation(line: 10060, column: 368, scope: !3) +!10 = !DILocation(line: 32551, column: 131, scope: !3) +!11 = !DILocation(line: 13582, column: 372, scope: !3) diff --git a/tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@pre-mem2reg@llvm21_0.snap b/tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@pre-mem2reg@llvm21_0.snap index 3e6cbc1ee..bd40017ef 100644 --- a/tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@pre-mem2reg@llvm21_0.snap +++ b/tket/src/llvm/snapshots/tket__llvm__rotation__test__emit_all_ops@pre-mem2reg@llvm21_0.snap @@ -102,14 +102,14 @@ attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memo !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/FfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC/AphFGIyrhvZsHeDgUnyeIVw.gpy.py", directory: "/RCTcNfsTEG") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 11747, type: !5, scopeLine: 11748, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/FfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC/AphFGIyrhvZsHeDgUnyeIVw.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lA") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{null, !7} !7 = !DIBasicType(name: "f64", size: 64, encoding: DW_ATE_float) -!8 = !DILocation(line: 14941, column: 155, scope: !3) -!9 = !DILocation(line: 19514, column: 154, scope: !3) -!10 = !DILocation(line: 18189, column: 496, scope: !3) -!11 = !DILocation(line: 4144, column: 352, scope: !3) -!12 = !DILocation(line: 16024, column: 485, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) +!9 = !DILocation(line: 5388, column: 404, scope: !3) +!10 = !DILocation(line: 10060, column: 368, scope: !3) +!11 = !DILocation(line: 32551, column: 131, scope: !3) +!12 = !DILocation(line: 13582, column: 372, scope: !3) From ae84c14aca7b33a535cf046b87559e024ceb0b27 Mon Sep 17 00:00:00 2001 From: George Hodgkins Date: Mon, 20 Apr 2026 11:17:39 -0600 Subject: [PATCH 08/11] Update GPU snapshots --- ...compiler__gpu__test__gpu_codegen@llvm21_call_args.snap | 8 ++++---- ...ler__gpu__test__gpu_codegen@llvm21_call_ret_float.snap | 8 ++++---- ...piler__gpu__test__gpu_codegen@llvm21_call_ret_int.snap | 8 ++++---- ...er__gpu__test__gpu_codegen@llvm21_dispose_context.snap | 8 ++++---- ...mpiler__gpu__test__gpu_codegen@llvm21_get_context.snap | 8 ++++---- ...piler__gpu__test__gpu_codegen@llvm21_lookup_by_id.snap | 6 +++--- ...ler__gpu__test__gpu_codegen@llvm21_lookup_by_name.snap | 8 ++++---- ...__gpu__test__gpu_codegen@llvm21_read_result_float.snap | 8 ++++---- ...er__gpu__test__gpu_codegen@llvm21_read_result_int.snap | 8 ++++---- ...u__test__gpu_codegen@pre-mem2reg@llvm21_call_args.snap | 8 ++++---- ...st__gpu_codegen@pre-mem2reg@llvm21_call_ret_float.snap | 8 ++++---- ...test__gpu_codegen@pre-mem2reg@llvm21_call_ret_int.snap | 8 ++++---- ...t__gpu_codegen@pre-mem2reg@llvm21_dispose_context.snap | 8 ++++---- ..._test__gpu_codegen@pre-mem2reg@llvm21_get_context.snap | 8 ++++---- ...test__gpu_codegen@pre-mem2reg@llvm21_lookup_by_id.snap | 8 ++++---- ...st__gpu_codegen@pre-mem2reg@llvm21_lookup_by_name.snap | 8 ++++---- ..._gpu_codegen@pre-mem2reg@llvm21_read_result_float.snap | 8 ++++---- ...t__gpu_codegen@pre-mem2reg@llvm21_read_result_int.snap | 8 ++++---- 18 files changed, 71 insertions(+), 71 deletions(-) diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_args.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_args.snap index 2fa28eea1..07d4c8629 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_args.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_args.snap @@ -77,12 +77,12 @@ attributes #2 = { noreturn } !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !7, !7, !7, !7, !8, !9} !7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) !8 = !DIBasicType(name: "f64", size: 64, encoding: DW_ATE_float) !9 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) -!10 = !DILocation(line: 5299, column: 65, scope: !3) +!10 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_ret_float.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_ret_float.snap index bb76dc967..0df0cedc0 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_ret_float.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_ret_float.snap @@ -58,10 +58,10 @@ attributes #1 = { noreturn } !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !7, !7} !7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_ret_int.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_ret_int.snap index 4326a050e..f5e3cb78c 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_ret_int.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_call_ret_int.snap @@ -58,10 +58,10 @@ attributes #1 = { noreturn } !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !7, !7} !7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_dispose_context.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_dispose_context.snap index c97e4eb02..9409eb2aa 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_dispose_context.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_dispose_context.snap @@ -56,10 +56,10 @@ attributes #1 = { noreturn } !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{null, !7} !7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_get_context.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_get_context.snap index be2cea13d..9219f54aa 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_get_context.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_get_context.snap @@ -80,13 +80,13 @@ attributes #1 = { noreturn } !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !10} !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i1, i64 }", file: !2, size: 8, align: 8, elements: !8) !8 = !{!9, !10} !9 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) !10 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!11 = !DILocation(line: 5299, column: 65, scope: !3) +!11 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_lookup_by_id.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_lookup_by_id.snap index f76aa052e..f3f8932be 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_lookup_by_id.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_lookup_by_id.snap @@ -18,9 +18,9 @@ entry_block: ; preds = %alloca_block !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !8} !7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_lookup_by_name.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_lookup_by_name.snap index f6192e738..04b81d13c 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_lookup_by_name.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_lookup_by_name.snap @@ -100,12 +100,12 @@ attributes #1 = { noreturn } !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !8} !7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) !8 = !DICompositeType(tag: DW_TAG_structure_type, name: "{}", file: !2, align: 8, elements: !9) !9 = !{} -!10 = !DILocation(line: 5299, column: 65, scope: !3) +!10 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_read_result_float.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_read_result_float.snap index d5296d18c..7bf2f4c3b 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_read_result_float.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_read_result_float.snap @@ -60,13 +60,13 @@ attributes #1 = { noreturn } !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !9} !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i64, double }", file: !2, size: 16, align: 8, elements: !8) !8 = !{!9, !10} !9 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) !10 = !DIBasicType(name: "f64", size: 64, encoding: DW_ATE_float) -!11 = !DILocation(line: 5299, column: 65, scope: !3) +!11 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_read_result_int.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_read_result_int.snap index 5507ce894..ac3ac4e70 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_read_result_int.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@llvm21_read_result_int.snap @@ -60,12 +60,12 @@ attributes #1 = { noreturn } !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !9} !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i64, i64 }", file: !2, size: 16, align: 8, elements: !8) !8 = !{!9, !9} !9 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!10 = !DILocation(line: 5299, column: 65, scope: !3) +!10 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_args.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_args.snap index 8f747c360..4a313411c 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_args.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_args.snap @@ -101,12 +101,12 @@ attributes #2 = { noreturn } !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !7, !7, !7, !7, !8, !9} !7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) !8 = !DIBasicType(name: "f64", size: 64, encoding: DW_ATE_float) !9 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) -!10 = !DILocation(line: 5299, column: 65, scope: !3) +!10 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_ret_float.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_ret_float.snap index 29a8c86b3..d021a8898 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_ret_float.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_ret_float.snap @@ -70,10 +70,10 @@ attributes #1 = { noreturn } !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !7, !7} !7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_ret_int.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_ret_int.snap index 2d3f22019..34f33a192 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_ret_int.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_call_ret_int.snap @@ -70,10 +70,10 @@ attributes #1 = { noreturn } !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !7, !7} !7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_dispose_context.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_dispose_context.snap index 93779c5dc..aee603f06 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_dispose_context.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_dispose_context.snap @@ -59,10 +59,10 @@ attributes #1 = { noreturn } !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{null, !7} !7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!8 = !DILocation(line: 5299, column: 65, scope: !3) +!8 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_get_context.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_get_context.snap index 2aab9e85f..ae3f81700 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_get_context.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_get_context.snap @@ -89,13 +89,13 @@ attributes #1 = { noreturn } !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !10} !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i1, i64 }", file: !2, size: 8, align: 8, elements: !8) !8 = !{!9, !10} !9 = !DIBasicType(name: "i1", size: 1, encoding: DW_ATE_unsigned) !10 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!11 = !DILocation(line: 5299, column: 65, scope: !3) +!11 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_lookup_by_id.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_lookup_by_id.snap index 25bb13e95..caa0b7690 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_lookup_by_id.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_lookup_by_id.snap @@ -27,12 +27,12 @@ entry_block: ; preds = %alloca_block !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !8} !7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) !8 = !DICompositeType(tag: DW_TAG_structure_type, name: "{}", file: !2, align: 8, elements: !9) !9 = !{} -!10 = !DILocation(line: 5299, column: 65, scope: !3) +!10 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_lookup_by_name.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_lookup_by_name.snap index aac6d7621..c698cb70b 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_lookup_by_name.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_lookup_by_name.snap @@ -109,12 +109,12 @@ attributes #1 = { noreturn } !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !8} !7 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) !8 = !DICompositeType(tag: DW_TAG_structure_type, name: "{}", file: !2, align: 8, elements: !9) !9 = !{} -!10 = !DILocation(line: 5299, column: 65, scope: !3) +!10 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_read_result_float.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_read_result_float.snap index fdd9a09cc..c8c45f682 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_read_result_float.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_read_result_float.snap @@ -75,13 +75,13 @@ attributes #1 = { noreturn } !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !9} !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i64, double }", file: !2, size: 16, align: 8, elements: !8) !8 = !{!9, !10} !9 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) !10 = !DIBasicType(name: "f64", size: 64, encoding: DW_ATE_float) -!11 = !DILocation(line: 5299, column: 65, scope: !3) +!11 = !DILocation(line: 27062, column: 402, scope: !3) diff --git a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_read_result_int.snap b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_read_result_int.snap index 355c1e29c..b9bb0c730 100644 --- a/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_read_result_int.snap +++ b/qis-compiler/rust/snapshots/selene_hugr_qis_compiler__gpu__test__gpu_codegen@pre-mem2reg@llvm21_read_result_int.snap @@ -75,12 +75,12 @@ attributes #1 = { noreturn } !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Python, file: !2, producer: "hugr_llvm_test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -!2 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "/hvZsHeDgUnyeIVwAutKJHaZEPSZ/PXPeycUvnujGxZKPRCTcNfsTEGLoP/CKHhM/mzeCBZoPGeHBxpWCFCAIgmDOGX/yQmUZGJneRvyjSLkxZjvaVMrckAfo/SeQfNL") -!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 26394, type: !5, scopeLine: 26395, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) -!4 = !DIFile(filename: "/JrSnVYeXFfvzCkHdtWCCnkJ/PKiWSKICgZuRNRvRJmbrf/qoqpIlPNzlVLC.gpy.py", directory: "") +!2 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "/lPNzlV/ClAphFG/yrhvZs/eDgUn/eIVwAutKJHaZEPSZwPXPeycUvnujGxZ") +!3 = distinct !DISubprogram(name: "_hl.main.1", linkageName: "_hl.main.1", scope: null, file: !4, line: 25254, type: !5, scopeLine: 25255, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +!4 = !DIFile(filename: "/cmJrSnVYeXFf/zCkHdtWCCnkJhPKiWSKICgZuRNRvR/mbrfVq.gpy.py", directory: "") !5 = !DISubroutineType(types: !6) !6 = !{!7, !9} !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "{ i64, i64 }", file: !2, size: 16, align: 8, elements: !8) !8 = !{!9, !9} !9 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_unsigned) -!10 = !DILocation(line: 5299, column: 65, scope: !3) +!10 = !DILocation(line: 27062, column: 402, scope: !3) From 79599fc45a413f9f071538fc002ad75c1ed199d1 Mon Sep 17 00:00:00 2001 From: George Hodgkins Date: Mon, 20 Apr 2026 11:59:18 -0600 Subject: [PATCH 09/11] Fixes from copilot --- qis-compiler/python/tests/generate_hugrs.py | 3 ++- qis-compiler/python/tests/test_basic_generation.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/qis-compiler/python/tests/generate_hugrs.py b/qis-compiler/python/tests/generate_hugrs.py index a1b0c47d5..726ea28a4 100644 --- a/qis-compiler/python/tests/generate_hugrs.py +++ b/qis-compiler/python/tests/generate_hugrs.py @@ -1,7 +1,8 @@ # /// script # requires-python = ">=3.10" # dependencies = [ -# "guppylang==0.21.9, +# "guppylang==0.21.9", +# "guppylang-internals", # "tket", # ] # /// diff --git a/qis-compiler/python/tests/test_basic_generation.py b/qis-compiler/python/tests/test_basic_generation.py index 1413d443d..87203b6dd 100644 --- a/qis-compiler/python/tests/test_basic_generation.py +++ b/qis-compiler/python/tests/test_basic_generation.py @@ -71,7 +71,7 @@ def test_unsupported_pytket_ops() -> None: @pytest.mark.parametrize("target_triple", triples) def test_llvm(snapshot: Snapshot, hugr_file: str, target_triple: str) -> None: hugr_envelope = load(hugr_file) - ir = compile_to_llvm_ir(hugr_envelope, target_triple=target_triple, emit_debug=True) # type: ignore[call-arg] + ir = compile_to_llvm_ir(hugr_envelope, target_triple=target_triple, emit_debug=True) snapshot.assert_match(ir, f"{hugr_file}_{target_triple}") @@ -116,5 +116,5 @@ def test_gpu(snapshot: Snapshot, target_triple: str) -> None: # above, using the tket_qsystem::extension::gpu entities. hugr_file = resources_dir / "example_gpu.hugr" hugr_envelope = hugr_file.read_bytes() - ir = compile_to_llvm_ir(hugr_envelope, target_triple=target_triple) # type: ignore[call-arg] + ir = compile_to_llvm_ir(hugr_envelope, target_triple=target_triple) snapshot.assert_match(ir, f"gpu_{target_triple}") From 25c18b9f24a2e91d2c37df1f141f4f80f2423f2d Mon Sep 17 00:00:00 2001 From: George Hodgkins Date: Tue, 21 Apr 2026 16:58:06 -0600 Subject: [PATCH 10/11] Add 'notail' to QIS calls --- Cargo.lock | 12 +-- .../discard_qb_array_aarch64-apple-darwin | 68 ++++++------ .../flip_some_aarch64-apple-darwin | 64 +++++------ .../measure_qb_array_aarch64-apple-darwin | 84 +++++++-------- .../no_results_aarch64-apple-darwin | 18 ++-- .../postselect_exit_aarch64-apple-darwin | 26 ++--- .../postselect_panic_aarch64-apple-darwin | 26 ++--- .../print_current_shot_aarch64-apple-darwin | 8 +- .../rng_aarch64-apple-darwin | 34 +++--- .../rus_aarch64-apple-darwin | 84 +++++++-------- .../discard_qb_array_x86_64-apple-darwin | 68 ++++++------ .../flip_some_x86_64-apple-darwin | 64 +++++------ .../measure_qb_array_x86_64-apple-darwin | 102 +++++++++--------- .../no_results_x86_64-apple-darwin | 18 ++-- .../postselect_exit_x86_64-apple-darwin | 26 ++--- .../postselect_panic_x86_64-apple-darwin | 26 ++--- .../print_current_shot_x86_64-apple-darwin | 8 +- .../rng_x86_64-apple-darwin | 34 +++--- .../rus_x86_64-apple-darwin | 84 +++++++-------- .../discard_qb_array_x86_64-unknown-linux-gnu | 68 ++++++------ .../flip_some_x86_64-unknown-linux-gnu | 64 +++++------ .../measure_qb_array_x86_64-unknown-linux-gnu | 102 +++++++++--------- .../no_results_x86_64-unknown-linux-gnu | 18 ++-- .../postselect_exit_x86_64-unknown-linux-gnu | 26 ++--- .../postselect_panic_x86_64-unknown-linux-gnu | 26 ++--- ...rint_current_shot_x86_64-unknown-linux-gnu | 8 +- .../rng_x86_64-unknown-linux-gnu | 34 +++--- .../rus_x86_64-unknown-linux-gnu | 84 +++++++-------- .../discard_qb_array_x86_64-windows-msvc | 68 ++++++------ .../flip_some_x86_64-windows-msvc | 64 +++++------ .../measure_qb_array_x86_64-windows-msvc | 102 +++++++++--------- .../no_results_x86_64-windows-msvc | 18 ++-- .../postselect_exit_x86_64-windows-msvc | 26 ++--- .../postselect_panic_x86_64-windows-msvc | 26 ++--- .../print_current_shot_x86_64-windows-msvc | 8 +- .../rng_x86_64-windows-msvc | 34 +++--- .../rus_x86_64-windows-msvc | 84 +++++++-------- qis-compiler/rust/lib.rs | 4 +- tket-qsystem/src/llvm/debug.rs | 4 +- tket-qsystem/src/llvm/futures.rs | 24 +++-- tket-qsystem/src/llvm/prelude.rs | 10 +- tket-qsystem/src/llvm/qsystem.rs | 100 ++++++++--------- tket-qsystem/src/llvm/random.rs | 26 ++--- tket-qsystem/src/llvm/result.rs | 66 +++++++----- ...ug__test__emit_debug_codegen@llvm21_2.snap | 2 +- ...it_debug_codegen@pre-mem2reg@llvm21_2.snap | 2 +- ...__test__emit_futures_codegen@llvm21_1.snap | 2 +- ...__test__emit_futures_codegen@llvm21_2.snap | 2 +- ...__test__emit_futures_codegen@llvm21_3.snap | 2 +- ...__test__emit_futures_codegen@llvm21_4.snap | 2 +- ...__test__emit_futures_codegen@llvm21_5.snap | 2 +- ...__test__emit_futures_codegen@llvm21_6.snap | 2 +- ..._futures_codegen@pre-mem2reg@llvm21_1.snap | 2 +- ..._futures_codegen@pre-mem2reg@llvm21_2.snap | 2 +- ..._futures_codegen@pre-mem2reg@llvm21_3.snap | 2 +- ..._futures_codegen@pre-mem2reg@llvm21_4.snap | 2 +- ..._futures_codegen@pre-mem2reg@llvm21_5.snap | 2 +- ..._futures_codegen@pre-mem2reg@llvm21_6.snap | 2 +- ...vm__prelude__test__exit_emit@llvm21_0.snap | 2 +- ..._test__exit_emit@pre-mem2reg@llvm21_0.snap | 2 +- ...m__prelude__test__panic_emit@llvm21_0.snap | 2 +- ...test__panic_emit@pre-mem2reg@llvm21_0.snap | 2 +- ...__test__emit_qsystem_codegen@llvm21_1.snap | 2 +- ..._test__emit_qsystem_codegen@llvm21_10.snap | 4 +- ...__test__emit_qsystem_codegen@llvm21_2.snap | 2 +- ...__test__emit_qsystem_codegen@llvm21_3.snap | 2 +- ...__test__emit_qsystem_codegen@llvm21_4.snap | 4 +- ...__test__emit_qsystem_codegen@llvm21_5.snap | 4 +- ...__test__emit_qsystem_codegen@llvm21_6.snap | 4 +- ...__test__emit_qsystem_codegen@llvm21_7.snap | 2 +- ...__test__emit_qsystem_codegen@llvm21_8.snap | 2 +- ...__test__emit_qsystem_codegen@llvm21_9.snap | 4 +- ..._qsystem_codegen@pre-mem2reg@llvm21_1.snap | 2 +- ...qsystem_codegen@pre-mem2reg@llvm21_10.snap | 4 +- ..._qsystem_codegen@pre-mem2reg@llvm21_2.snap | 2 +- ..._qsystem_codegen@pre-mem2reg@llvm21_3.snap | 2 +- ..._qsystem_codegen@pre-mem2reg@llvm21_4.snap | 4 +- ..._qsystem_codegen@pre-mem2reg@llvm21_5.snap | 4 +- ..._qsystem_codegen@pre-mem2reg@llvm21_6.snap | 4 +- ..._qsystem_codegen@pre-mem2reg@llvm21_7.snap | 2 +- ..._qsystem_codegen@pre-mem2reg@llvm21_8.snap | 2 +- ..._qsystem_codegen@pre-mem2reg@llvm21_9.snap | 4 +- ...dom__test__emit_random_codegen@llvm21.snap | 2 +- ...m__test__emit_random_codegen@llvm21_1.snap | 2 +- ...m__test__emit_random_codegen@llvm21_2.snap | 2 +- ...m__test__emit_random_codegen@llvm21_3.snap | 2 +- ...m__test__emit_random_codegen@llvm21_4.snap | 2 +- ...mit_random_codegen@pre-mem2reg@llvm21.snap | 2 +- ...t_random_codegen@pre-mem2reg@llvm21_1.snap | 2 +- ...t_random_codegen@pre-mem2reg@llvm21_2.snap | 2 +- ...t_random_codegen@pre-mem2reg@llvm21_3.snap | 2 +- ...t_random_codegen@pre-mem2reg@llvm21_4.snap | 2 +- ...t__test__emit_result_codegen@llvm21_1.snap | 2 +- ...__test__emit_result_codegen@llvm21_11.snap | 2 +- ...__test__emit_result_codegen@llvm21_12.snap | 2 +- ...__test__emit_result_codegen@llvm21_13.snap | 2 +- ...__test__emit_result_codegen@llvm21_15.snap | 2 +- ...__test__emit_result_codegen@llvm21_16.snap | 2 +- ...t__test__emit_result_codegen@llvm21_2.snap | 2 +- ...t__test__emit_result_codegen@llvm21_3.snap | 2 +- ...t__test__emit_result_codegen@llvm21_4.snap | 2 +- ...t__test__emit_result_codegen@llvm21_5.snap | 2 +- ...t__test__emit_result_codegen@llvm21_7.snap | 2 +- ...t__test__emit_result_codegen@llvm21_9.snap | 2 +- ...t_result_codegen@pre-mem2reg@llvm21_1.snap | 2 +- ..._result_codegen@pre-mem2reg@llvm21_11.snap | 2 +- ..._result_codegen@pre-mem2reg@llvm21_12.snap | 2 +- ..._result_codegen@pre-mem2reg@llvm21_13.snap | 2 +- ..._result_codegen@pre-mem2reg@llvm21_15.snap | 2 +- ..._result_codegen@pre-mem2reg@llvm21_16.snap | 2 +- ...t_result_codegen@pre-mem2reg@llvm21_2.snap | 2 +- ...t_result_codegen@pre-mem2reg@llvm21_3.snap | 2 +- ...t_result_codegen@pre-mem2reg@llvm21_4.snap | 2 +- ...t_result_codegen@pre-mem2reg@llvm21_5.snap | 2 +- ...t_result_codegen@pre-mem2reg@llvm21_7.snap | 2 +- ...t_result_codegen@pre-mem2reg@llvm21_9.snap | 2 +- ...ls__test__emit_utils_codegen@llvm21_1.snap | 2 +- ...it_utils_codegen@pre-mem2reg@llvm21_1.snap | 2 +- tket-qsystem/src/llvm/utils.rs | 11 +- 119 files changed, 1076 insertions(+), 1051 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 885becb2a..0d1aa6857 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1150,7 +1150,7 @@ dependencies = [ [[package]] name = "hugr" version = "0.27.0" -source = "git+https://github.com/quantinuum/hugr?branch=george%2Fdebuginfo#4ebb9b8e2e4cdbc62117c65f86ca26bbc145350e" +source = "git+https://github.com/quantinuum/hugr?branch=george%2Fdebuginfo#3bd16c604b8d7bb66a19ad739642a44b30e1cd5a" dependencies = [ "hugr-core", "hugr-llvm", @@ -1160,7 +1160,7 @@ dependencies = [ [[package]] name = "hugr-cli" version = "0.27.0" -source = "git+https://github.com/quantinuum/hugr?branch=george%2Fdebuginfo#4ebb9b8e2e4cdbc62117c65f86ca26bbc145350e" +source = "git+https://github.com/quantinuum/hugr?branch=george%2Fdebuginfo#3bd16c604b8d7bb66a19ad739642a44b30e1cd5a" dependencies = [ "anyhow", "clap", @@ -1180,7 +1180,7 @@ dependencies = [ [[package]] name = "hugr-core" version = "0.27.0" -source = "git+https://github.com/quantinuum/hugr?branch=george%2Fdebuginfo#4ebb9b8e2e4cdbc62117c65f86ca26bbc145350e" +source = "git+https://github.com/quantinuum/hugr?branch=george%2Fdebuginfo#3bd16c604b8d7bb66a19ad739642a44b30e1cd5a" dependencies = [ "base64", "cgmath", @@ -1217,7 +1217,7 @@ dependencies = [ [[package]] name = "hugr-llvm" version = "0.27.0" -source = "git+https://github.com/quantinuum/hugr?branch=george%2Fdebuginfo#4ebb9b8e2e4cdbc62117c65f86ca26bbc145350e" +source = "git+https://github.com/quantinuum/hugr?branch=george%2Fdebuginfo#3bd16c604b8d7bb66a19ad739642a44b30e1cd5a" dependencies = [ "anyhow", "cc", @@ -1237,7 +1237,7 @@ dependencies = [ [[package]] name = "hugr-model" version = "0.27.0" -source = "git+https://github.com/quantinuum/hugr?branch=george%2Fdebuginfo#4ebb9b8e2e4cdbc62117c65f86ca26bbc145350e" +source = "git+https://github.com/quantinuum/hugr?branch=george%2Fdebuginfo#3bd16c604b8d7bb66a19ad739642a44b30e1cd5a" dependencies = [ "base64", "bumpalo", @@ -2247,7 +2247,7 @@ dependencies = [ "derive_more 0.99.20", "fxhash", "itertools 0.13.0", - "petgraph 0.6.5", + "petgraph 0.8.3", "serde", "slotmap_fork_lmondada", "thiserror 1.0.69", diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-discard_qb_array/discard_qb_array_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-discard_qb_array/discard_qb_array_aarch64-apple-darwin index cf39d3ddb..ae11696eb 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-discard_qb_array/discard_qb_array_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-discard_qb_array/discard_qb_array_aarch64-apple-darwin @@ -12,34 +12,34 @@ alloca_block: %0 = tail call ptr @heap_alloc(i64 80), !dbg !8 %1 = tail call ptr @heap_alloc(i64 8), !dbg !8 store i64 -1, ptr %1, align 1, !dbg !8 - %qalloc.i = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !9 br i1 %not_max.not.not.i, label %cond_233_case_0.i, label %__hugr__.__tk2_qalloc.229.exit, !dbg !9 cond_233_case_0.i: ; preds = %cond_exit_20.8, %cond_exit_20.7, %cond_exit_20.6, %cond_exit_20.5, %cond_exit_20.4, %cond_exit_20.3, %cond_exit_20.2, %cond_exit_20.1, %cond_exit_20, %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 unreachable, !dbg !9 __hugr__.__tk2_qalloc.229.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i), !dbg !9 + notail call void @___reset(i64 %qalloc.i), !dbg !9 %2 = load i64, ptr %1, align 4 %3 = trunc i64 %2 to i1 br i1 %3, label %cond_exit_20, label %panic.i panic.i: ; preds = %__barray_check_bounds.exit.9, %__hugr__.__tk2_qalloc.229.exit.8, %__hugr__.__tk2_qalloc.229.exit.7, %__hugr__.__tk2_qalloc.229.exit.6, %__hugr__.__tk2_qalloc.229.exit.5, %__hugr__.__tk2_qalloc.229.exit.4, %__hugr__.__tk2_qalloc.229.exit.3, %__hugr__.__tk2_qalloc.229.exit.2, %__hugr__.__tk2_qalloc.229.exit.1, %__hugr__.__tk2_qalloc.229.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") + notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable cond_exit_20: ; preds = %__hugr__.__tk2_qalloc.229.exit %4 = and i64 %2, -2 store i64 %4, ptr %1, align 4 store i64 %qalloc.i, ptr %0, align 4 - %qalloc.i.1 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.1 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1, !dbg !9 br i1 %not_max.not.not.i.1, label %cond_233_case_0.i, label %__hugr__.__tk2_qalloc.229.exit.1, !dbg !9 __hugr__.__tk2_qalloc.229.exit.1: ; preds = %cond_exit_20 - tail call void @___reset(i64 %qalloc.i.1), !dbg !9 + notail call void @___reset(i64 %qalloc.i.1), !dbg !9 %5 = load i64, ptr %1, align 4 %6 = and i64 %5, 2 %.not = icmp eq i64 %6, 0 @@ -50,12 +50,12 @@ cond_exit_20.1: ; preds = %__hugr__.__tk2_qall store i64 %7, ptr %1, align 4 %8 = getelementptr inbounds nuw i8, ptr %0, i64 8 store i64 %qalloc.i.1, ptr %8, align 4 - %qalloc.i.2 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.2 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1, !dbg !9 br i1 %not_max.not.not.i.2, label %cond_233_case_0.i, label %__hugr__.__tk2_qalloc.229.exit.2, !dbg !9 __hugr__.__tk2_qalloc.229.exit.2: ; preds = %cond_exit_20.1 - tail call void @___reset(i64 %qalloc.i.2), !dbg !9 + notail call void @___reset(i64 %qalloc.i.2), !dbg !9 %9 = load i64, ptr %1, align 4 %10 = and i64 %9, 4 %.not108 = icmp eq i64 %10, 0 @@ -66,12 +66,12 @@ cond_exit_20.2: ; preds = %__hugr__.__tk2_qall store i64 %11, ptr %1, align 4 %12 = getelementptr inbounds nuw i8, ptr %0, i64 16 store i64 %qalloc.i.2, ptr %12, align 4 - %qalloc.i.3 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.3 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1, !dbg !9 br i1 %not_max.not.not.i.3, label %cond_233_case_0.i, label %__hugr__.__tk2_qalloc.229.exit.3, !dbg !9 __hugr__.__tk2_qalloc.229.exit.3: ; preds = %cond_exit_20.2 - tail call void @___reset(i64 %qalloc.i.3), !dbg !9 + notail call void @___reset(i64 %qalloc.i.3), !dbg !9 %13 = load i64, ptr %1, align 4 %14 = and i64 %13, 8 %.not109 = icmp eq i64 %14, 0 @@ -82,12 +82,12 @@ cond_exit_20.3: ; preds = %__hugr__.__tk2_qall store i64 %15, ptr %1, align 4 %16 = getelementptr inbounds nuw i8, ptr %0, i64 24 store i64 %qalloc.i.3, ptr %16, align 4 - %qalloc.i.4 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.4 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1, !dbg !9 br i1 %not_max.not.not.i.4, label %cond_233_case_0.i, label %__hugr__.__tk2_qalloc.229.exit.4, !dbg !9 __hugr__.__tk2_qalloc.229.exit.4: ; preds = %cond_exit_20.3 - tail call void @___reset(i64 %qalloc.i.4), !dbg !9 + notail call void @___reset(i64 %qalloc.i.4), !dbg !9 %17 = load i64, ptr %1, align 4 %18 = and i64 %17, 16 %.not110 = icmp eq i64 %18, 0 @@ -98,12 +98,12 @@ cond_exit_20.4: ; preds = %__hugr__.__tk2_qall store i64 %19, ptr %1, align 4 %20 = getelementptr inbounds nuw i8, ptr %0, i64 32 store i64 %qalloc.i.4, ptr %20, align 4 - %qalloc.i.5 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.5 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.5 = icmp eq i64 %qalloc.i.5, -1, !dbg !9 br i1 %not_max.not.not.i.5, label %cond_233_case_0.i, label %__hugr__.__tk2_qalloc.229.exit.5, !dbg !9 __hugr__.__tk2_qalloc.229.exit.5: ; preds = %cond_exit_20.4 - tail call void @___reset(i64 %qalloc.i.5), !dbg !9 + notail call void @___reset(i64 %qalloc.i.5), !dbg !9 %21 = load i64, ptr %1, align 4 %22 = and i64 %21, 32 %.not111 = icmp eq i64 %22, 0 @@ -114,12 +114,12 @@ cond_exit_20.5: ; preds = %__hugr__.__tk2_qall store i64 %23, ptr %1, align 4 %24 = getelementptr inbounds nuw i8, ptr %0, i64 40 store i64 %qalloc.i.5, ptr %24, align 4 - %qalloc.i.6 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.6 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.6 = icmp eq i64 %qalloc.i.6, -1, !dbg !9 br i1 %not_max.not.not.i.6, label %cond_233_case_0.i, label %__hugr__.__tk2_qalloc.229.exit.6, !dbg !9 __hugr__.__tk2_qalloc.229.exit.6: ; preds = %cond_exit_20.5 - tail call void @___reset(i64 %qalloc.i.6), !dbg !9 + notail call void @___reset(i64 %qalloc.i.6), !dbg !9 %25 = load i64, ptr %1, align 4 %26 = and i64 %25, 64 %.not112 = icmp eq i64 %26, 0 @@ -130,12 +130,12 @@ cond_exit_20.6: ; preds = %__hugr__.__tk2_qall store i64 %27, ptr %1, align 4 %28 = getelementptr inbounds nuw i8, ptr %0, i64 48 store i64 %qalloc.i.6, ptr %28, align 4 - %qalloc.i.7 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.7 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.7 = icmp eq i64 %qalloc.i.7, -1, !dbg !9 br i1 %not_max.not.not.i.7, label %cond_233_case_0.i, label %__hugr__.__tk2_qalloc.229.exit.7, !dbg !9 __hugr__.__tk2_qalloc.229.exit.7: ; preds = %cond_exit_20.6 - tail call void @___reset(i64 %qalloc.i.7), !dbg !9 + notail call void @___reset(i64 %qalloc.i.7), !dbg !9 %29 = load i64, ptr %1, align 4 %30 = and i64 %29, 128 %.not113 = icmp eq i64 %30, 0 @@ -146,12 +146,12 @@ cond_exit_20.7: ; preds = %__hugr__.__tk2_qall store i64 %31, ptr %1, align 4 %32 = getelementptr inbounds nuw i8, ptr %0, i64 56 store i64 %qalloc.i.7, ptr %32, align 4 - %qalloc.i.8 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.8 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.8 = icmp eq i64 %qalloc.i.8, -1, !dbg !9 br i1 %not_max.not.not.i.8, label %cond_233_case_0.i, label %__hugr__.__tk2_qalloc.229.exit.8, !dbg !9 __hugr__.__tk2_qalloc.229.exit.8: ; preds = %cond_exit_20.7 - tail call void @___reset(i64 %qalloc.i.8), !dbg !9 + notail call void @___reset(i64 %qalloc.i.8), !dbg !9 %33 = load i64, ptr %1, align 4 %34 = and i64 %33, 256 %.not114 = icmp eq i64 %34, 0 @@ -162,12 +162,12 @@ cond_exit_20.8: ; preds = %__hugr__.__tk2_qall store i64 %35, ptr %1, align 4 %36 = getelementptr inbounds nuw i8, ptr %0, i64 64 store i64 %qalloc.i.8, ptr %36, align 4 - %qalloc.i.9 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.9 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.9 = icmp eq i64 %qalloc.i.9, -1, !dbg !9 br i1 %not_max.not.not.i.9, label %cond_233_case_0.i, label %__barray_check_bounds.exit.9, !dbg !9 __barray_check_bounds.exit.9: ; preds = %cond_exit_20.8 - tail call void @___reset(i64 %qalloc.i.9), !dbg !9 + notail call void @___reset(i64 %qalloc.i.9), !dbg !9 %37 = load i64, ptr %1, align 4 %38 = and i64 %37, 512 %.not115 = icmp eq i64 %38, 0 @@ -192,7 +192,7 @@ __barray_mask_borrow.exit.1.i: ; preds = %cond_171_case_1.1.i %45 = or disjoint i64 %43, 2, !dbg !21 store i64 %45, ptr %1, align 4, !dbg !21 %46 = load i64, ptr %8, align 4, !dbg !23 - tail call void @___qfree(i64 %46), !dbg !24 + notail call void @___qfree(i64 %46), !dbg !24 %.pre337.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.2.i @@ -206,7 +206,7 @@ __barray_mask_borrow.exit.2.i: ; preds = %cond_171_case_1.2.i %49 = or disjoint i64 %47, 4, !dbg !21 store i64 %49, ptr %1, align 4, !dbg !21 %50 = load i64, ptr %12, align 4, !dbg !23 - tail call void @___qfree(i64 %50), !dbg !24 + notail call void @___qfree(i64 %50), !dbg !24 %.pre338.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.3.i @@ -220,7 +220,7 @@ __barray_mask_borrow.exit.3.i: ; preds = %cond_171_case_1.3.i %53 = or disjoint i64 %51, 8, !dbg !21 store i64 %53, ptr %1, align 4, !dbg !21 %54 = load i64, ptr %16, align 4, !dbg !23 - tail call void @___qfree(i64 %54), !dbg !24 + notail call void @___qfree(i64 %54), !dbg !24 %.pre339.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.4.i @@ -234,7 +234,7 @@ __barray_mask_borrow.exit.4.i: ; preds = %cond_171_case_1.4.i %57 = or disjoint i64 %55, 16, !dbg !21 store i64 %57, ptr %1, align 4, !dbg !21 %58 = load i64, ptr %20, align 4, !dbg !23 - tail call void @___qfree(i64 %58), !dbg !24 + notail call void @___qfree(i64 %58), !dbg !24 %.pre340.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.5.i @@ -248,7 +248,7 @@ __barray_mask_borrow.exit.5.i: ; preds = %cond_171_case_1.5.i %61 = or disjoint i64 %59, 32, !dbg !21 store i64 %61, ptr %1, align 4, !dbg !21 %62 = load i64, ptr %24, align 4, !dbg !23 - tail call void @___qfree(i64 %62), !dbg !24 + notail call void @___qfree(i64 %62), !dbg !24 %.pre341.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.6.i @@ -262,7 +262,7 @@ __barray_mask_borrow.exit.6.i: ; preds = %cond_171_case_1.6.i %65 = or disjoint i64 %63, 64, !dbg !21 store i64 %65, ptr %1, align 4, !dbg !21 %66 = load i64, ptr %28, align 4, !dbg !23 - tail call void @___qfree(i64 %66), !dbg !24 + notail call void @___qfree(i64 %66), !dbg !24 %.pre342.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.7.i @@ -276,7 +276,7 @@ __barray_mask_borrow.exit.7.i: ; preds = %cond_171_case_1.7.i %69 = or disjoint i64 %67, 128, !dbg !21 store i64 %69, ptr %1, align 4, !dbg !21 %70 = load i64, ptr %32, align 4, !dbg !23 - tail call void @___qfree(i64 %70), !dbg !24 + notail call void @___qfree(i64 %70), !dbg !24 %.pre343.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.8.i @@ -290,7 +290,7 @@ __barray_mask_borrow.exit.8.i: ; preds = %cond_171_case_1.8.i %73 = or disjoint i64 %71, 256, !dbg !21 store i64 %73, ptr %1, align 4, !dbg !21 %74 = load i64, ptr %36, align 4, !dbg !23 - tail call void @___qfree(i64 %74), !dbg !24 + notail call void @___qfree(i64 %74), !dbg !24 %.pre = load i64, ptr %1, align 4, !dbg !10 br label %__barray_check_bounds.exit.9.i @@ -304,7 +304,7 @@ __barray_mask_borrow.exit.9.i: ; preds = %__barray_check_boun %77 = or disjoint i64 %75, 512, !dbg !21 store i64 %77, ptr %1, align 4, !dbg !21 %78 = load i64, ptr %40, align 4, !dbg !23 - tail call void @___qfree(i64 %78), !dbg !24 + notail call void @___qfree(i64 %78), !dbg !24 %.pre344.i = load i64, ptr %1, align 4, !dbg !25 br label %cond_exit_156.i @@ -316,14 +316,14 @@ cond_exit_156.i: ; preds = %__barray_mask_borro br i1 %81, label %"__hugr__.guppylang.std.quantum.discard_array$10.113.exit", label %mask_block_err.i.i, !dbg !25 mask_block_err.i.i: ; preds = %cond_exit_156.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0"), !dbg !25 + notail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0"), !dbg !25 unreachable, !dbg !25 __barray_mask_borrow.exit.i: ; preds = %cond_exit_20.9 %82 = or disjoint i64 %41, 1, !dbg !21 store i64 %82, ptr %1, align 4, !dbg !21 %83 = load i64, ptr %0, align 4, !dbg !23 - tail call void @___qfree(i64 %83), !dbg !24 + notail call void @___qfree(i64 %83), !dbg !24 %.pre.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.1.i @@ -349,7 +349,7 @@ declare void @___reset(i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !28 { entry: tail call void @setup(i64 %0), !dbg !32 - tail call void @"__hugr__.__main__.discard_qb_array..main.1"(), !dbg !32 + notail call void @"__hugr__.__main__.discard_qb_array..main.1"(), !dbg !32 %1 = tail call i64 @teardown(), !dbg !32 ret i64 %1, !dbg !32 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-flip_some/flip_some_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-flip_some/flip_some_aarch64-apple-darwin index 2f6c7ab3e..696312fd4 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-flip_some/flip_some_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-flip_some/flip_some_aarch64-apple-darwin @@ -11,69 +11,69 @@ target triple = "aarch64-apple-darwin" define void @"__hugr__.__main__.flip_some..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - %qalloc.i = tail call i64 @___qalloc(), !dbg !8 + %qalloc.i = notail call i64 @___qalloc(), !dbg !8 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 br i1 %not_max.not.not.i, label %cond_40_case_0.i, label %__hugr__.__tk2_qalloc.36.exit, !dbg !8 cond_40_case_0.i: ; preds = %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 unreachable, !dbg !8 __hugr__.__tk2_qalloc.36.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i), !dbg !8 - tail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00), !dbg !9 - %qalloc.i101 = tail call i64 @___qalloc(), !dbg !10 + notail call void @___reset(i64 %qalloc.i), !dbg !8 + notail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00), !dbg !9 + %qalloc.i101 = notail call i64 @___qalloc(), !dbg !10 %not_max.not.not.i102 = icmp eq i64 %qalloc.i101, -1, !dbg !10 br i1 %not_max.not.not.i102, label %cond_54_case_0.i, label %__hugr__.__tk2_qalloc.50.exit, !dbg !10 cond_54_case_0.i: ; preds = %__hugr__.__tk2_qalloc.36.exit - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !10 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !10 unreachable, !dbg !10 __hugr__.__tk2_qalloc.50.exit: ; preds = %__hugr__.__tk2_qalloc.36.exit - tail call void @___reset(i64 %qalloc.i101), !dbg !10 - %qalloc.i103 = tail call i64 @___qalloc(), !dbg !11 + notail call void @___reset(i64 %qalloc.i101), !dbg !10 + %qalloc.i103 = notail call i64 @___qalloc(), !dbg !11 %not_max.not.not.i104 = icmp eq i64 %qalloc.i103, -1, !dbg !11 br i1 %not_max.not.not.i104, label %cond_68_case_0.i, label %__hugr__.__tk2_qalloc.64.exit, !dbg !11 cond_68_case_0.i: ; preds = %__hugr__.__tk2_qalloc.50.exit - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !11 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !11 unreachable, !dbg !11 __hugr__.__tk2_qalloc.64.exit: ; preds = %__hugr__.__tk2_qalloc.50.exit - tail call void @___reset(i64 %qalloc.i103), !dbg !11 - tail call void @___rxy(i64 %qalloc.i103, double 0x400921FB54442D18, double 0.000000e+00), !dbg !12 - %qalloc.i105 = tail call i64 @___qalloc(), !dbg !13 + notail call void @___reset(i64 %qalloc.i103), !dbg !11 + notail call void @___rxy(i64 %qalloc.i103, double 0x400921FB54442D18, double 0.000000e+00), !dbg !12 + %qalloc.i105 = notail call i64 @___qalloc(), !dbg !13 %not_max.not.not.i106 = icmp eq i64 %qalloc.i105, -1, !dbg !13 br i1 %not_max.not.not.i106, label %cond_82_case_0.i, label %__hugr__.__tk2_qalloc.78.exit, !dbg !13 cond_82_case_0.i: ; preds = %__hugr__.__tk2_qalloc.64.exit - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !13 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !13 unreachable, !dbg !13 __hugr__.__tk2_qalloc.78.exit: ; preds = %__hugr__.__tk2_qalloc.64.exit - tail call void @___reset(i64 %qalloc.i105), !dbg !13 - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) - tail call void @___qfree(i64 %qalloc.i) + notail call void @___reset(i64 %qalloc.i105), !dbg !13 + %lazy_measure = notail call i64 @___lazy_measure(i64 %qalloc.i) + notail 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) - tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool), !dbg !14 - %lazy_measure22 = tail call i64 @___lazy_measure(i64 %qalloc.i101) - tail call void @___qfree(i64 %qalloc.i101) + notail call void @___dec_future_refcount(i64 %lazy_measure) + notail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool), !dbg !14 + %lazy_measure22 = notail call i64 @___lazy_measure(i64 %qalloc.i101) + notail call void @___qfree(i64 %qalloc.i101) %read_bool35 = 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_c1.1F7A6571.0, i64 12, i1 %read_bool35), !dbg !15 - %lazy_measure44 = tail call i64 @___lazy_measure(i64 %qalloc.i103) - tail call void @___qfree(i64 %qalloc.i103) + notail call void @___dec_future_refcount(i64 %lazy_measure22) + notail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool35), !dbg !15 + %lazy_measure44 = notail call i64 @___lazy_measure(i64 %qalloc.i103) + notail call void @___qfree(i64 %qalloc.i103) %read_bool57 = tail call i1 @___read_future_bool(i64 %lazy_measure44) - tail call void @___dec_future_refcount(i64 %lazy_measure44) - tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool57), !dbg !16 - tail call void @___rxy(i64 %qalloc.i105, double 0x400921FB54442D18, double 0.000000e+00), !dbg !17 - %lazy_measure67 = tail call i64 @___lazy_measure(i64 %qalloc.i105) - tail call void @___qfree(i64 %qalloc.i105) + notail call void @___dec_future_refcount(i64 %lazy_measure44) + notail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool57), !dbg !16 + notail call void @___rxy(i64 %qalloc.i105, double 0x400921FB54442D18, double 0.000000e+00), !dbg !17 + %lazy_measure67 = notail call i64 @___lazy_measure(i64 %qalloc.i105) + notail call void @___qfree(i64 %qalloc.i105) %read_bool80 = tail call i1 @___read_future_bool(i64 %lazy_measure67) - tail call void @___dec_future_refcount(i64 %lazy_measure67) - tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool80), !dbg !18 + notail call void @___dec_future_refcount(i64 %lazy_measure67) + notail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool80), !dbg !18 ret void } @@ -99,7 +99,7 @@ declare void @___rxy(i64, double, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !19 { entry: tail call void @setup(i64 %0), !dbg !24 - tail call void @"__hugr__.__main__.flip_some..main.1"(), !dbg !24 + notail call void @"__hugr__.__main__.flip_some..main.1"(), !dbg !24 %1 = tail call i64 @teardown(), !dbg !24 ret i64 %1, !dbg !24 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-measure_qb_array/measure_qb_array_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-measure_qb_array/measure_qb_array_aarch64-apple-darwin index cbc2ada33..78510a72b 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-measure_qb_array/measure_qb_array_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-measure_qb_array/measure_qb_array_aarch64-apple-darwin @@ -13,34 +13,34 @@ alloca_block: %0 = tail call ptr @heap_alloc(i64 80), !dbg !8 %1 = tail call ptr @heap_alloc(i64 8), !dbg !8 store i64 -1, ptr %1, align 1, !dbg !8 - %qalloc.i = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !9 br i1 %not_max.not.not.i, label %cond_299_case_0.i, label %__hugr__.__tk2_qalloc.295.exit, !dbg !9 cond_299_case_0.i: ; preds = %cond_exit_20.8, %cond_exit_20.7, %cond_exit_20.6, %cond_exit_20.5, %cond_exit_20.4, %cond_exit_20.3, %cond_exit_20.2, %cond_exit_20.1, %cond_exit_20, %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 unreachable, !dbg !9 __hugr__.__tk2_qalloc.295.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i), !dbg !9 + notail call void @___reset(i64 %qalloc.i), !dbg !9 %2 = load i64, ptr %1, align 4 %3 = trunc i64 %2 to i1 br i1 %3, label %cond_exit_20, label %panic.i panic.i: ; preds = %__barray_check_bounds.exit.9, %__hugr__.__tk2_qalloc.295.exit.8, %__hugr__.__tk2_qalloc.295.exit.7, %__hugr__.__tk2_qalloc.295.exit.6, %__hugr__.__tk2_qalloc.295.exit.5, %__hugr__.__tk2_qalloc.295.exit.4, %__hugr__.__tk2_qalloc.295.exit.3, %__hugr__.__tk2_qalloc.295.exit.2, %__hugr__.__tk2_qalloc.295.exit.1, %__hugr__.__tk2_qalloc.295.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") + notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable cond_exit_20: ; preds = %__hugr__.__tk2_qalloc.295.exit %4 = and i64 %2, -2 store i64 %4, ptr %1, align 4 store i64 %qalloc.i, ptr %0, align 4 - %qalloc.i.1 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.1 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1, !dbg !9 br i1 %not_max.not.not.i.1, label %cond_299_case_0.i, label %__hugr__.__tk2_qalloc.295.exit.1, !dbg !9 __hugr__.__tk2_qalloc.295.exit.1: ; preds = %cond_exit_20 - tail call void @___reset(i64 %qalloc.i.1), !dbg !9 + notail call void @___reset(i64 %qalloc.i.1), !dbg !9 %5 = load i64, ptr %1, align 4 %6 = and i64 %5, 2 %.not280 = icmp eq i64 %6, 0 @@ -51,12 +51,12 @@ cond_exit_20.1: ; preds = %__hugr__.__tk2_qall store i64 %7, ptr %1, align 4 %8 = getelementptr inbounds nuw i8, ptr %0, i64 8 store i64 %qalloc.i.1, ptr %8, align 4 - %qalloc.i.2 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.2 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1, !dbg !9 br i1 %not_max.not.not.i.2, label %cond_299_case_0.i, label %__hugr__.__tk2_qalloc.295.exit.2, !dbg !9 __hugr__.__tk2_qalloc.295.exit.2: ; preds = %cond_exit_20.1 - tail call void @___reset(i64 %qalloc.i.2), !dbg !9 + notail call void @___reset(i64 %qalloc.i.2), !dbg !9 %9 = load i64, ptr %1, align 4 %10 = and i64 %9, 4 %.not281 = icmp eq i64 %10, 0 @@ -67,12 +67,12 @@ cond_exit_20.2: ; preds = %__hugr__.__tk2_qall store i64 %11, ptr %1, align 4 %12 = getelementptr inbounds nuw i8, ptr %0, i64 16 store i64 %qalloc.i.2, ptr %12, align 4 - %qalloc.i.3 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.3 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1, !dbg !9 br i1 %not_max.not.not.i.3, label %cond_299_case_0.i, label %__hugr__.__tk2_qalloc.295.exit.3, !dbg !9 __hugr__.__tk2_qalloc.295.exit.3: ; preds = %cond_exit_20.2 - tail call void @___reset(i64 %qalloc.i.3), !dbg !9 + notail call void @___reset(i64 %qalloc.i.3), !dbg !9 %13 = load i64, ptr %1, align 4 %14 = and i64 %13, 8 %.not282 = icmp eq i64 %14, 0 @@ -83,12 +83,12 @@ cond_exit_20.3: ; preds = %__hugr__.__tk2_qall store i64 %15, ptr %1, align 4 %16 = getelementptr inbounds nuw i8, ptr %0, i64 24 store i64 %qalloc.i.3, ptr %16, align 4 - %qalloc.i.4 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.4 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1, !dbg !9 br i1 %not_max.not.not.i.4, label %cond_299_case_0.i, label %__hugr__.__tk2_qalloc.295.exit.4, !dbg !9 __hugr__.__tk2_qalloc.295.exit.4: ; preds = %cond_exit_20.3 - tail call void @___reset(i64 %qalloc.i.4), !dbg !9 + notail call void @___reset(i64 %qalloc.i.4), !dbg !9 %17 = load i64, ptr %1, align 4 %18 = and i64 %17, 16 %.not283 = icmp eq i64 %18, 0 @@ -99,12 +99,12 @@ cond_exit_20.4: ; preds = %__hugr__.__tk2_qall store i64 %19, ptr %1, align 4 %20 = getelementptr inbounds nuw i8, ptr %0, i64 32 store i64 %qalloc.i.4, ptr %20, align 4 - %qalloc.i.5 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.5 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.5 = icmp eq i64 %qalloc.i.5, -1, !dbg !9 br i1 %not_max.not.not.i.5, label %cond_299_case_0.i, label %__hugr__.__tk2_qalloc.295.exit.5, !dbg !9 __hugr__.__tk2_qalloc.295.exit.5: ; preds = %cond_exit_20.4 - tail call void @___reset(i64 %qalloc.i.5), !dbg !9 + notail call void @___reset(i64 %qalloc.i.5), !dbg !9 %21 = load i64, ptr %1, align 4 %22 = and i64 %21, 32 %.not284 = icmp eq i64 %22, 0 @@ -115,12 +115,12 @@ cond_exit_20.5: ; preds = %__hugr__.__tk2_qall store i64 %23, ptr %1, align 4 %24 = getelementptr inbounds nuw i8, ptr %0, i64 40 store i64 %qalloc.i.5, ptr %24, align 4 - %qalloc.i.6 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.6 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.6 = icmp eq i64 %qalloc.i.6, -1, !dbg !9 br i1 %not_max.not.not.i.6, label %cond_299_case_0.i, label %__hugr__.__tk2_qalloc.295.exit.6, !dbg !9 __hugr__.__tk2_qalloc.295.exit.6: ; preds = %cond_exit_20.5 - tail call void @___reset(i64 %qalloc.i.6), !dbg !9 + notail call void @___reset(i64 %qalloc.i.6), !dbg !9 %25 = load i64, ptr %1, align 4 %26 = and i64 %25, 64 %.not285 = icmp eq i64 %26, 0 @@ -131,12 +131,12 @@ cond_exit_20.6: ; preds = %__hugr__.__tk2_qall store i64 %27, ptr %1, align 4 %28 = getelementptr inbounds nuw i8, ptr %0, i64 48 store i64 %qalloc.i.6, ptr %28, align 4 - %qalloc.i.7 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.7 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.7 = icmp eq i64 %qalloc.i.7, -1, !dbg !9 br i1 %not_max.not.not.i.7, label %cond_299_case_0.i, label %__hugr__.__tk2_qalloc.295.exit.7, !dbg !9 __hugr__.__tk2_qalloc.295.exit.7: ; preds = %cond_exit_20.6 - tail call void @___reset(i64 %qalloc.i.7), !dbg !9 + notail call void @___reset(i64 %qalloc.i.7), !dbg !9 %29 = load i64, ptr %1, align 4 %30 = and i64 %29, 128 %.not286 = icmp eq i64 %30, 0 @@ -147,12 +147,12 @@ cond_exit_20.7: ; preds = %__hugr__.__tk2_qall store i64 %31, ptr %1, align 4 %32 = getelementptr inbounds nuw i8, ptr %0, i64 56 store i64 %qalloc.i.7, ptr %32, align 4 - %qalloc.i.8 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.8 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.8 = icmp eq i64 %qalloc.i.8, -1, !dbg !9 br i1 %not_max.not.not.i.8, label %cond_299_case_0.i, label %__hugr__.__tk2_qalloc.295.exit.8, !dbg !9 __hugr__.__tk2_qalloc.295.exit.8: ; preds = %cond_exit_20.7 - tail call void @___reset(i64 %qalloc.i.8), !dbg !9 + notail call void @___reset(i64 %qalloc.i.8), !dbg !9 %33 = load i64, ptr %1, align 4 %34 = and i64 %33, 256 %.not287 = icmp eq i64 %34, 0 @@ -163,12 +163,12 @@ cond_exit_20.8: ; preds = %__hugr__.__tk2_qall store i64 %35, ptr %1, align 4 %36 = getelementptr inbounds nuw i8, ptr %0, i64 64 store i64 %qalloc.i.8, ptr %36, align 4 - %qalloc.i.9 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.9 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.9 = icmp eq i64 %qalloc.i.9, -1, !dbg !9 br i1 %not_max.not.not.i.9, label %cond_299_case_0.i, label %__barray_check_bounds.exit.9, !dbg !9 __barray_check_bounds.exit.9: ; preds = %cond_exit_20.8 - tail call void @___reset(i64 %qalloc.i.9), !dbg !9 + notail call void @___reset(i64 %qalloc.i.9), !dbg !9 %37 = load i64, ptr %1, align 4 %38 = and i64 %37, 512 %.not288 = icmp eq i64 %38, 0 @@ -187,20 +187,20 @@ cond_exit_20.9: ; preds = %__barray_check_boun br i1 %42, label %panic.i238, label %__barray_mask_borrow.exit, !dbg !10 panic.i238: ; preds = %cond_exit_20.9 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !10 + notail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !10 unreachable, !dbg !10 __barray_mask_borrow.exit: ; preds = %cond_exit_20.9 %43 = or disjoint i64 %41, 1, !dbg !10 store i64 %43, ptr %1, align 4, !dbg !10 %44 = load i64, ptr %0, align 4, !dbg !12 - tail call void @___rxy(i64 %44, double 0x400921FB54442D18, double 0.000000e+00), !dbg !13 + notail call void @___rxy(i64 %44, double 0x400921FB54442D18, double 0.000000e+00), !dbg !13 %45 = load i64, ptr %1, align 4, !dbg !12 %46 = trunc i64 %45 to i1, !dbg !12 br i1 %46, label %__barray_mask_return.exit240, label %panic.i239, !dbg !12 panic.i239: ; preds = %__barray_mask_borrow.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !12 + notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !12 unreachable, !dbg !12 __barray_mask_return.exit240: ; preds = %__barray_mask_borrow.exit @@ -213,21 +213,21 @@ __barray_mask_return.exit240: ; preds = %__barray_mask_borro br i1 %.not, label %__barray_mask_borrow.exit242, label %panic.i241, !dbg !14 panic.i241: ; preds = %__barray_mask_return.exit240 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !14 + notail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !14 unreachable, !dbg !14 __barray_mask_borrow.exit242: ; preds = %__barray_mask_return.exit240 %50 = or disjoint i64 %48, 4, !dbg !14 store i64 %50, ptr %1, align 4, !dbg !14 %51 = load i64, ptr %12, align 4, !dbg !16 - tail call void @___rxy(i64 %51, double 0x400921FB54442D18, double 0.000000e+00), !dbg !17 + notail call void @___rxy(i64 %51, double 0x400921FB54442D18, double 0.000000e+00), !dbg !17 %52 = load i64, ptr %1, align 4, !dbg !16 %53 = and i64 %52, 4, !dbg !16 %.not268 = icmp eq i64 %53, 0, !dbg !16 br i1 %.not268, label %panic.i243, label %__barray_mask_return.exit244, !dbg !16 panic.i243: ; preds = %__barray_mask_borrow.exit242 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !16 + notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !16 unreachable, !dbg !16 __barray_mask_return.exit244: ; preds = %__barray_mask_borrow.exit242 @@ -240,21 +240,21 @@ __barray_mask_return.exit244: ; preds = %__barray_mask_borro br i1 %.not269, label %__barray_mask_borrow.exit246, label %panic.i245, !dbg !18 panic.i245: ; preds = %__barray_mask_return.exit244 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !18 + notail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !18 unreachable, !dbg !18 __barray_mask_borrow.exit246: ; preds = %__barray_mask_return.exit244 %57 = or disjoint i64 %55, 8, !dbg !18 store i64 %57, ptr %1, align 4, !dbg !18 %58 = load i64, ptr %16, align 4, !dbg !20 - tail call void @___rxy(i64 %58, double 0x400921FB54442D18, double 0.000000e+00), !dbg !21 + notail call void @___rxy(i64 %58, double 0x400921FB54442D18, double 0.000000e+00), !dbg !21 %59 = load i64, ptr %1, align 4, !dbg !20 %60 = and i64 %59, 8, !dbg !20 %.not270 = icmp eq i64 %60, 0, !dbg !20 br i1 %.not270, label %panic.i247, label %__barray_mask_return.exit248, !dbg !20 panic.i247: ; preds = %__barray_mask_borrow.exit246 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !20 + notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !20 unreachable, !dbg !20 __barray_mask_return.exit248: ; preds = %__barray_mask_borrow.exit246 @@ -267,21 +267,21 @@ __barray_mask_return.exit248: ; preds = %__barray_mask_borro br i1 %.not271, label %__barray_mask_borrow.exit250, label %panic.i249, !dbg !22 panic.i249: ; preds = %__barray_mask_return.exit248 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !22 + notail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !22 unreachable, !dbg !22 __barray_mask_borrow.exit250: ; preds = %__barray_mask_return.exit248 %64 = or disjoint i64 %62, 512, !dbg !22 store i64 %64, ptr %1, align 4, !dbg !22 %65 = load i64, ptr %40, align 4, !dbg !24 - tail call void @___rxy(i64 %65, double 0x400921FB54442D18, double 0.000000e+00), !dbg !25 + notail call void @___rxy(i64 %65, double 0x400921FB54442D18, double 0.000000e+00), !dbg !25 %66 = load i64, ptr %1, align 4, !dbg !24 %67 = and i64 %66, 512, !dbg !24 %.not272 = icmp eq i64 %67, 0, !dbg !24 br i1 %.not272, label %panic.i251, label %__barray_mask_return.exit252, !dbg !24 panic.i251: ; preds = %__barray_mask_borrow.exit250 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !24 + notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !24 unreachable, !dbg !24 __barray_mask_return.exit252: ; preds = %__barray_mask_borrow.exit250 @@ -332,7 +332,7 @@ mask_block_ok.i.i.i: ; preds = %72, %90 br i1 %93, label %90, label %mask_block_err.i.i.i, !dbg !44 mask_block_err.i.i.i: ; preds = %mask_block_ok.i.i.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0"), !dbg !44 + notail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0"), !dbg !44 unreachable, !dbg !44 __barray_check_bounds.exit.i.i: ; preds = %loop_body.i, %__barray_mask_return.exit252 @@ -352,7 +352,7 @@ __barray_check_bounds.exit.i.i: ; preds = %loop_body.i, %__bar br i1 %101, label %panic.i.i.i, label %__barray_check_bounds.exit.i, !dbg !56 panic.i.i.i: ; preds = %__barray_check_bounds.exit.i.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !56 + notail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !56 unreachable, !dbg !56 __barray_check_bounds.exit.i: ; preds = %__barray_check_bounds.exit.i.i @@ -361,15 +361,15 @@ __barray_check_bounds.exit.i: ; preds = %__barray_check_boun store i64 %103, ptr %97, align 4, !dbg !56 %104 = getelementptr inbounds i64, ptr %.fca.0.extract80.i185.i, i64 %95, !dbg !55 %105 = load i64, ptr %104, align 4, !dbg !55 - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %105) - tail call void @___qfree(i64 %105) + %lazy_measure.i = notail call i64 @___lazy_measure(i64 %105) + notail call void @___qfree(i64 %105) %106 = load i64, ptr %71, align 4 %107 = lshr i64 %106, %"163_0.sroa.15.0184.i" %108 = trunc i64 %107 to i1 br i1 %108, label %loop_body.i, label %panic.i.i panic.i.i: ; preds = %__barray_check_bounds.exit.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") + notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable loop_body.i: ; preds = %__barray_check_bounds.exit.i @@ -406,7 +406,7 @@ cond_exit_369: ; preds = %cond_369_case_0 ret void mask_block_err.i: ; preds = %cond_369_case_0 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") + notail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable __barray_check_bounds.exit255: ; preds = %"__hugr__.guppylang.std.quantum.measure_array$10.149.exit", %cond_exit_369.thread @@ -432,7 +432,7 @@ cond_exit_369.thread: ; preds = %cond_392_case_1, %_ cond_392_case_1: ; preds = %__barray_mask_borrow.exit259 %.fca.1.extract = extractvalue { i1, i64, i1 } %124, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract) + notail call void @___dec_future_refcount(i64 %.fca.1.extract) br label %cond_exit_369.thread } @@ -458,7 +458,7 @@ declare void @___reset(i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !59 { entry: tail call void @setup(i64 %0), !dbg !63 - tail call void @"__hugr__.__main__.measure_qb_array..main.1"(), !dbg !63 + notail call void @"__hugr__.__main__.measure_qb_array..main.1"(), !dbg !63 %1 = tail call i64 @teardown(), !dbg !63 ret i64 %1, !dbg !63 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-no_results/no_results_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-no_results/no_results_aarch64-apple-darwin index df22866bb..59763e774 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-no_results/no_results_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-no_results/no_results_aarch64-apple-darwin @@ -7,21 +7,21 @@ target triple = "aarch64-apple-darwin" define void @"__hugr__.__main__.no_results..bar.1"() local_unnamed_addr !dbg !4 { alloca_block: - %qalloc.i = tail call i64 @___qalloc(), !dbg !8 + %qalloc.i = notail call i64 @___qalloc(), !dbg !8 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 br i1 %not_max.not.not.i, label %cond_18_case_0.i, label %__hugr__.__tk2_qalloc.14.exit, !dbg !8 cond_18_case_0.i: ; preds = %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 unreachable, !dbg !8 __hugr__.__tk2_qalloc.14.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i), !dbg !8 - tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 - tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 - %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) + notail call void @___reset(i64 %qalloc.i), !dbg !8 + notail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 + notail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 + %lazy_measure = notail call i64 @___lazy_measure(i64 %qalloc.i) + notail call void @___qfree(i64 %qalloc.i) + notail call void @___dec_future_refcount(i64 %lazy_measure) ret void } @@ -45,7 +45,7 @@ declare void @___rz(i64, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !10 { entry: tail call void @setup(i64 %0), !dbg !15 - tail call void @"__hugr__.__main__.no_results..bar.1"(), !dbg !15 + notail call void @"__hugr__.__main__.no_results..bar.1"(), !dbg !15 %1 = tail call i64 @teardown(), !dbg !15 ret i64 %1, !dbg !15 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-postselect_exit/postselect_exit_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-postselect_exit/postselect_exit_aarch64-apple-darwin index 358d4805b..085e5cb52 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-postselect_exit/postselect_exit_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-postselect_exit/postselect_exit_aarch64-apple-darwin @@ -9,33 +9,33 @@ target triple = "aarch64-apple-darwin" define void @"__hugr__.__main__.postselect_exit..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - %qalloc.i = tail call i64 @___qalloc(), !dbg !8 + %qalloc.i = notail call i64 @___qalloc(), !dbg !8 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 br i1 %not_max.not.not.i, label %cond_45_case_0.i, label %__hugr__.__tk2_qalloc.41.exit, !dbg !8 cond_45_case_0.i: ; preds = %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 unreachable, !dbg !8 __hugr__.__tk2_qalloc.41.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i), !dbg !8 - tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 - tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) - tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure) + notail call void @___reset(i64 %qalloc.i), !dbg !8 + notail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 + notail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 + %lazy_measure = notail call i64 @___lazy_measure(i64 %qalloc.i) + notail call void @___qfree(i64 %qalloc.i) + notail call void @___inc_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) + notail call void @___dec_future_refcount(i64 %lazy_measure) br i1 %read_bool, label %0, label %cond_98_case_1 cond_98_case_1: ; preds = %__hugr__.__tk2_qalloc.41.exit %read_bool66 = 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_c.1C9EF4D1.0, i64 11, i1 %read_bool66), !dbg !10 + notail call void @___dec_future_refcount(i64 %lazy_measure) + notail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool66), !dbg !10 ret void 0: ; preds = %__hugr__.__tk2_qalloc.41.exit - tail call void @panic(i32 42, ptr nonnull @s_Postselect.13DF1CD0.0), !dbg !11 + notail call void @panic(i32 42, ptr nonnull @s_Postselect.13DF1CD0.0), !dbg !11 unreachable } @@ -65,7 +65,7 @@ declare void @___rz(i64, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !12 { entry: tail call void @setup(i64 %0), !dbg !17 - tail call void @"__hugr__.__main__.postselect_exit..main.1"(), !dbg !17 + notail call void @"__hugr__.__main__.postselect_exit..main.1"(), !dbg !17 %1 = tail call i64 @teardown(), !dbg !17 ret i64 %1, !dbg !17 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-postselect_panic/postselect_panic_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-postselect_panic/postselect_panic_aarch64-apple-darwin index 7d1a561f7..23f6578fe 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-postselect_panic/postselect_panic_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-postselect_panic/postselect_panic_aarch64-apple-darwin @@ -9,33 +9,33 @@ target triple = "aarch64-apple-darwin" define void @"__hugr__.__main__.postselect_panic..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - %qalloc.i = tail call i64 @___qalloc(), !dbg !8 + %qalloc.i = notail call i64 @___qalloc(), !dbg !8 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 br i1 %not_max.not.not.i, label %cond_43_case_0.i, label %__hugr__.__tk2_qalloc.39.exit, !dbg !8 cond_43_case_0.i: ; preds = %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 unreachable, !dbg !8 __hugr__.__tk2_qalloc.39.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i), !dbg !8 - tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 - tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) - tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure) + notail call void @___reset(i64 %qalloc.i), !dbg !8 + notail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 + notail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 + %lazy_measure = notail call i64 @___lazy_measure(i64 %qalloc.i) + notail call void @___qfree(i64 %qalloc.i) + notail call void @___inc_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) + notail call void @___dec_future_refcount(i64 %lazy_measure) br i1 %read_bool, label %0, label %cond_96_case_1 cond_96_case_1: ; preds = %__hugr__.__tk2_qalloc.39.exit %read_bool65 = 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_c.1C9EF4D1.0, i64 11, i1 %read_bool65), !dbg !10 + notail call void @___dec_future_refcount(i64 %lazy_measure) + notail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool65), !dbg !10 ret void 0: ; preds = %__hugr__.__tk2_qalloc.39.exit - tail call void @panic(i32 1001, ptr nonnull @s_Postselect.13DF1CD0.0), !dbg !11 + notail call void @panic(i32 1001, ptr nonnull @s_Postselect.13DF1CD0.0), !dbg !11 unreachable } @@ -65,7 +65,7 @@ declare void @___rz(i64, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !12 { entry: tail call void @setup(i64 %0), !dbg !17 - tail call void @"__hugr__.__main__.postselect_panic..main.1"(), !dbg !17 + notail call void @"__hugr__.__main__.postselect_panic..main.1"(), !dbg !17 %1 = tail call i64 @teardown(), !dbg !17 ret i64 %1, !dbg !17 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-print_current_shot/print_current_shot_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-print_current_shot/print_current_shot_aarch64-apple-darwin index ed52d3abc..fc9c34d3d 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-print_current_shot/print_current_shot_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-print_current_shot/print_current_shot_aarch64-apple-darwin @@ -7,8 +7,8 @@ target triple = "aarch64-apple-darwin" define void @"__hugr__.__main__.print_current_shot..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - %shot = tail call i64 @get_current_shot(), !dbg !8 - tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot), !dbg !9 + %shot = notail call i64 @get_current_shot(), !dbg !8 + notail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot), !dbg !9 ret void } @@ -19,8 +19,8 @@ declare void @print_int(ptr, i64, i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !10 { entry: tail call void @setup(i64 %0), !dbg !15 - %shot.i = tail call i64 @get_current_shot(), !dbg !16 - tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot.i), !dbg !18 + %shot.i = notail call i64 @get_current_shot(), !dbg !16 + notail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot.i), !dbg !18 %1 = tail call i64 @teardown(), !dbg !15 ret i64 %1, !dbg !15 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-rng/rng_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-rng/rng_aarch64-apple-darwin index 02d59c7f9..65ff69a84 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-rng/rng_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-rng/rng_aarch64-apple-darwin @@ -13,27 +13,27 @@ target triple = "aarch64-apple-darwin" define void @"__hugr__.__main__.rng..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - tail call void @random_seed(i64 42), !dbg !8 - %rint = tail call i32 @random_int(), !dbg !17 - %rint14 = tail call i32 @random_int(), !dbg !18 - %rfloat = tail call double @random_float(), !dbg !19 - %rintb = tail call i32 @random_rng(i32 100), !dbg !20 + notail call void @random_seed(i64 42), !dbg !8 + %rint = notail call i32 @random_int(), !dbg !17 + %rint14 = notail call i32 @random_int(), !dbg !18 + %rfloat = notail call double @random_float(), !dbg !19 + %rintb = notail call i32 @random_rng(i32 100), !dbg !20 %0 = sext i32 %rintb to i64, !dbg !20 %1 = sext i32 %rint14 to i64, !dbg !18 %2 = sext i32 %rint to i64, !dbg !17 - tail call void @print_int(ptr nonnull @res_rint.B928E41E.0, i64 13, i64 %2), !dbg !21 - tail call void @print_int(ptr nonnull @res_rint1.0884EC03.0, i64 14, i64 %1), !dbg !22 - tail call void @print_float(ptr nonnull @res_rfloat.F0E4DD2C.0, i64 17, double %rfloat), !dbg !23 - tail call void @print_int(ptr nonnull @res_rint_bnd.CB1E6B0D.0, i64 17, i64 %0), !dbg !24 - tail call void @random_seed(i64 84), !dbg !25 - %rint47 = tail call i32 @random_int(), !dbg !27 - %rfloat49 = tail call double @random_float(), !dbg !28 - %rintb52 = tail call i32 @random_rng(i32 200), !dbg !29 + notail call void @print_int(ptr nonnull @res_rint.B928E41E.0, i64 13, i64 %2), !dbg !21 + notail call void @print_int(ptr nonnull @res_rint1.0884EC03.0, i64 14, i64 %1), !dbg !22 + notail call void @print_float(ptr nonnull @res_rfloat.F0E4DD2C.0, i64 17, double %rfloat), !dbg !23 + notail call void @print_int(ptr nonnull @res_rint_bnd.CB1E6B0D.0, i64 17, i64 %0), !dbg !24 + notail call void @random_seed(i64 84), !dbg !25 + %rint47 = notail call i32 @random_int(), !dbg !27 + %rfloat49 = notail call double @random_float(), !dbg !28 + %rintb52 = notail call i32 @random_rng(i32 200), !dbg !29 %3 = sext i32 %rintb52 to i64, !dbg !29 %4 = sext i32 %rint47 to i64, !dbg !27 - tail call void @print_int(ptr nonnull @res_rint2.F0335598.0, i64 14, i64 %4), !dbg !30 - tail call void @print_float(ptr nonnull @res_rfloat2.4DAB941F.0, i64 18, double %rfloat49), !dbg !31 - tail call void @print_int(ptr nonnull @res_rint_bnd2.169DE399.0, i64 18, i64 %3), !dbg !32 + notail call void @print_int(ptr nonnull @res_rint2.F0335598.0, i64 14, i64 %4), !dbg !30 + notail call void @print_float(ptr nonnull @res_rfloat2.4DAB941F.0, i64 18, double %rfloat49), !dbg !31 + notail call void @print_int(ptr nonnull @res_rint_bnd2.169DE399.0, i64 18, i64 %3), !dbg !32 ret void } @@ -52,7 +52,7 @@ declare void @random_seed(i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !33 { entry: tail call void @setup(i64 %0), !dbg !37 - tail call void @"__hugr__.__main__.rng..main.1"(), !dbg !37 + notail call void @"__hugr__.__main__.rng..main.1"(), !dbg !37 %1 = tail call i64 @teardown(), !dbg !37 ret i64 %1, !dbg !37 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-rus/rus_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-rus/rus_aarch64-apple-darwin index 261e661bf..d24299812 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-rus/rus_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-rus/rus_aarch64-apple-darwin @@ -8,88 +8,88 @@ target triple = "aarch64-apple-darwin" define void @"__hugr__.__main__.rus..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - %qalloc.i = tail call i64 @___qalloc(), !dbg !8 + %qalloc.i = notail call i64 @___qalloc(), !dbg !8 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 br i1 %not_max.not.not.i, label %cond_87_case_0.i, label %__hugr__.__tk2_qalloc.83.exit, !dbg !8 cond_87_case_0.i: ; preds = %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 unreachable, !dbg !8 __hugr__.__tk2_qalloc.83.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i), !dbg !8 - %qalloc.i132.i = tail call i64 @___qalloc(), !dbg !9 + notail call void @___reset(i64 %qalloc.i), !dbg !8 + %qalloc.i132.i = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i133.i = icmp eq i64 %qalloc.i132.i, -1, !dbg !9 br i1 %not_max.not.not.i133.i, label %cond_101_case_0.i.i, label %__hugr__.__tk2_qalloc.97.exit.i, !dbg !9 cond_101_case_0.i.i: ; preds = %cond_242_case_1.backedge.i, %__hugr__.__tk2_qalloc.83.exit - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 unreachable, !dbg !9 __hugr__.__tk2_qalloc.97.exit.i: ; preds = %__hugr__.__tk2_qalloc.83.exit, %cond_242_case_1.backedge.i %qalloc.i134.i = phi i64 [ %qalloc.i.i, %cond_242_case_1.backedge.i ], [ %qalloc.i132.i, %__hugr__.__tk2_qalloc.83.exit ] - tail call void @___reset(i64 %qalloc.i134.i), !dbg !9 - %qalloc.i128.i = tail call i64 @___qalloc(), !dbg !15 + notail call void @___reset(i64 %qalloc.i134.i), !dbg !9 + %qalloc.i128.i = notail call i64 @___qalloc(), !dbg !15 %not_max.not.not.i129.i = icmp eq i64 %qalloc.i128.i, -1, !dbg !15 br i1 %not_max.not.not.i129.i, label %cond_115_case_0.i.i, label %__hugr__.__tk2_qalloc.111.exit.i, !dbg !15 cond_115_case_0.i.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !15 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !15 unreachable, !dbg !15 __hugr__.__tk2_qalloc.111.exit.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i - tail call void @___reset(i64 %qalloc.i128.i), !dbg !15 - tail call void @___rxy(i64 %qalloc.i128.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !16 - tail call void @___rz(i64 %qalloc.i128.i, double 0x400921FB54442D18), !dbg !16 - tail call void @___rxy(i64 %qalloc.i134.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !17 - tail call void @___rz(i64 %qalloc.i134.i, double 0x400921FB54442D18), !dbg !17 - tail call void @___rz(i64 %qalloc.i134.i, double 0xBFE921FB54442D18), !dbg !18 - tail call void @___rxy(i64 %qalloc.i134.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18), !dbg !19 - tail call void @___rzz(i64 %qalloc.i128.i, i64 %qalloc.i134.i, double 0x3FF921FB54442D18), !dbg !19 - tail call void @___rz(i64 %qalloc.i128.i, double 0xBFF921FB54442D18), !dbg !19 - tail call void @___rxy(i64 %qalloc.i134.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18), !dbg !19 - tail call void @___rz(i64 %qalloc.i134.i, double 0xBFF921FB54442D18), !dbg !19 - tail call void @___rz(i64 %qalloc.i134.i, double 0x3FE921FB54442D18), !dbg !20 - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i134.i) - tail call void @___qfree(i64 %qalloc.i134.i) + notail call void @___reset(i64 %qalloc.i128.i), !dbg !15 + notail call void @___rxy(i64 %qalloc.i128.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !16 + notail call void @___rz(i64 %qalloc.i128.i, double 0x400921FB54442D18), !dbg !16 + notail call void @___rxy(i64 %qalloc.i134.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !17 + notail call void @___rz(i64 %qalloc.i134.i, double 0x400921FB54442D18), !dbg !17 + notail call void @___rz(i64 %qalloc.i134.i, double 0xBFE921FB54442D18), !dbg !18 + notail call void @___rxy(i64 %qalloc.i134.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18), !dbg !19 + notail call void @___rzz(i64 %qalloc.i128.i, i64 %qalloc.i134.i, double 0x3FF921FB54442D18), !dbg !19 + notail call void @___rz(i64 %qalloc.i128.i, double 0xBFF921FB54442D18), !dbg !19 + notail call void @___rxy(i64 %qalloc.i134.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18), !dbg !19 + notail call void @___rz(i64 %qalloc.i134.i, double 0xBFF921FB54442D18), !dbg !19 + notail call void @___rz(i64 %qalloc.i134.i, double 0x3FE921FB54442D18), !dbg !20 + %lazy_measure.i = notail call i64 @___lazy_measure(i64 %qalloc.i134.i) + notail call void @___qfree(i64 %qalloc.i134.i) %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) - tail call void @___dec_future_refcount(i64 %lazy_measure.i) + notail call void @___dec_future_refcount(i64 %lazy_measure.i) br i1 %read_bool.i, label %cond_256_case_1.i, label %0 0: ; preds = %__hugr__.__tk2_qalloc.111.exit.i - tail call void @___qfree(i64 %qalloc.i128.i), !dbg !21 + notail call void @___qfree(i64 %qalloc.i128.i), !dbg !21 br label %cond_242_case_1.backedge.i cond_242_case_1.backedge.i: ; preds = %1, %0 - %qalloc.i.i = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.i = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1, !dbg !9 br i1 %not_max.not.not.i.i, label %cond_101_case_0.i.i, label %__hugr__.__tk2_qalloc.97.exit.i, !dbg !9 cond_256_case_1.i: ; preds = %__hugr__.__tk2_qalloc.111.exit.i - tail call void @___rz(i64 %qalloc.i, double 0x3FE921FB54442D18), !dbg !22 - tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !23 - tail call void @___rxy(i64 %qalloc.i128.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18), !dbg !24 - tail call void @___rzz(i64 %qalloc.i, i64 %qalloc.i128.i, double 0x3FF921FB54442D18), !dbg !24 - tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18), !dbg !24 - tail call void @___rxy(i64 %qalloc.i128.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18), !dbg !24 - tail call void @___rz(i64 %qalloc.i128.i, double 0xBFF921FB54442D18), !dbg !24 - tail call void @___rz(i64 %qalloc.i128.i, double 0x3FE921FB54442D18), !dbg !25 - %lazy_measure67.i = tail call i64 @___lazy_measure(i64 %qalloc.i128.i) - tail call void @___qfree(i64 %qalloc.i128.i) + notail call void @___rz(i64 %qalloc.i, double 0x3FE921FB54442D18), !dbg !22 + notail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !23 + notail call void @___rxy(i64 %qalloc.i128.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18), !dbg !24 + notail call void @___rzz(i64 %qalloc.i, i64 %qalloc.i128.i, double 0x3FF921FB54442D18), !dbg !24 + notail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18), !dbg !24 + notail call void @___rxy(i64 %qalloc.i128.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18), !dbg !24 + notail call void @___rz(i64 %qalloc.i128.i, double 0xBFF921FB54442D18), !dbg !24 + notail call void @___rz(i64 %qalloc.i128.i, double 0x3FE921FB54442D18), !dbg !25 + %lazy_measure67.i = notail call i64 @___lazy_measure(i64 %qalloc.i128.i) + notail call void @___qfree(i64 %qalloc.i128.i) %read_bool80.i = tail call i1 @___read_future_bool(i64 %lazy_measure67.i) - tail call void @___dec_future_refcount(i64 %lazy_measure67.i) + notail call void @___dec_future_refcount(i64 %lazy_measure67.i) br i1 %read_bool80.i, label %"__hugr__.__main__.rus..rus.17.exit", label %1 1: ; preds = %cond_256_case_1.i - tail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00), !dbg !26 + notail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00), !dbg !26 br label %cond_242_case_1.backedge.i "__hugr__.__main__.rus..rus.17.exit": ; preds = %cond_256_case_1.i - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) - tail call void @___qfree(i64 %qalloc.i) + %lazy_measure = notail call i64 @___lazy_measure(i64 %qalloc.i) + notail 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) - tail call void @print_bool(ptr nonnull @res_result.457DE32D.0, i64 16, i1 %read_bool), !dbg !27 + notail call void @___dec_future_refcount(i64 %lazy_measure) + notail call void @print_bool(ptr nonnull @res_result.457DE32D.0, i64 16, i1 %read_bool), !dbg !27 ret void } @@ -119,7 +119,7 @@ declare void @___rzz(i64, i64, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !28 { entry: tail call void @setup(i64 %0), !dbg !30 - tail call void @"__hugr__.__main__.rus..main.1"(), !dbg !30 + notail call void @"__hugr__.__main__.rus..main.1"(), !dbg !30 %1 = tail call i64 @teardown(), !dbg !30 ret i64 %1, !dbg !30 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-discard_qb_array/discard_qb_array_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-discard_qb_array/discard_qb_array_x86_64-apple-darwin index 24ec6374c..f90047eb1 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-discard_qb_array/discard_qb_array_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-discard_qb_array/discard_qb_array_x86_64-apple-darwin @@ -12,34 +12,34 @@ alloca_block: %0 = tail call ptr @heap_alloc(i64 80), !dbg !8 %1 = tail call ptr @heap_alloc(i64 8), !dbg !8 store i64 -1, ptr %1, align 1, !dbg !8 - %qalloc.i = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !9 br i1 %not_max.not.not.i, label %cond_233_case_0.i, label %__barray_check_bounds.exit, !dbg !9 cond_233_case_0.i: ; preds = %cond_exit_20.8, %cond_exit_20.7, %cond_exit_20.6, %cond_exit_20.5, %cond_exit_20.4, %cond_exit_20.3, %cond_exit_20.2, %cond_exit_20.1, %cond_exit_20, %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 unreachable, !dbg !9 __barray_check_bounds.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i), !dbg !9 + notail call void @___reset(i64 %qalloc.i), !dbg !9 %2 = load i64, ptr %1, align 4 %3 = trunc i64 %2 to i1 br i1 %3, label %cond_exit_20, 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") + notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable cond_exit_20: ; preds = %__barray_check_bounds.exit %4 = and i64 %2, -2 store i64 %4, ptr %1, align 4 store i64 %qalloc.i, ptr %0, align 4 - %qalloc.i.1 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.1 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1, !dbg !9 br i1 %not_max.not.not.i.1, label %cond_233_case_0.i, label %__barray_check_bounds.exit.1, !dbg !9 __barray_check_bounds.exit.1: ; preds = %cond_exit_20 - tail call void @___reset(i64 %qalloc.i.1), !dbg !9 + notail call void @___reset(i64 %qalloc.i.1), !dbg !9 %5 = load i64, ptr %1, align 4 %6 = and i64 %5, 2 %.not = icmp eq i64 %6, 0 @@ -50,12 +50,12 @@ cond_exit_20.1: ; preds = %__barray_check_boun store i64 %7, ptr %1, align 4 %8 = getelementptr inbounds nuw i8, ptr %0, i64 8 store i64 %qalloc.i.1, ptr %8, align 4 - %qalloc.i.2 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.2 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1, !dbg !9 br i1 %not_max.not.not.i.2, label %cond_233_case_0.i, label %__barray_check_bounds.exit.2, !dbg !9 __barray_check_bounds.exit.2: ; preds = %cond_exit_20.1 - tail call void @___reset(i64 %qalloc.i.2), !dbg !9 + notail call void @___reset(i64 %qalloc.i.2), !dbg !9 %9 = load i64, ptr %1, align 4 %10 = and i64 %9, 4 %.not108 = icmp eq i64 %10, 0 @@ -66,12 +66,12 @@ cond_exit_20.2: ; preds = %__barray_check_boun store i64 %11, ptr %1, align 4 %12 = getelementptr inbounds nuw i8, ptr %0, i64 16 store i64 %qalloc.i.2, ptr %12, align 4 - %qalloc.i.3 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.3 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1, !dbg !9 br i1 %not_max.not.not.i.3, label %cond_233_case_0.i, label %__barray_check_bounds.exit.3, !dbg !9 __barray_check_bounds.exit.3: ; preds = %cond_exit_20.2 - tail call void @___reset(i64 %qalloc.i.3), !dbg !9 + notail call void @___reset(i64 %qalloc.i.3), !dbg !9 %13 = load i64, ptr %1, align 4 %14 = and i64 %13, 8 %.not109 = icmp eq i64 %14, 0 @@ -82,12 +82,12 @@ cond_exit_20.3: ; preds = %__barray_check_boun store i64 %15, ptr %1, align 4 %16 = getelementptr inbounds nuw i8, ptr %0, i64 24 store i64 %qalloc.i.3, ptr %16, align 4 - %qalloc.i.4 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.4 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1, !dbg !9 br i1 %not_max.not.not.i.4, label %cond_233_case_0.i, label %__barray_check_bounds.exit.4, !dbg !9 __barray_check_bounds.exit.4: ; preds = %cond_exit_20.3 - tail call void @___reset(i64 %qalloc.i.4), !dbg !9 + notail call void @___reset(i64 %qalloc.i.4), !dbg !9 %17 = load i64, ptr %1, align 4 %18 = and i64 %17, 16 %.not110 = icmp eq i64 %18, 0 @@ -98,12 +98,12 @@ cond_exit_20.4: ; preds = %__barray_check_boun store i64 %19, ptr %1, align 4 %20 = getelementptr inbounds nuw i8, ptr %0, i64 32 store i64 %qalloc.i.4, ptr %20, align 4 - %qalloc.i.5 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.5 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.5 = icmp eq i64 %qalloc.i.5, -1, !dbg !9 br i1 %not_max.not.not.i.5, label %cond_233_case_0.i, label %__barray_check_bounds.exit.5, !dbg !9 __barray_check_bounds.exit.5: ; preds = %cond_exit_20.4 - tail call void @___reset(i64 %qalloc.i.5), !dbg !9 + notail call void @___reset(i64 %qalloc.i.5), !dbg !9 %21 = load i64, ptr %1, align 4 %22 = and i64 %21, 32 %.not111 = icmp eq i64 %22, 0 @@ -114,12 +114,12 @@ cond_exit_20.5: ; preds = %__barray_check_boun store i64 %23, ptr %1, align 4 %24 = getelementptr inbounds nuw i8, ptr %0, i64 40 store i64 %qalloc.i.5, ptr %24, align 4 - %qalloc.i.6 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.6 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.6 = icmp eq i64 %qalloc.i.6, -1, !dbg !9 br i1 %not_max.not.not.i.6, label %cond_233_case_0.i, label %__barray_check_bounds.exit.6, !dbg !9 __barray_check_bounds.exit.6: ; preds = %cond_exit_20.5 - tail call void @___reset(i64 %qalloc.i.6), !dbg !9 + notail call void @___reset(i64 %qalloc.i.6), !dbg !9 %25 = load i64, ptr %1, align 4 %26 = and i64 %25, 64 %.not112 = icmp eq i64 %26, 0 @@ -130,12 +130,12 @@ cond_exit_20.6: ; preds = %__barray_check_boun store i64 %27, ptr %1, align 4 %28 = getelementptr inbounds nuw i8, ptr %0, i64 48 store i64 %qalloc.i.6, ptr %28, align 4 - %qalloc.i.7 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.7 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.7 = icmp eq i64 %qalloc.i.7, -1, !dbg !9 br i1 %not_max.not.not.i.7, label %cond_233_case_0.i, label %__barray_check_bounds.exit.7, !dbg !9 __barray_check_bounds.exit.7: ; preds = %cond_exit_20.6 - tail call void @___reset(i64 %qalloc.i.7), !dbg !9 + notail call void @___reset(i64 %qalloc.i.7), !dbg !9 %29 = load i64, ptr %1, align 4 %30 = and i64 %29, 128 %.not113 = icmp eq i64 %30, 0 @@ -146,12 +146,12 @@ cond_exit_20.7: ; preds = %__barray_check_boun store i64 %31, ptr %1, align 4 %32 = getelementptr inbounds nuw i8, ptr %0, i64 56 store i64 %qalloc.i.7, ptr %32, align 4 - %qalloc.i.8 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.8 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.8 = icmp eq i64 %qalloc.i.8, -1, !dbg !9 br i1 %not_max.not.not.i.8, label %cond_233_case_0.i, label %__barray_check_bounds.exit.8, !dbg !9 __barray_check_bounds.exit.8: ; preds = %cond_exit_20.7 - tail call void @___reset(i64 %qalloc.i.8), !dbg !9 + notail call void @___reset(i64 %qalloc.i.8), !dbg !9 %33 = load i64, ptr %1, align 4 %34 = and i64 %33, 256 %.not114 = icmp eq i64 %34, 0 @@ -162,12 +162,12 @@ cond_exit_20.8: ; preds = %__barray_check_boun store i64 %35, ptr %1, align 4 %36 = getelementptr inbounds nuw i8, ptr %0, i64 64 store i64 %qalloc.i.8, ptr %36, align 4 - %qalloc.i.9 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.9 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.9 = icmp eq i64 %qalloc.i.9, -1, !dbg !9 br i1 %not_max.not.not.i.9, label %cond_233_case_0.i, label %__barray_check_bounds.exit.9, !dbg !9 __barray_check_bounds.exit.9: ; preds = %cond_exit_20.8 - tail call void @___reset(i64 %qalloc.i.9), !dbg !9 + notail call void @___reset(i64 %qalloc.i.9), !dbg !9 %37 = load i64, ptr %1, align 4 %38 = and i64 %37, 512 %.not115 = icmp eq i64 %38, 0 @@ -193,7 +193,7 @@ __barray_mask_borrow.exit.1.i: ; preds = %cond_171_case_1.1.i store i64 %45, ptr %1, align 4, !dbg !21 %46 = getelementptr inbounds nuw i8, ptr %0, i64 8, !dbg !23 %47 = load i64, ptr %46, align 4, !dbg !23 - tail call void @___qfree(i64 %47), !dbg !24 + notail call void @___qfree(i64 %47), !dbg !24 %.pre337.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.2.i @@ -208,7 +208,7 @@ __barray_mask_borrow.exit.2.i: ; preds = %cond_171_case_1.2.i store i64 %50, ptr %1, align 4, !dbg !21 %51 = getelementptr inbounds nuw i8, ptr %0, i64 16, !dbg !23 %52 = load i64, ptr %51, align 4, !dbg !23 - tail call void @___qfree(i64 %52), !dbg !24 + notail call void @___qfree(i64 %52), !dbg !24 %.pre338.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.3.i @@ -223,7 +223,7 @@ __barray_mask_borrow.exit.3.i: ; preds = %cond_171_case_1.3.i store i64 %55, ptr %1, align 4, !dbg !21 %56 = getelementptr inbounds nuw i8, ptr %0, i64 24, !dbg !23 %57 = load i64, ptr %56, align 4, !dbg !23 - tail call void @___qfree(i64 %57), !dbg !24 + notail call void @___qfree(i64 %57), !dbg !24 %.pre339.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.4.i @@ -238,7 +238,7 @@ __barray_mask_borrow.exit.4.i: ; preds = %cond_171_case_1.4.i store i64 %60, ptr %1, align 4, !dbg !21 %61 = getelementptr inbounds nuw i8, ptr %0, i64 32, !dbg !23 %62 = load i64, ptr %61, align 4, !dbg !23 - tail call void @___qfree(i64 %62), !dbg !24 + notail call void @___qfree(i64 %62), !dbg !24 %.pre340.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.5.i @@ -253,7 +253,7 @@ __barray_mask_borrow.exit.5.i: ; preds = %cond_171_case_1.5.i store i64 %65, ptr %1, align 4, !dbg !21 %66 = getelementptr inbounds nuw i8, ptr %0, i64 40, !dbg !23 %67 = load i64, ptr %66, align 4, !dbg !23 - tail call void @___qfree(i64 %67), !dbg !24 + notail call void @___qfree(i64 %67), !dbg !24 %.pre341.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.6.i @@ -268,7 +268,7 @@ __barray_mask_borrow.exit.6.i: ; preds = %cond_171_case_1.6.i store i64 %70, ptr %1, align 4, !dbg !21 %71 = getelementptr inbounds nuw i8, ptr %0, i64 48, !dbg !23 %72 = load i64, ptr %71, align 4, !dbg !23 - tail call void @___qfree(i64 %72), !dbg !24 + notail call void @___qfree(i64 %72), !dbg !24 %.pre342.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.7.i @@ -283,7 +283,7 @@ __barray_mask_borrow.exit.7.i: ; preds = %cond_171_case_1.7.i store i64 %75, ptr %1, align 4, !dbg !21 %76 = getelementptr inbounds nuw i8, ptr %0, i64 56, !dbg !23 %77 = load i64, ptr %76, align 4, !dbg !23 - tail call void @___qfree(i64 %77), !dbg !24 + notail call void @___qfree(i64 %77), !dbg !24 %.pre343.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.8.i @@ -298,7 +298,7 @@ __barray_mask_borrow.exit.8.i: ; preds = %cond_171_case_1.8.i store i64 %80, ptr %1, align 4, !dbg !21 %81 = getelementptr inbounds nuw i8, ptr %0, i64 64, !dbg !23 %82 = load i64, ptr %81, align 4, !dbg !23 - tail call void @___qfree(i64 %82), !dbg !24 + notail call void @___qfree(i64 %82), !dbg !24 %.pre = load i64, ptr %1, align 4, !dbg !10 br label %__barray_check_bounds.exit.9.i @@ -313,7 +313,7 @@ __barray_mask_borrow.exit.9.i: ; preds = %__barray_check_boun store i64 %85, ptr %1, align 4, !dbg !21 %86 = getelementptr inbounds nuw i8, ptr %0, i64 72, !dbg !23 %87 = load i64, ptr %86, align 4, !dbg !23 - tail call void @___qfree(i64 %87), !dbg !24 + notail call void @___qfree(i64 %87), !dbg !24 %.pre344.i = load i64, ptr %1, align 4, !dbg !25 br label %cond_exit_156.i @@ -325,14 +325,14 @@ cond_exit_156.i: ; preds = %__barray_mask_borro br i1 %90, label %"__hugr__.guppylang.std.quantum.discard_array$10.113.exit", label %mask_block_err.i.i, !dbg !25 mask_block_err.i.i: ; preds = %cond_exit_156.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0"), !dbg !25 + notail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0"), !dbg !25 unreachable, !dbg !25 __barray_mask_borrow.exit.i: ; preds = %cond_exit_20.9 %91 = or disjoint i64 %41, 1, !dbg !21 store i64 %91, ptr %1, align 4, !dbg !21 %92 = load i64, ptr %0, align 4, !dbg !23 - tail call void @___qfree(i64 %92), !dbg !24 + notail call void @___qfree(i64 %92), !dbg !24 %.pre.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.1.i @@ -358,7 +358,7 @@ declare void @___reset(i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !28 { entry: tail call void @setup(i64 %0), !dbg !32 - tail call void @"__hugr__.__main__.discard_qb_array..main.1"(), !dbg !32 + notail call void @"__hugr__.__main__.discard_qb_array..main.1"(), !dbg !32 %1 = tail call i64 @teardown(), !dbg !32 ret i64 %1, !dbg !32 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-flip_some/flip_some_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-flip_some/flip_some_x86_64-apple-darwin index 591fc3b9f..f08e0b6f2 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-flip_some/flip_some_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-flip_some/flip_some_x86_64-apple-darwin @@ -11,69 +11,69 @@ target triple = "x86_64-apple-darwin" define void @"__hugr__.__main__.flip_some..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - %qalloc.i = tail call i64 @___qalloc(), !dbg !8 + %qalloc.i = notail call i64 @___qalloc(), !dbg !8 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 br i1 %not_max.not.not.i, label %cond_40_case_0.i, label %__hugr__.__tk2_qalloc.36.exit, !dbg !8 cond_40_case_0.i: ; preds = %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 unreachable, !dbg !8 __hugr__.__tk2_qalloc.36.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i), !dbg !8 - tail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00), !dbg !9 - %qalloc.i101 = tail call i64 @___qalloc(), !dbg !10 + notail call void @___reset(i64 %qalloc.i), !dbg !8 + notail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00), !dbg !9 + %qalloc.i101 = notail call i64 @___qalloc(), !dbg !10 %not_max.not.not.i102 = icmp eq i64 %qalloc.i101, -1, !dbg !10 br i1 %not_max.not.not.i102, label %cond_54_case_0.i, label %__hugr__.__tk2_qalloc.50.exit, !dbg !10 cond_54_case_0.i: ; preds = %__hugr__.__tk2_qalloc.36.exit - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !10 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !10 unreachable, !dbg !10 __hugr__.__tk2_qalloc.50.exit: ; preds = %__hugr__.__tk2_qalloc.36.exit - tail call void @___reset(i64 %qalloc.i101), !dbg !10 - %qalloc.i103 = tail call i64 @___qalloc(), !dbg !11 + notail call void @___reset(i64 %qalloc.i101), !dbg !10 + %qalloc.i103 = notail call i64 @___qalloc(), !dbg !11 %not_max.not.not.i104 = icmp eq i64 %qalloc.i103, -1, !dbg !11 br i1 %not_max.not.not.i104, label %cond_68_case_0.i, label %__hugr__.__tk2_qalloc.64.exit, !dbg !11 cond_68_case_0.i: ; preds = %__hugr__.__tk2_qalloc.50.exit - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !11 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !11 unreachable, !dbg !11 __hugr__.__tk2_qalloc.64.exit: ; preds = %__hugr__.__tk2_qalloc.50.exit - tail call void @___reset(i64 %qalloc.i103), !dbg !11 - tail call void @___rxy(i64 %qalloc.i103, double 0x400921FB54442D18, double 0.000000e+00), !dbg !12 - %qalloc.i105 = tail call i64 @___qalloc(), !dbg !13 + notail call void @___reset(i64 %qalloc.i103), !dbg !11 + notail call void @___rxy(i64 %qalloc.i103, double 0x400921FB54442D18, double 0.000000e+00), !dbg !12 + %qalloc.i105 = notail call i64 @___qalloc(), !dbg !13 %not_max.not.not.i106 = icmp eq i64 %qalloc.i105, -1, !dbg !13 br i1 %not_max.not.not.i106, label %cond_82_case_0.i, label %__hugr__.__tk2_qalloc.78.exit, !dbg !13 cond_82_case_0.i: ; preds = %__hugr__.__tk2_qalloc.64.exit - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !13 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !13 unreachable, !dbg !13 __hugr__.__tk2_qalloc.78.exit: ; preds = %__hugr__.__tk2_qalloc.64.exit - tail call void @___reset(i64 %qalloc.i105), !dbg !13 - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) - tail call void @___qfree(i64 %qalloc.i) + notail call void @___reset(i64 %qalloc.i105), !dbg !13 + %lazy_measure = notail call i64 @___lazy_measure(i64 %qalloc.i) + notail 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) - tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool), !dbg !14 - %lazy_measure22 = tail call i64 @___lazy_measure(i64 %qalloc.i101) - tail call void @___qfree(i64 %qalloc.i101) + notail call void @___dec_future_refcount(i64 %lazy_measure) + notail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool), !dbg !14 + %lazy_measure22 = notail call i64 @___lazy_measure(i64 %qalloc.i101) + notail call void @___qfree(i64 %qalloc.i101) %read_bool35 = 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_c1.1F7A6571.0, i64 12, i1 %read_bool35), !dbg !15 - %lazy_measure44 = tail call i64 @___lazy_measure(i64 %qalloc.i103) - tail call void @___qfree(i64 %qalloc.i103) + notail call void @___dec_future_refcount(i64 %lazy_measure22) + notail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool35), !dbg !15 + %lazy_measure44 = notail call i64 @___lazy_measure(i64 %qalloc.i103) + notail call void @___qfree(i64 %qalloc.i103) %read_bool57 = tail call i1 @___read_future_bool(i64 %lazy_measure44) - tail call void @___dec_future_refcount(i64 %lazy_measure44) - tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool57), !dbg !16 - tail call void @___rxy(i64 %qalloc.i105, double 0x400921FB54442D18, double 0.000000e+00), !dbg !17 - %lazy_measure67 = tail call i64 @___lazy_measure(i64 %qalloc.i105) - tail call void @___qfree(i64 %qalloc.i105) + notail call void @___dec_future_refcount(i64 %lazy_measure44) + notail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool57), !dbg !16 + notail call void @___rxy(i64 %qalloc.i105, double 0x400921FB54442D18, double 0.000000e+00), !dbg !17 + %lazy_measure67 = notail call i64 @___lazy_measure(i64 %qalloc.i105) + notail call void @___qfree(i64 %qalloc.i105) %read_bool80 = tail call i1 @___read_future_bool(i64 %lazy_measure67) - tail call void @___dec_future_refcount(i64 %lazy_measure67) - tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool80), !dbg !18 + notail call void @___dec_future_refcount(i64 %lazy_measure67) + notail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool80), !dbg !18 ret void } @@ -99,7 +99,7 @@ declare void @___rxy(i64, double, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !19 { entry: tail call void @setup(i64 %0), !dbg !24 - tail call void @"__hugr__.__main__.flip_some..main.1"(), !dbg !24 + notail call void @"__hugr__.__main__.flip_some..main.1"(), !dbg !24 %1 = tail call i64 @teardown(), !dbg !24 ret i64 %1, !dbg !24 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-measure_qb_array/measure_qb_array_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-measure_qb_array/measure_qb_array_x86_64-apple-darwin index f3acc089a..e9078a70e 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-measure_qb_array/measure_qb_array_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-measure_qb_array/measure_qb_array_x86_64-apple-darwin @@ -13,34 +13,34 @@ alloca_block: %0 = tail call ptr @heap_alloc(i64 80), !dbg !8 %1 = tail call ptr @heap_alloc(i64 8), !dbg !8 store i64 -1, ptr %1, align 1, !dbg !8 - %qalloc.i = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !9 br i1 %not_max.not.not.i, label %cond_299_case_0.i, label %__barray_check_bounds.exit, !dbg !9 cond_299_case_0.i: ; preds = %cond_exit_20.8, %cond_exit_20.7, %cond_exit_20.6, %cond_exit_20.5, %cond_exit_20.4, %cond_exit_20.3, %cond_exit_20.2, %cond_exit_20.1, %cond_exit_20, %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 unreachable, !dbg !9 __barray_check_bounds.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i), !dbg !9 + notail call void @___reset(i64 %qalloc.i), !dbg !9 %2 = load i64, ptr %1, align 4 %3 = trunc i64 %2 to i1 br i1 %3, label %cond_exit_20, 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") + notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable cond_exit_20: ; preds = %__barray_check_bounds.exit %4 = and i64 %2, -2 store i64 %4, ptr %1, align 4 store i64 %qalloc.i, ptr %0, align 4 - %qalloc.i.1 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.1 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1, !dbg !9 br i1 %not_max.not.not.i.1, label %cond_299_case_0.i, label %__barray_check_bounds.exit.1, !dbg !9 __barray_check_bounds.exit.1: ; preds = %cond_exit_20 - tail call void @___reset(i64 %qalloc.i.1), !dbg !9 + notail call void @___reset(i64 %qalloc.i.1), !dbg !9 %5 = load i64, ptr %1, align 4 %6 = and i64 %5, 2 %.not299 = icmp eq i64 %6, 0 @@ -51,12 +51,12 @@ cond_exit_20.1: ; preds = %__barray_check_boun store i64 %7, ptr %1, align 4 %8 = getelementptr inbounds nuw i8, ptr %0, i64 8 store i64 %qalloc.i.1, ptr %8, align 4 - %qalloc.i.2 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.2 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1, !dbg !9 br i1 %not_max.not.not.i.2, label %cond_299_case_0.i, label %__barray_check_bounds.exit.2, !dbg !9 __barray_check_bounds.exit.2: ; preds = %cond_exit_20.1 - tail call void @___reset(i64 %qalloc.i.2), !dbg !9 + notail call void @___reset(i64 %qalloc.i.2), !dbg !9 %9 = load i64, ptr %1, align 4 %10 = and i64 %9, 4 %.not300 = icmp eq i64 %10, 0 @@ -67,12 +67,12 @@ cond_exit_20.2: ; preds = %__barray_check_boun store i64 %11, ptr %1, align 4 %12 = getelementptr inbounds nuw i8, ptr %0, i64 16 store i64 %qalloc.i.2, ptr %12, align 4 - %qalloc.i.3 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.3 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1, !dbg !9 br i1 %not_max.not.not.i.3, label %cond_299_case_0.i, label %__barray_check_bounds.exit.3, !dbg !9 __barray_check_bounds.exit.3: ; preds = %cond_exit_20.2 - tail call void @___reset(i64 %qalloc.i.3), !dbg !9 + notail call void @___reset(i64 %qalloc.i.3), !dbg !9 %13 = load i64, ptr %1, align 4 %14 = and i64 %13, 8 %.not301 = icmp eq i64 %14, 0 @@ -83,12 +83,12 @@ cond_exit_20.3: ; preds = %__barray_check_boun store i64 %15, ptr %1, align 4 %16 = getelementptr inbounds nuw i8, ptr %0, i64 24 store i64 %qalloc.i.3, ptr %16, align 4 - %qalloc.i.4 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.4 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1, !dbg !9 br i1 %not_max.not.not.i.4, label %cond_299_case_0.i, label %__barray_check_bounds.exit.4, !dbg !9 __barray_check_bounds.exit.4: ; preds = %cond_exit_20.3 - tail call void @___reset(i64 %qalloc.i.4), !dbg !9 + notail call void @___reset(i64 %qalloc.i.4), !dbg !9 %17 = load i64, ptr %1, align 4 %18 = and i64 %17, 16 %.not302 = icmp eq i64 %18, 0 @@ -99,12 +99,12 @@ cond_exit_20.4: ; preds = %__barray_check_boun store i64 %19, ptr %1, align 4 %20 = getelementptr inbounds nuw i8, ptr %0, i64 32 store i64 %qalloc.i.4, ptr %20, align 4 - %qalloc.i.5 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.5 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.5 = icmp eq i64 %qalloc.i.5, -1, !dbg !9 br i1 %not_max.not.not.i.5, label %cond_299_case_0.i, label %__barray_check_bounds.exit.5, !dbg !9 __barray_check_bounds.exit.5: ; preds = %cond_exit_20.4 - tail call void @___reset(i64 %qalloc.i.5), !dbg !9 + notail call void @___reset(i64 %qalloc.i.5), !dbg !9 %21 = load i64, ptr %1, align 4 %22 = and i64 %21, 32 %.not303 = icmp eq i64 %22, 0 @@ -115,12 +115,12 @@ cond_exit_20.5: ; preds = %__barray_check_boun store i64 %23, ptr %1, align 4 %24 = getelementptr inbounds nuw i8, ptr %0, i64 40 store i64 %qalloc.i.5, ptr %24, align 4 - %qalloc.i.6 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.6 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.6 = icmp eq i64 %qalloc.i.6, -1, !dbg !9 br i1 %not_max.not.not.i.6, label %cond_299_case_0.i, label %__barray_check_bounds.exit.6, !dbg !9 __barray_check_bounds.exit.6: ; preds = %cond_exit_20.5 - tail call void @___reset(i64 %qalloc.i.6), !dbg !9 + notail call void @___reset(i64 %qalloc.i.6), !dbg !9 %25 = load i64, ptr %1, align 4 %26 = and i64 %25, 64 %.not304 = icmp eq i64 %26, 0 @@ -131,12 +131,12 @@ cond_exit_20.6: ; preds = %__barray_check_boun store i64 %27, ptr %1, align 4 %28 = getelementptr inbounds nuw i8, ptr %0, i64 48 store i64 %qalloc.i.6, ptr %28, align 4 - %qalloc.i.7 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.7 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.7 = icmp eq i64 %qalloc.i.7, -1, !dbg !9 br i1 %not_max.not.not.i.7, label %cond_299_case_0.i, label %__barray_check_bounds.exit.7, !dbg !9 __barray_check_bounds.exit.7: ; preds = %cond_exit_20.6 - tail call void @___reset(i64 %qalloc.i.7), !dbg !9 + notail call void @___reset(i64 %qalloc.i.7), !dbg !9 %29 = load i64, ptr %1, align 4 %30 = and i64 %29, 128 %.not305 = icmp eq i64 %30, 0 @@ -147,12 +147,12 @@ cond_exit_20.7: ; preds = %__barray_check_boun store i64 %31, ptr %1, align 4 %32 = getelementptr inbounds nuw i8, ptr %0, i64 56 store i64 %qalloc.i.7, ptr %32, align 4 - %qalloc.i.8 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.8 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.8 = icmp eq i64 %qalloc.i.8, -1, !dbg !9 br i1 %not_max.not.not.i.8, label %cond_299_case_0.i, label %__barray_check_bounds.exit.8, !dbg !9 __barray_check_bounds.exit.8: ; preds = %cond_exit_20.7 - tail call void @___reset(i64 %qalloc.i.8), !dbg !9 + notail call void @___reset(i64 %qalloc.i.8), !dbg !9 %33 = load i64, ptr %1, align 4 %34 = and i64 %33, 256 %.not306 = icmp eq i64 %34, 0 @@ -163,12 +163,12 @@ cond_exit_20.8: ; preds = %__barray_check_boun store i64 %35, ptr %1, align 4 %36 = getelementptr inbounds nuw i8, ptr %0, i64 64 store i64 %qalloc.i.8, ptr %36, align 4 - %qalloc.i.9 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.9 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.9 = icmp eq i64 %qalloc.i.9, -1, !dbg !9 br i1 %not_max.not.not.i.9, label %cond_299_case_0.i, label %__barray_check_bounds.exit.9, !dbg !9 __barray_check_bounds.exit.9: ; preds = %cond_exit_20.8 - tail call void @___reset(i64 %qalloc.i.9), !dbg !9 + notail call void @___reset(i64 %qalloc.i.9), !dbg !9 %37 = load i64, ptr %1, align 4 %38 = and i64 %37, 512 %.not307 = icmp eq i64 %38, 0 @@ -187,20 +187,20 @@ cond_exit_20.9: ; preds = %__barray_check_boun br i1 %42, label %panic.i238, label %__barray_mask_borrow.exit, !dbg !10 panic.i238: ; preds = %cond_exit_20.9 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !10 + notail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !10 unreachable, !dbg !10 __barray_mask_borrow.exit: ; preds = %cond_exit_20.9 %43 = or disjoint i64 %41, 1, !dbg !10 store i64 %43, ptr %1, align 4, !dbg !10 %44 = load i64, ptr %0, align 4, !dbg !12 - tail call void @___rxy(i64 %44, double 0x400921FB54442D18, double 0.000000e+00), !dbg !13 + notail call void @___rxy(i64 %44, double 0x400921FB54442D18, double 0.000000e+00), !dbg !13 %45 = load i64, ptr %1, align 4, !dbg !12 %46 = trunc i64 %45 to i1, !dbg !12 br i1 %46, label %__barray_mask_return.exit240, label %panic.i239, !dbg !12 panic.i239: ; preds = %__barray_mask_borrow.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !12 + notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !12 unreachable, !dbg !12 __barray_mask_return.exit240: ; preds = %__barray_mask_borrow.exit @@ -213,7 +213,7 @@ __barray_mask_return.exit240: ; preds = %__barray_mask_borro br i1 %.not, label %__barray_mask_borrow.exit242, label %panic.i241, !dbg !14 panic.i241: ; preds = %__barray_mask_return.exit240 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !14 + notail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !14 unreachable, !dbg !14 __barray_mask_borrow.exit242: ; preds = %__barray_mask_return.exit240 @@ -221,14 +221,14 @@ __barray_mask_borrow.exit242: ; preds = %__barray_mask_retur store i64 %50, ptr %1, align 4, !dbg !14 %51 = getelementptr inbounds nuw i8, ptr %0, i64 16, !dbg !16 %52 = load i64, ptr %51, align 4, !dbg !16 - tail call void @___rxy(i64 %52, double 0x400921FB54442D18, double 0.000000e+00), !dbg !17 + notail call void @___rxy(i64 %52, double 0x400921FB54442D18, double 0.000000e+00), !dbg !17 %53 = load i64, ptr %1, align 4, !dbg !16 %54 = and i64 %53, 4, !dbg !16 %.not268 = icmp eq i64 %54, 0, !dbg !16 br i1 %.not268, label %panic.i243, label %__barray_mask_return.exit244, !dbg !16 panic.i243: ; preds = %__barray_mask_borrow.exit242 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !16 + notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !16 unreachable, !dbg !16 __barray_mask_return.exit244: ; preds = %__barray_mask_borrow.exit242 @@ -241,7 +241,7 @@ __barray_mask_return.exit244: ; preds = %__barray_mask_borro br i1 %.not269, label %__barray_mask_borrow.exit246, label %panic.i245, !dbg !18 panic.i245: ; preds = %__barray_mask_return.exit244 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !18 + notail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !18 unreachable, !dbg !18 __barray_mask_borrow.exit246: ; preds = %__barray_mask_return.exit244 @@ -249,14 +249,14 @@ __barray_mask_borrow.exit246: ; preds = %__barray_mask_retur store i64 %58, ptr %1, align 4, !dbg !18 %59 = getelementptr inbounds nuw i8, ptr %0, i64 24, !dbg !20 %60 = load i64, ptr %59, align 4, !dbg !20 - tail call void @___rxy(i64 %60, double 0x400921FB54442D18, double 0.000000e+00), !dbg !21 + notail call void @___rxy(i64 %60, double 0x400921FB54442D18, double 0.000000e+00), !dbg !21 %61 = load i64, ptr %1, align 4, !dbg !20 %62 = and i64 %61, 8, !dbg !20 %.not270 = icmp eq i64 %62, 0, !dbg !20 br i1 %.not270, label %panic.i247, label %__barray_mask_return.exit248, !dbg !20 panic.i247: ; preds = %__barray_mask_borrow.exit246 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !20 + notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !20 unreachable, !dbg !20 __barray_mask_return.exit248: ; preds = %__barray_mask_borrow.exit246 @@ -269,7 +269,7 @@ __barray_mask_return.exit248: ; preds = %__barray_mask_borro br i1 %.not271, label %__barray_mask_borrow.exit250, label %panic.i249, !dbg !22 panic.i249: ; preds = %__barray_mask_return.exit248 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !22 + notail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !22 unreachable, !dbg !22 __barray_mask_borrow.exit250: ; preds = %__barray_mask_return.exit248 @@ -277,14 +277,14 @@ __barray_mask_borrow.exit250: ; preds = %__barray_mask_retur store i64 %66, ptr %1, align 4, !dbg !22 %67 = getelementptr inbounds nuw i8, ptr %0, i64 72, !dbg !24 %68 = load i64, ptr %67, align 4, !dbg !24 - tail call void @___rxy(i64 %68, double 0x400921FB54442D18, double 0.000000e+00), !dbg !25 + notail call void @___rxy(i64 %68, double 0x400921FB54442D18, double 0.000000e+00), !dbg !25 %69 = load i64, ptr %1, align 4, !dbg !24 %70 = and i64 %69, 512, !dbg !24 %.not272 = icmp eq i64 %70, 0, !dbg !24 br i1 %.not272, label %panic.i251, label %__barray_mask_return.exit252, !dbg !24 panic.i251: ; preds = %__barray_mask_borrow.exit250 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !24 + notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !24 unreachable, !dbg !24 __barray_mask_return.exit252: ; preds = %__barray_mask_borrow.exit250 @@ -335,7 +335,7 @@ mask_block_ok.i.i.i: ; preds = %75, %93 br i1 %96, label %93, label %mask_block_err.i.i.i, !dbg !44 mask_block_err.i.i.i: ; preds = %mask_block_ok.i.i.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0"), !dbg !44 + notail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0"), !dbg !44 unreachable, !dbg !44 __barray_check_bounds.exit.i.i: ; preds = %loop_body.i, %__barray_mask_return.exit252 @@ -355,7 +355,7 @@ __barray_check_bounds.exit.i.i: ; preds = %loop_body.i, %__bar br i1 %104, label %panic.i.i.i, label %__barray_check_bounds.exit.i, !dbg !56 panic.i.i.i: ; preds = %__barray_check_bounds.exit.i.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !56 + notail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !56 unreachable, !dbg !56 __barray_check_bounds.exit.i: ; preds = %__barray_check_bounds.exit.i.i @@ -364,15 +364,15 @@ __barray_check_bounds.exit.i: ; preds = %__barray_check_boun store i64 %106, ptr %100, align 4, !dbg !56 %107 = getelementptr inbounds i64, ptr %.fca.0.extract80.i185.i, i64 %98, !dbg !55 %108 = load i64, ptr %107, align 4, !dbg !55 - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %108) - tail call void @___qfree(i64 %108) + %lazy_measure.i = notail call i64 @___lazy_measure(i64 %108) + notail call void @___qfree(i64 %108) %109 = load i64, ptr %74, align 4 %110 = lshr i64 %109, %"163_0.sroa.15.0184.i" %111 = trunc i64 %110 to i1 br i1 %111, label %loop_body.i, label %panic.i.i panic.i.i: ; preds = %__barray_check_bounds.exit.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") + notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable loop_body.i: ; preds = %__barray_check_bounds.exit.i @@ -404,7 +404,7 @@ cond_exit_369: ; preds = %cond_exit_369.threa ret void mask_block_err.i: ; preds = %cond_exit_369.thread.9 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") + notail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable __barray_mask_borrow.exit259: ; preds = %"__hugr__.guppylang.std.quantum.measure_array$10.149.exit" @@ -430,7 +430,7 @@ __barray_mask_borrow.exit259.1: ; preds = %cond_exit_369.threa cond_392_case_1.1: ; preds = %__barray_mask_borrow.exit259.1 %.fca.1.extract.1 = extractvalue { i1, i64, i1 } %125, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.1) + notail call void @___dec_future_refcount(i64 %.fca.1.extract.1) %.pre281 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.1 @@ -450,7 +450,7 @@ __barray_mask_borrow.exit259.2: ; preds = %cond_exit_369.threa cond_392_case_1.2: ; preds = %__barray_mask_borrow.exit259.2 %.fca.1.extract.2 = extractvalue { i1, i64, i1 } %130, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.2) + notail call void @___dec_future_refcount(i64 %.fca.1.extract.2) %.pre282 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.2 @@ -470,7 +470,7 @@ __barray_mask_borrow.exit259.3: ; preds = %cond_exit_369.threa cond_392_case_1.3: ; preds = %__barray_mask_borrow.exit259.3 %.fca.1.extract.3 = extractvalue { i1, i64, i1 } %135, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.3) + notail call void @___dec_future_refcount(i64 %.fca.1.extract.3) %.pre283 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.3 @@ -490,7 +490,7 @@ __barray_mask_borrow.exit259.4: ; preds = %cond_exit_369.threa cond_392_case_1.4: ; preds = %__barray_mask_borrow.exit259.4 %.fca.1.extract.4 = extractvalue { i1, i64, i1 } %140, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.4) + notail call void @___dec_future_refcount(i64 %.fca.1.extract.4) %.pre284 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.4 @@ -510,7 +510,7 @@ __barray_mask_borrow.exit259.5: ; preds = %cond_exit_369.threa cond_392_case_1.5: ; preds = %__barray_mask_borrow.exit259.5 %.fca.1.extract.5 = extractvalue { i1, i64, i1 } %145, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.5) + notail call void @___dec_future_refcount(i64 %.fca.1.extract.5) %.pre285 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.5 @@ -530,7 +530,7 @@ __barray_mask_borrow.exit259.6: ; preds = %cond_exit_369.threa cond_392_case_1.6: ; preds = %__barray_mask_borrow.exit259.6 %.fca.1.extract.6 = extractvalue { i1, i64, i1 } %150, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.6) + notail call void @___dec_future_refcount(i64 %.fca.1.extract.6) %.pre286 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.6 @@ -550,7 +550,7 @@ __barray_mask_borrow.exit259.7: ; preds = %cond_exit_369.threa cond_392_case_1.7: ; preds = %__barray_mask_borrow.exit259.7 %.fca.1.extract.7 = extractvalue { i1, i64, i1 } %155, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.7) + notail call void @___dec_future_refcount(i64 %.fca.1.extract.7) %.pre287 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.7 @@ -570,7 +570,7 @@ __barray_mask_borrow.exit259.8: ; preds = %cond_exit_369.threa cond_392_case_1.8: ; preds = %__barray_mask_borrow.exit259.8 %.fca.1.extract.8 = extractvalue { i1, i64, i1 } %160, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.8) + notail call void @___dec_future_refcount(i64 %.fca.1.extract.8) %.pre288 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.8 @@ -590,7 +590,7 @@ __barray_mask_borrow.exit259.9: ; preds = %cond_exit_369.threa cond_392_case_1.9: ; preds = %__barray_mask_borrow.exit259.9 %.fca.1.extract.9 = extractvalue { i1, i64, i1 } %165, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.9) + notail call void @___dec_future_refcount(i64 %.fca.1.extract.9) %.pre289 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.9 @@ -603,7 +603,7 @@ cond_exit_369.thread.9: ; preds = %cond_392_case_1.9, cond_392_case_1: ; preds = %__barray_mask_borrow.exit259 %.fca.1.extract = extractvalue { i1, i64, i1 } %120, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract) + notail call void @___dec_future_refcount(i64 %.fca.1.extract) %.pre = load i64, ptr %74, align 4 br label %cond_exit_369.thread } @@ -630,7 +630,7 @@ declare void @___reset(i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !59 { entry: tail call void @setup(i64 %0), !dbg !63 - tail call void @"__hugr__.__main__.measure_qb_array..main.1"(), !dbg !63 + notail call void @"__hugr__.__main__.measure_qb_array..main.1"(), !dbg !63 %1 = tail call i64 @teardown(), !dbg !63 ret i64 %1, !dbg !63 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-no_results/no_results_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-no_results/no_results_x86_64-apple-darwin index a4231ba53..f05627053 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-no_results/no_results_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-no_results/no_results_x86_64-apple-darwin @@ -7,21 +7,21 @@ target triple = "x86_64-apple-darwin" define void @"__hugr__.__main__.no_results..bar.1"() local_unnamed_addr !dbg !4 { alloca_block: - %qalloc.i = tail call i64 @___qalloc(), !dbg !8 + %qalloc.i = notail call i64 @___qalloc(), !dbg !8 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 br i1 %not_max.not.not.i, label %cond_18_case_0.i, label %__hugr__.__tk2_qalloc.14.exit, !dbg !8 cond_18_case_0.i: ; preds = %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 unreachable, !dbg !8 __hugr__.__tk2_qalloc.14.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i), !dbg !8 - tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 - tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 - %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) + notail call void @___reset(i64 %qalloc.i), !dbg !8 + notail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 + notail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 + %lazy_measure = notail call i64 @___lazy_measure(i64 %qalloc.i) + notail call void @___qfree(i64 %qalloc.i) + notail call void @___dec_future_refcount(i64 %lazy_measure) ret void } @@ -45,7 +45,7 @@ declare void @___rz(i64, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !10 { entry: tail call void @setup(i64 %0), !dbg !15 - tail call void @"__hugr__.__main__.no_results..bar.1"(), !dbg !15 + notail call void @"__hugr__.__main__.no_results..bar.1"(), !dbg !15 %1 = tail call i64 @teardown(), !dbg !15 ret i64 %1, !dbg !15 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-postselect_exit/postselect_exit_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-postselect_exit/postselect_exit_x86_64-apple-darwin index 871710e73..f16c1a87f 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-postselect_exit/postselect_exit_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-postselect_exit/postselect_exit_x86_64-apple-darwin @@ -9,33 +9,33 @@ target triple = "x86_64-apple-darwin" define void @"__hugr__.__main__.postselect_exit..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - %qalloc.i = tail call i64 @___qalloc(), !dbg !8 + %qalloc.i = notail call i64 @___qalloc(), !dbg !8 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 br i1 %not_max.not.not.i, label %cond_45_case_0.i, label %__hugr__.__tk2_qalloc.41.exit, !dbg !8 cond_45_case_0.i: ; preds = %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 unreachable, !dbg !8 __hugr__.__tk2_qalloc.41.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i), !dbg !8 - tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 - tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) - tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure) + notail call void @___reset(i64 %qalloc.i), !dbg !8 + notail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 + notail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 + %lazy_measure = notail call i64 @___lazy_measure(i64 %qalloc.i) + notail call void @___qfree(i64 %qalloc.i) + notail call void @___inc_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) + notail call void @___dec_future_refcount(i64 %lazy_measure) br i1 %read_bool, label %0, label %cond_98_case_1 cond_98_case_1: ; preds = %__hugr__.__tk2_qalloc.41.exit %read_bool66 = 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_c.1C9EF4D1.0, i64 11, i1 %read_bool66), !dbg !10 + notail call void @___dec_future_refcount(i64 %lazy_measure) + notail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool66), !dbg !10 ret void 0: ; preds = %__hugr__.__tk2_qalloc.41.exit - tail call void @panic(i32 42, ptr nonnull @s_Postselect.13DF1CD0.0), !dbg !11 + notail call void @panic(i32 42, ptr nonnull @s_Postselect.13DF1CD0.0), !dbg !11 unreachable } @@ -65,7 +65,7 @@ declare void @___rz(i64, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !12 { entry: tail call void @setup(i64 %0), !dbg !17 - tail call void @"__hugr__.__main__.postselect_exit..main.1"(), !dbg !17 + notail call void @"__hugr__.__main__.postselect_exit..main.1"(), !dbg !17 %1 = tail call i64 @teardown(), !dbg !17 ret i64 %1, !dbg !17 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-postselect_panic/postselect_panic_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-postselect_panic/postselect_panic_x86_64-apple-darwin index f22baba7c..60add1725 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-postselect_panic/postselect_panic_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-postselect_panic/postselect_panic_x86_64-apple-darwin @@ -9,33 +9,33 @@ target triple = "x86_64-apple-darwin" define void @"__hugr__.__main__.postselect_panic..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - %qalloc.i = tail call i64 @___qalloc(), !dbg !8 + %qalloc.i = notail call i64 @___qalloc(), !dbg !8 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 br i1 %not_max.not.not.i, label %cond_43_case_0.i, label %__hugr__.__tk2_qalloc.39.exit, !dbg !8 cond_43_case_0.i: ; preds = %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 unreachable, !dbg !8 __hugr__.__tk2_qalloc.39.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i), !dbg !8 - tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 - tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) - tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure) + notail call void @___reset(i64 %qalloc.i), !dbg !8 + notail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 + notail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 + %lazy_measure = notail call i64 @___lazy_measure(i64 %qalloc.i) + notail call void @___qfree(i64 %qalloc.i) + notail call void @___inc_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) + notail call void @___dec_future_refcount(i64 %lazy_measure) br i1 %read_bool, label %0, label %cond_96_case_1 cond_96_case_1: ; preds = %__hugr__.__tk2_qalloc.39.exit %read_bool65 = 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_c.1C9EF4D1.0, i64 11, i1 %read_bool65), !dbg !10 + notail call void @___dec_future_refcount(i64 %lazy_measure) + notail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool65), !dbg !10 ret void 0: ; preds = %__hugr__.__tk2_qalloc.39.exit - tail call void @panic(i32 1001, ptr nonnull @s_Postselect.13DF1CD0.0), !dbg !11 + notail call void @panic(i32 1001, ptr nonnull @s_Postselect.13DF1CD0.0), !dbg !11 unreachable } @@ -65,7 +65,7 @@ declare void @___rz(i64, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !12 { entry: tail call void @setup(i64 %0), !dbg !17 - tail call void @"__hugr__.__main__.postselect_panic..main.1"(), !dbg !17 + notail call void @"__hugr__.__main__.postselect_panic..main.1"(), !dbg !17 %1 = tail call i64 @teardown(), !dbg !17 ret i64 %1, !dbg !17 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-print_current_shot/print_current_shot_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-print_current_shot/print_current_shot_x86_64-apple-darwin index bfef10ffc..7095ecd35 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-print_current_shot/print_current_shot_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-print_current_shot/print_current_shot_x86_64-apple-darwin @@ -7,8 +7,8 @@ target triple = "x86_64-apple-darwin" define void @"__hugr__.__main__.print_current_shot..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - %shot = tail call i64 @get_current_shot(), !dbg !8 - tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot), !dbg !9 + %shot = notail call i64 @get_current_shot(), !dbg !8 + notail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot), !dbg !9 ret void } @@ -19,8 +19,8 @@ declare void @print_int(ptr, i64, i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !10 { entry: tail call void @setup(i64 %0), !dbg !15 - %shot.i = tail call i64 @get_current_shot(), !dbg !16 - tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot.i), !dbg !18 + %shot.i = notail call i64 @get_current_shot(), !dbg !16 + notail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot.i), !dbg !18 %1 = tail call i64 @teardown(), !dbg !15 ret i64 %1, !dbg !15 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-rng/rng_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-rng/rng_x86_64-apple-darwin index 2543ea77b..4e59cc7f6 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-rng/rng_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-rng/rng_x86_64-apple-darwin @@ -13,27 +13,27 @@ target triple = "x86_64-apple-darwin" define void @"__hugr__.__main__.rng..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - tail call void @random_seed(i64 42), !dbg !8 - %rint = tail call i32 @random_int(), !dbg !17 - %rint14 = tail call i32 @random_int(), !dbg !18 - %rfloat = tail call double @random_float(), !dbg !19 - %rintb = tail call i32 @random_rng(i32 100), !dbg !20 + notail call void @random_seed(i64 42), !dbg !8 + %rint = notail call i32 @random_int(), !dbg !17 + %rint14 = notail call i32 @random_int(), !dbg !18 + %rfloat = notail call double @random_float(), !dbg !19 + %rintb = notail call i32 @random_rng(i32 100), !dbg !20 %0 = sext i32 %rintb to i64, !dbg !20 %1 = sext i32 %rint14 to i64, !dbg !18 %2 = sext i32 %rint to i64, !dbg !17 - tail call void @print_int(ptr nonnull @res_rint.B928E41E.0, i64 13, i64 %2), !dbg !21 - tail call void @print_int(ptr nonnull @res_rint1.0884EC03.0, i64 14, i64 %1), !dbg !22 - tail call void @print_float(ptr nonnull @res_rfloat.F0E4DD2C.0, i64 17, double %rfloat), !dbg !23 - tail call void @print_int(ptr nonnull @res_rint_bnd.CB1E6B0D.0, i64 17, i64 %0), !dbg !24 - tail call void @random_seed(i64 84), !dbg !25 - %rint47 = tail call i32 @random_int(), !dbg !27 - %rfloat49 = tail call double @random_float(), !dbg !28 - %rintb52 = tail call i32 @random_rng(i32 200), !dbg !29 + notail call void @print_int(ptr nonnull @res_rint.B928E41E.0, i64 13, i64 %2), !dbg !21 + notail call void @print_int(ptr nonnull @res_rint1.0884EC03.0, i64 14, i64 %1), !dbg !22 + notail call void @print_float(ptr nonnull @res_rfloat.F0E4DD2C.0, i64 17, double %rfloat), !dbg !23 + notail call void @print_int(ptr nonnull @res_rint_bnd.CB1E6B0D.0, i64 17, i64 %0), !dbg !24 + notail call void @random_seed(i64 84), !dbg !25 + %rint47 = notail call i32 @random_int(), !dbg !27 + %rfloat49 = notail call double @random_float(), !dbg !28 + %rintb52 = notail call i32 @random_rng(i32 200), !dbg !29 %3 = sext i32 %rintb52 to i64, !dbg !29 %4 = sext i32 %rint47 to i64, !dbg !27 - tail call void @print_int(ptr nonnull @res_rint2.F0335598.0, i64 14, i64 %4), !dbg !30 - tail call void @print_float(ptr nonnull @res_rfloat2.4DAB941F.0, i64 18, double %rfloat49), !dbg !31 - tail call void @print_int(ptr nonnull @res_rint_bnd2.169DE399.0, i64 18, i64 %3), !dbg !32 + notail call void @print_int(ptr nonnull @res_rint2.F0335598.0, i64 14, i64 %4), !dbg !30 + notail call void @print_float(ptr nonnull @res_rfloat2.4DAB941F.0, i64 18, double %rfloat49), !dbg !31 + notail call void @print_int(ptr nonnull @res_rint_bnd2.169DE399.0, i64 18, i64 %3), !dbg !32 ret void } @@ -52,7 +52,7 @@ declare void @random_seed(i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !33 { entry: tail call void @setup(i64 %0), !dbg !37 - tail call void @"__hugr__.__main__.rng..main.1"(), !dbg !37 + notail call void @"__hugr__.__main__.rng..main.1"(), !dbg !37 %1 = tail call i64 @teardown(), !dbg !37 ret i64 %1, !dbg !37 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-rus/rus_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-rus/rus_x86_64-apple-darwin index a97de453f..6de7bf614 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-rus/rus_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-rus/rus_x86_64-apple-darwin @@ -8,88 +8,88 @@ target triple = "x86_64-apple-darwin" define void @"__hugr__.__main__.rus..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - %qalloc.i = tail call i64 @___qalloc(), !dbg !8 + %qalloc.i = notail call i64 @___qalloc(), !dbg !8 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 br i1 %not_max.not.not.i, label %cond_87_case_0.i, label %__hugr__.__tk2_qalloc.83.exit, !dbg !8 cond_87_case_0.i: ; preds = %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 unreachable, !dbg !8 __hugr__.__tk2_qalloc.83.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i), !dbg !8 - %qalloc.i132.i = tail call i64 @___qalloc(), !dbg !9 + notail call void @___reset(i64 %qalloc.i), !dbg !8 + %qalloc.i132.i = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i133.i = icmp eq i64 %qalloc.i132.i, -1, !dbg !9 br i1 %not_max.not.not.i133.i, label %cond_101_case_0.i.i, label %__hugr__.__tk2_qalloc.97.exit.i, !dbg !9 cond_101_case_0.i.i: ; preds = %cond_242_case_1.backedge.i, %__hugr__.__tk2_qalloc.83.exit - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 unreachable, !dbg !9 __hugr__.__tk2_qalloc.97.exit.i: ; preds = %__hugr__.__tk2_qalloc.83.exit, %cond_242_case_1.backedge.i %qalloc.i134.i = phi i64 [ %qalloc.i.i, %cond_242_case_1.backedge.i ], [ %qalloc.i132.i, %__hugr__.__tk2_qalloc.83.exit ] - tail call void @___reset(i64 %qalloc.i134.i), !dbg !9 - %qalloc.i128.i = tail call i64 @___qalloc(), !dbg !15 + notail call void @___reset(i64 %qalloc.i134.i), !dbg !9 + %qalloc.i128.i = notail call i64 @___qalloc(), !dbg !15 %not_max.not.not.i129.i = icmp eq i64 %qalloc.i128.i, -1, !dbg !15 br i1 %not_max.not.not.i129.i, label %cond_115_case_0.i.i, label %__hugr__.__tk2_qalloc.111.exit.i, !dbg !15 cond_115_case_0.i.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !15 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !15 unreachable, !dbg !15 __hugr__.__tk2_qalloc.111.exit.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i - tail call void @___reset(i64 %qalloc.i128.i), !dbg !15 - tail call void @___rxy(i64 %qalloc.i128.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !16 - tail call void @___rz(i64 %qalloc.i128.i, double 0x400921FB54442D18), !dbg !16 - tail call void @___rxy(i64 %qalloc.i134.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !17 - tail call void @___rz(i64 %qalloc.i134.i, double 0x400921FB54442D18), !dbg !17 - tail call void @___rz(i64 %qalloc.i134.i, double 0xBFE921FB54442D18), !dbg !18 - tail call void @___rxy(i64 %qalloc.i134.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18), !dbg !19 - tail call void @___rzz(i64 %qalloc.i128.i, i64 %qalloc.i134.i, double 0x3FF921FB54442D18), !dbg !19 - tail call void @___rz(i64 %qalloc.i128.i, double 0xBFF921FB54442D18), !dbg !19 - tail call void @___rxy(i64 %qalloc.i134.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18), !dbg !19 - tail call void @___rz(i64 %qalloc.i134.i, double 0xBFF921FB54442D18), !dbg !19 - tail call void @___rz(i64 %qalloc.i134.i, double 0x3FE921FB54442D18), !dbg !20 - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i134.i) - tail call void @___qfree(i64 %qalloc.i134.i) + notail call void @___reset(i64 %qalloc.i128.i), !dbg !15 + notail call void @___rxy(i64 %qalloc.i128.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !16 + notail call void @___rz(i64 %qalloc.i128.i, double 0x400921FB54442D18), !dbg !16 + notail call void @___rxy(i64 %qalloc.i134.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !17 + notail call void @___rz(i64 %qalloc.i134.i, double 0x400921FB54442D18), !dbg !17 + notail call void @___rz(i64 %qalloc.i134.i, double 0xBFE921FB54442D18), !dbg !18 + notail call void @___rxy(i64 %qalloc.i134.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18), !dbg !19 + notail call void @___rzz(i64 %qalloc.i128.i, i64 %qalloc.i134.i, double 0x3FF921FB54442D18), !dbg !19 + notail call void @___rz(i64 %qalloc.i128.i, double 0xBFF921FB54442D18), !dbg !19 + notail call void @___rxy(i64 %qalloc.i134.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18), !dbg !19 + notail call void @___rz(i64 %qalloc.i134.i, double 0xBFF921FB54442D18), !dbg !19 + notail call void @___rz(i64 %qalloc.i134.i, double 0x3FE921FB54442D18), !dbg !20 + %lazy_measure.i = notail call i64 @___lazy_measure(i64 %qalloc.i134.i) + notail call void @___qfree(i64 %qalloc.i134.i) %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) - tail call void @___dec_future_refcount(i64 %lazy_measure.i) + notail call void @___dec_future_refcount(i64 %lazy_measure.i) br i1 %read_bool.i, label %cond_256_case_1.i, label %0 0: ; preds = %__hugr__.__tk2_qalloc.111.exit.i - tail call void @___qfree(i64 %qalloc.i128.i), !dbg !21 + notail call void @___qfree(i64 %qalloc.i128.i), !dbg !21 br label %cond_242_case_1.backedge.i cond_242_case_1.backedge.i: ; preds = %1, %0 - %qalloc.i.i = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.i = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1, !dbg !9 br i1 %not_max.not.not.i.i, label %cond_101_case_0.i.i, label %__hugr__.__tk2_qalloc.97.exit.i, !dbg !9 cond_256_case_1.i: ; preds = %__hugr__.__tk2_qalloc.111.exit.i - tail call void @___rz(i64 %qalloc.i, double 0x3FE921FB54442D18), !dbg !22 - tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !23 - tail call void @___rxy(i64 %qalloc.i128.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18), !dbg !24 - tail call void @___rzz(i64 %qalloc.i, i64 %qalloc.i128.i, double 0x3FF921FB54442D18), !dbg !24 - tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18), !dbg !24 - tail call void @___rxy(i64 %qalloc.i128.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18), !dbg !24 - tail call void @___rz(i64 %qalloc.i128.i, double 0xBFF921FB54442D18), !dbg !24 - tail call void @___rz(i64 %qalloc.i128.i, double 0x3FE921FB54442D18), !dbg !25 - %lazy_measure67.i = tail call i64 @___lazy_measure(i64 %qalloc.i128.i) - tail call void @___qfree(i64 %qalloc.i128.i) + notail call void @___rz(i64 %qalloc.i, double 0x3FE921FB54442D18), !dbg !22 + notail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !23 + notail call void @___rxy(i64 %qalloc.i128.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18), !dbg !24 + notail call void @___rzz(i64 %qalloc.i, i64 %qalloc.i128.i, double 0x3FF921FB54442D18), !dbg !24 + notail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18), !dbg !24 + notail call void @___rxy(i64 %qalloc.i128.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18), !dbg !24 + notail call void @___rz(i64 %qalloc.i128.i, double 0xBFF921FB54442D18), !dbg !24 + notail call void @___rz(i64 %qalloc.i128.i, double 0x3FE921FB54442D18), !dbg !25 + %lazy_measure67.i = notail call i64 @___lazy_measure(i64 %qalloc.i128.i) + notail call void @___qfree(i64 %qalloc.i128.i) %read_bool80.i = tail call i1 @___read_future_bool(i64 %lazy_measure67.i) - tail call void @___dec_future_refcount(i64 %lazy_measure67.i) + notail call void @___dec_future_refcount(i64 %lazy_measure67.i) br i1 %read_bool80.i, label %"__hugr__.__main__.rus..rus.17.exit", label %1 1: ; preds = %cond_256_case_1.i - tail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00), !dbg !26 + notail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00), !dbg !26 br label %cond_242_case_1.backedge.i "__hugr__.__main__.rus..rus.17.exit": ; preds = %cond_256_case_1.i - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) - tail call void @___qfree(i64 %qalloc.i) + %lazy_measure = notail call i64 @___lazy_measure(i64 %qalloc.i) + notail 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) - tail call void @print_bool(ptr nonnull @res_result.457DE32D.0, i64 16, i1 %read_bool), !dbg !27 + notail call void @___dec_future_refcount(i64 %lazy_measure) + notail call void @print_bool(ptr nonnull @res_result.457DE32D.0, i64 16, i1 %read_bool), !dbg !27 ret void } @@ -119,7 +119,7 @@ declare void @___rzz(i64, i64, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !28 { entry: tail call void @setup(i64 %0), !dbg !30 - tail call void @"__hugr__.__main__.rus..main.1"(), !dbg !30 + notail call void @"__hugr__.__main__.rus..main.1"(), !dbg !30 %1 = tail call i64 @teardown(), !dbg !30 ret i64 %1, !dbg !30 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-discard_qb_array/discard_qb_array_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-discard_qb_array/discard_qb_array_x86_64-unknown-linux-gnu index 86eb72ab6..84c1163c9 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-discard_qb_array/discard_qb_array_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-discard_qb_array/discard_qb_array_x86_64-unknown-linux-gnu @@ -12,34 +12,34 @@ alloca_block: %0 = tail call ptr @heap_alloc(i64 80), !dbg !8 %1 = tail call ptr @heap_alloc(i64 8), !dbg !8 store i64 -1, ptr %1, align 1, !dbg !8 - %qalloc.i = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !9 br i1 %not_max.not.not.i, label %cond_233_case_0.i, label %__barray_check_bounds.exit, !dbg !9 cond_233_case_0.i: ; preds = %cond_exit_20.8, %cond_exit_20.7, %cond_exit_20.6, %cond_exit_20.5, %cond_exit_20.4, %cond_exit_20.3, %cond_exit_20.2, %cond_exit_20.1, %cond_exit_20, %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 unreachable, !dbg !9 __barray_check_bounds.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i), !dbg !9 + notail call void @___reset(i64 %qalloc.i), !dbg !9 %2 = load i64, ptr %1, align 4 %3 = trunc i64 %2 to i1 br i1 %3, label %cond_exit_20, 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") + notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable cond_exit_20: ; preds = %__barray_check_bounds.exit %4 = and i64 %2, -2 store i64 %4, ptr %1, align 4 store i64 %qalloc.i, ptr %0, align 4 - %qalloc.i.1 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.1 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1, !dbg !9 br i1 %not_max.not.not.i.1, label %cond_233_case_0.i, label %__barray_check_bounds.exit.1, !dbg !9 __barray_check_bounds.exit.1: ; preds = %cond_exit_20 - tail call void @___reset(i64 %qalloc.i.1), !dbg !9 + notail call void @___reset(i64 %qalloc.i.1), !dbg !9 %5 = load i64, ptr %1, align 4 %6 = and i64 %5, 2 %.not = icmp eq i64 %6, 0 @@ -50,12 +50,12 @@ cond_exit_20.1: ; preds = %__barray_check_boun store i64 %7, ptr %1, align 4 %8 = getelementptr inbounds nuw i8, ptr %0, i64 8 store i64 %qalloc.i.1, ptr %8, align 4 - %qalloc.i.2 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.2 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1, !dbg !9 br i1 %not_max.not.not.i.2, label %cond_233_case_0.i, label %__barray_check_bounds.exit.2, !dbg !9 __barray_check_bounds.exit.2: ; preds = %cond_exit_20.1 - tail call void @___reset(i64 %qalloc.i.2), !dbg !9 + notail call void @___reset(i64 %qalloc.i.2), !dbg !9 %9 = load i64, ptr %1, align 4 %10 = and i64 %9, 4 %.not108 = icmp eq i64 %10, 0 @@ -66,12 +66,12 @@ cond_exit_20.2: ; preds = %__barray_check_boun store i64 %11, ptr %1, align 4 %12 = getelementptr inbounds nuw i8, ptr %0, i64 16 store i64 %qalloc.i.2, ptr %12, align 4 - %qalloc.i.3 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.3 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1, !dbg !9 br i1 %not_max.not.not.i.3, label %cond_233_case_0.i, label %__barray_check_bounds.exit.3, !dbg !9 __barray_check_bounds.exit.3: ; preds = %cond_exit_20.2 - tail call void @___reset(i64 %qalloc.i.3), !dbg !9 + notail call void @___reset(i64 %qalloc.i.3), !dbg !9 %13 = load i64, ptr %1, align 4 %14 = and i64 %13, 8 %.not109 = icmp eq i64 %14, 0 @@ -82,12 +82,12 @@ cond_exit_20.3: ; preds = %__barray_check_boun store i64 %15, ptr %1, align 4 %16 = getelementptr inbounds nuw i8, ptr %0, i64 24 store i64 %qalloc.i.3, ptr %16, align 4 - %qalloc.i.4 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.4 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1, !dbg !9 br i1 %not_max.not.not.i.4, label %cond_233_case_0.i, label %__barray_check_bounds.exit.4, !dbg !9 __barray_check_bounds.exit.4: ; preds = %cond_exit_20.3 - tail call void @___reset(i64 %qalloc.i.4), !dbg !9 + notail call void @___reset(i64 %qalloc.i.4), !dbg !9 %17 = load i64, ptr %1, align 4 %18 = and i64 %17, 16 %.not110 = icmp eq i64 %18, 0 @@ -98,12 +98,12 @@ cond_exit_20.4: ; preds = %__barray_check_boun store i64 %19, ptr %1, align 4 %20 = getelementptr inbounds nuw i8, ptr %0, i64 32 store i64 %qalloc.i.4, ptr %20, align 4 - %qalloc.i.5 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.5 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.5 = icmp eq i64 %qalloc.i.5, -1, !dbg !9 br i1 %not_max.not.not.i.5, label %cond_233_case_0.i, label %__barray_check_bounds.exit.5, !dbg !9 __barray_check_bounds.exit.5: ; preds = %cond_exit_20.4 - tail call void @___reset(i64 %qalloc.i.5), !dbg !9 + notail call void @___reset(i64 %qalloc.i.5), !dbg !9 %21 = load i64, ptr %1, align 4 %22 = and i64 %21, 32 %.not111 = icmp eq i64 %22, 0 @@ -114,12 +114,12 @@ cond_exit_20.5: ; preds = %__barray_check_boun store i64 %23, ptr %1, align 4 %24 = getelementptr inbounds nuw i8, ptr %0, i64 40 store i64 %qalloc.i.5, ptr %24, align 4 - %qalloc.i.6 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.6 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.6 = icmp eq i64 %qalloc.i.6, -1, !dbg !9 br i1 %not_max.not.not.i.6, label %cond_233_case_0.i, label %__barray_check_bounds.exit.6, !dbg !9 __barray_check_bounds.exit.6: ; preds = %cond_exit_20.5 - tail call void @___reset(i64 %qalloc.i.6), !dbg !9 + notail call void @___reset(i64 %qalloc.i.6), !dbg !9 %25 = load i64, ptr %1, align 4 %26 = and i64 %25, 64 %.not112 = icmp eq i64 %26, 0 @@ -130,12 +130,12 @@ cond_exit_20.6: ; preds = %__barray_check_boun store i64 %27, ptr %1, align 4 %28 = getelementptr inbounds nuw i8, ptr %0, i64 48 store i64 %qalloc.i.6, ptr %28, align 4 - %qalloc.i.7 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.7 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.7 = icmp eq i64 %qalloc.i.7, -1, !dbg !9 br i1 %not_max.not.not.i.7, label %cond_233_case_0.i, label %__barray_check_bounds.exit.7, !dbg !9 __barray_check_bounds.exit.7: ; preds = %cond_exit_20.6 - tail call void @___reset(i64 %qalloc.i.7), !dbg !9 + notail call void @___reset(i64 %qalloc.i.7), !dbg !9 %29 = load i64, ptr %1, align 4 %30 = and i64 %29, 128 %.not113 = icmp eq i64 %30, 0 @@ -146,12 +146,12 @@ cond_exit_20.7: ; preds = %__barray_check_boun store i64 %31, ptr %1, align 4 %32 = getelementptr inbounds nuw i8, ptr %0, i64 56 store i64 %qalloc.i.7, ptr %32, align 4 - %qalloc.i.8 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.8 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.8 = icmp eq i64 %qalloc.i.8, -1, !dbg !9 br i1 %not_max.not.not.i.8, label %cond_233_case_0.i, label %__barray_check_bounds.exit.8, !dbg !9 __barray_check_bounds.exit.8: ; preds = %cond_exit_20.7 - tail call void @___reset(i64 %qalloc.i.8), !dbg !9 + notail call void @___reset(i64 %qalloc.i.8), !dbg !9 %33 = load i64, ptr %1, align 4 %34 = and i64 %33, 256 %.not114 = icmp eq i64 %34, 0 @@ -162,12 +162,12 @@ cond_exit_20.8: ; preds = %__barray_check_boun store i64 %35, ptr %1, align 4 %36 = getelementptr inbounds nuw i8, ptr %0, i64 64 store i64 %qalloc.i.8, ptr %36, align 4 - %qalloc.i.9 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.9 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.9 = icmp eq i64 %qalloc.i.9, -1, !dbg !9 br i1 %not_max.not.not.i.9, label %cond_233_case_0.i, label %__barray_check_bounds.exit.9, !dbg !9 __barray_check_bounds.exit.9: ; preds = %cond_exit_20.8 - tail call void @___reset(i64 %qalloc.i.9), !dbg !9 + notail call void @___reset(i64 %qalloc.i.9), !dbg !9 %37 = load i64, ptr %1, align 4 %38 = and i64 %37, 512 %.not115 = icmp eq i64 %38, 0 @@ -193,7 +193,7 @@ __barray_mask_borrow.exit.1.i: ; preds = %cond_171_case_1.1.i store i64 %45, ptr %1, align 4, !dbg !21 %46 = getelementptr inbounds nuw i8, ptr %0, i64 8, !dbg !23 %47 = load i64, ptr %46, align 4, !dbg !23 - tail call void @___qfree(i64 %47), !dbg !24 + notail call void @___qfree(i64 %47), !dbg !24 %.pre337.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.2.i @@ -208,7 +208,7 @@ __barray_mask_borrow.exit.2.i: ; preds = %cond_171_case_1.2.i store i64 %50, ptr %1, align 4, !dbg !21 %51 = getelementptr inbounds nuw i8, ptr %0, i64 16, !dbg !23 %52 = load i64, ptr %51, align 4, !dbg !23 - tail call void @___qfree(i64 %52), !dbg !24 + notail call void @___qfree(i64 %52), !dbg !24 %.pre338.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.3.i @@ -223,7 +223,7 @@ __barray_mask_borrow.exit.3.i: ; preds = %cond_171_case_1.3.i store i64 %55, ptr %1, align 4, !dbg !21 %56 = getelementptr inbounds nuw i8, ptr %0, i64 24, !dbg !23 %57 = load i64, ptr %56, align 4, !dbg !23 - tail call void @___qfree(i64 %57), !dbg !24 + notail call void @___qfree(i64 %57), !dbg !24 %.pre339.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.4.i @@ -238,7 +238,7 @@ __barray_mask_borrow.exit.4.i: ; preds = %cond_171_case_1.4.i store i64 %60, ptr %1, align 4, !dbg !21 %61 = getelementptr inbounds nuw i8, ptr %0, i64 32, !dbg !23 %62 = load i64, ptr %61, align 4, !dbg !23 - tail call void @___qfree(i64 %62), !dbg !24 + notail call void @___qfree(i64 %62), !dbg !24 %.pre340.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.5.i @@ -253,7 +253,7 @@ __barray_mask_borrow.exit.5.i: ; preds = %cond_171_case_1.5.i store i64 %65, ptr %1, align 4, !dbg !21 %66 = getelementptr inbounds nuw i8, ptr %0, i64 40, !dbg !23 %67 = load i64, ptr %66, align 4, !dbg !23 - tail call void @___qfree(i64 %67), !dbg !24 + notail call void @___qfree(i64 %67), !dbg !24 %.pre341.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.6.i @@ -268,7 +268,7 @@ __barray_mask_borrow.exit.6.i: ; preds = %cond_171_case_1.6.i store i64 %70, ptr %1, align 4, !dbg !21 %71 = getelementptr inbounds nuw i8, ptr %0, i64 48, !dbg !23 %72 = load i64, ptr %71, align 4, !dbg !23 - tail call void @___qfree(i64 %72), !dbg !24 + notail call void @___qfree(i64 %72), !dbg !24 %.pre342.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.7.i @@ -283,7 +283,7 @@ __barray_mask_borrow.exit.7.i: ; preds = %cond_171_case_1.7.i store i64 %75, ptr %1, align 4, !dbg !21 %76 = getelementptr inbounds nuw i8, ptr %0, i64 56, !dbg !23 %77 = load i64, ptr %76, align 4, !dbg !23 - tail call void @___qfree(i64 %77), !dbg !24 + notail call void @___qfree(i64 %77), !dbg !24 %.pre343.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.8.i @@ -298,7 +298,7 @@ __barray_mask_borrow.exit.8.i: ; preds = %cond_171_case_1.8.i store i64 %80, ptr %1, align 4, !dbg !21 %81 = getelementptr inbounds nuw i8, ptr %0, i64 64, !dbg !23 %82 = load i64, ptr %81, align 4, !dbg !23 - tail call void @___qfree(i64 %82), !dbg !24 + notail call void @___qfree(i64 %82), !dbg !24 %.pre = load i64, ptr %1, align 4, !dbg !10 br label %__barray_check_bounds.exit.9.i @@ -313,7 +313,7 @@ __barray_mask_borrow.exit.9.i: ; preds = %__barray_check_boun store i64 %85, ptr %1, align 4, !dbg !21 %86 = getelementptr inbounds nuw i8, ptr %0, i64 72, !dbg !23 %87 = load i64, ptr %86, align 4, !dbg !23 - tail call void @___qfree(i64 %87), !dbg !24 + notail call void @___qfree(i64 %87), !dbg !24 %.pre344.i = load i64, ptr %1, align 4, !dbg !25 br label %cond_exit_156.i @@ -325,14 +325,14 @@ cond_exit_156.i: ; preds = %__barray_mask_borro br i1 %90, label %"__hugr__.guppylang.std.quantum.discard_array$10.113.exit", label %mask_block_err.i.i, !dbg !25 mask_block_err.i.i: ; preds = %cond_exit_156.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0"), !dbg !25 + notail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0"), !dbg !25 unreachable, !dbg !25 __barray_mask_borrow.exit.i: ; preds = %cond_exit_20.9 %91 = or disjoint i64 %41, 1, !dbg !21 store i64 %91, ptr %1, align 4, !dbg !21 %92 = load i64, ptr %0, align 4, !dbg !23 - tail call void @___qfree(i64 %92), !dbg !24 + notail call void @___qfree(i64 %92), !dbg !24 %.pre.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.1.i @@ -358,7 +358,7 @@ declare void @___reset(i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !28 { entry: tail call void @setup(i64 %0), !dbg !32 - tail call void @"__hugr__.__main__.discard_qb_array..main.1"(), !dbg !32 + notail call void @"__hugr__.__main__.discard_qb_array..main.1"(), !dbg !32 %1 = tail call i64 @teardown(), !dbg !32 ret i64 %1, !dbg !32 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-flip_some/flip_some_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-flip_some/flip_some_x86_64-unknown-linux-gnu index 8b43e04cd..a66baaa23 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-flip_some/flip_some_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-flip_some/flip_some_x86_64-unknown-linux-gnu @@ -11,69 +11,69 @@ target triple = "x86_64-unknown-linux-gnu" define void @"__hugr__.__main__.flip_some..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - %qalloc.i = tail call i64 @___qalloc(), !dbg !8 + %qalloc.i = notail call i64 @___qalloc(), !dbg !8 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 br i1 %not_max.not.not.i, label %cond_40_case_0.i, label %__hugr__.__tk2_qalloc.36.exit, !dbg !8 cond_40_case_0.i: ; preds = %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 unreachable, !dbg !8 __hugr__.__tk2_qalloc.36.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i), !dbg !8 - tail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00), !dbg !9 - %qalloc.i101 = tail call i64 @___qalloc(), !dbg !10 + notail call void @___reset(i64 %qalloc.i), !dbg !8 + notail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00), !dbg !9 + %qalloc.i101 = notail call i64 @___qalloc(), !dbg !10 %not_max.not.not.i102 = icmp eq i64 %qalloc.i101, -1, !dbg !10 br i1 %not_max.not.not.i102, label %cond_54_case_0.i, label %__hugr__.__tk2_qalloc.50.exit, !dbg !10 cond_54_case_0.i: ; preds = %__hugr__.__tk2_qalloc.36.exit - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !10 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !10 unreachable, !dbg !10 __hugr__.__tk2_qalloc.50.exit: ; preds = %__hugr__.__tk2_qalloc.36.exit - tail call void @___reset(i64 %qalloc.i101), !dbg !10 - %qalloc.i103 = tail call i64 @___qalloc(), !dbg !11 + notail call void @___reset(i64 %qalloc.i101), !dbg !10 + %qalloc.i103 = notail call i64 @___qalloc(), !dbg !11 %not_max.not.not.i104 = icmp eq i64 %qalloc.i103, -1, !dbg !11 br i1 %not_max.not.not.i104, label %cond_68_case_0.i, label %__hugr__.__tk2_qalloc.64.exit, !dbg !11 cond_68_case_0.i: ; preds = %__hugr__.__tk2_qalloc.50.exit - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !11 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !11 unreachable, !dbg !11 __hugr__.__tk2_qalloc.64.exit: ; preds = %__hugr__.__tk2_qalloc.50.exit - tail call void @___reset(i64 %qalloc.i103), !dbg !11 - tail call void @___rxy(i64 %qalloc.i103, double 0x400921FB54442D18, double 0.000000e+00), !dbg !12 - %qalloc.i105 = tail call i64 @___qalloc(), !dbg !13 + notail call void @___reset(i64 %qalloc.i103), !dbg !11 + notail call void @___rxy(i64 %qalloc.i103, double 0x400921FB54442D18, double 0.000000e+00), !dbg !12 + %qalloc.i105 = notail call i64 @___qalloc(), !dbg !13 %not_max.not.not.i106 = icmp eq i64 %qalloc.i105, -1, !dbg !13 br i1 %not_max.not.not.i106, label %cond_82_case_0.i, label %__hugr__.__tk2_qalloc.78.exit, !dbg !13 cond_82_case_0.i: ; preds = %__hugr__.__tk2_qalloc.64.exit - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !13 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !13 unreachable, !dbg !13 __hugr__.__tk2_qalloc.78.exit: ; preds = %__hugr__.__tk2_qalloc.64.exit - tail call void @___reset(i64 %qalloc.i105), !dbg !13 - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) - tail call void @___qfree(i64 %qalloc.i) + notail call void @___reset(i64 %qalloc.i105), !dbg !13 + %lazy_measure = notail call i64 @___lazy_measure(i64 %qalloc.i) + notail 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) - tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool), !dbg !14 - %lazy_measure22 = tail call i64 @___lazy_measure(i64 %qalloc.i101) - tail call void @___qfree(i64 %qalloc.i101) + notail call void @___dec_future_refcount(i64 %lazy_measure) + notail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool), !dbg !14 + %lazy_measure22 = notail call i64 @___lazy_measure(i64 %qalloc.i101) + notail call void @___qfree(i64 %qalloc.i101) %read_bool35 = 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_c1.1F7A6571.0, i64 12, i1 %read_bool35), !dbg !15 - %lazy_measure44 = tail call i64 @___lazy_measure(i64 %qalloc.i103) - tail call void @___qfree(i64 %qalloc.i103) + notail call void @___dec_future_refcount(i64 %lazy_measure22) + notail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool35), !dbg !15 + %lazy_measure44 = notail call i64 @___lazy_measure(i64 %qalloc.i103) + notail call void @___qfree(i64 %qalloc.i103) %read_bool57 = tail call i1 @___read_future_bool(i64 %lazy_measure44) - tail call void @___dec_future_refcount(i64 %lazy_measure44) - tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool57), !dbg !16 - tail call void @___rxy(i64 %qalloc.i105, double 0x400921FB54442D18, double 0.000000e+00), !dbg !17 - %lazy_measure67 = tail call i64 @___lazy_measure(i64 %qalloc.i105) - tail call void @___qfree(i64 %qalloc.i105) + notail call void @___dec_future_refcount(i64 %lazy_measure44) + notail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool57), !dbg !16 + notail call void @___rxy(i64 %qalloc.i105, double 0x400921FB54442D18, double 0.000000e+00), !dbg !17 + %lazy_measure67 = notail call i64 @___lazy_measure(i64 %qalloc.i105) + notail call void @___qfree(i64 %qalloc.i105) %read_bool80 = tail call i1 @___read_future_bool(i64 %lazy_measure67) - tail call void @___dec_future_refcount(i64 %lazy_measure67) - tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool80), !dbg !18 + notail call void @___dec_future_refcount(i64 %lazy_measure67) + notail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool80), !dbg !18 ret void } @@ -99,7 +99,7 @@ declare void @___rxy(i64, double, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !19 { entry: tail call void @setup(i64 %0), !dbg !24 - tail call void @"__hugr__.__main__.flip_some..main.1"(), !dbg !24 + notail call void @"__hugr__.__main__.flip_some..main.1"(), !dbg !24 %1 = tail call i64 @teardown(), !dbg !24 ret i64 %1, !dbg !24 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-measure_qb_array/measure_qb_array_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-measure_qb_array/measure_qb_array_x86_64-unknown-linux-gnu index 770237bf2..46b18b25f 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-measure_qb_array/measure_qb_array_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-measure_qb_array/measure_qb_array_x86_64-unknown-linux-gnu @@ -13,34 +13,34 @@ alloca_block: %0 = tail call ptr @heap_alloc(i64 80), !dbg !8 %1 = tail call ptr @heap_alloc(i64 8), !dbg !8 store i64 -1, ptr %1, align 1, !dbg !8 - %qalloc.i = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !9 br i1 %not_max.not.not.i, label %cond_299_case_0.i, label %__barray_check_bounds.exit, !dbg !9 cond_299_case_0.i: ; preds = %cond_exit_20.8, %cond_exit_20.7, %cond_exit_20.6, %cond_exit_20.5, %cond_exit_20.4, %cond_exit_20.3, %cond_exit_20.2, %cond_exit_20.1, %cond_exit_20, %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 unreachable, !dbg !9 __barray_check_bounds.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i), !dbg !9 + notail call void @___reset(i64 %qalloc.i), !dbg !9 %2 = load i64, ptr %1, align 4 %3 = trunc i64 %2 to i1 br i1 %3, label %cond_exit_20, 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") + notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable cond_exit_20: ; preds = %__barray_check_bounds.exit %4 = and i64 %2, -2 store i64 %4, ptr %1, align 4 store i64 %qalloc.i, ptr %0, align 4 - %qalloc.i.1 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.1 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1, !dbg !9 br i1 %not_max.not.not.i.1, label %cond_299_case_0.i, label %__barray_check_bounds.exit.1, !dbg !9 __barray_check_bounds.exit.1: ; preds = %cond_exit_20 - tail call void @___reset(i64 %qalloc.i.1), !dbg !9 + notail call void @___reset(i64 %qalloc.i.1), !dbg !9 %5 = load i64, ptr %1, align 4 %6 = and i64 %5, 2 %.not299 = icmp eq i64 %6, 0 @@ -51,12 +51,12 @@ cond_exit_20.1: ; preds = %__barray_check_boun store i64 %7, ptr %1, align 4 %8 = getelementptr inbounds nuw i8, ptr %0, i64 8 store i64 %qalloc.i.1, ptr %8, align 4 - %qalloc.i.2 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.2 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1, !dbg !9 br i1 %not_max.not.not.i.2, label %cond_299_case_0.i, label %__barray_check_bounds.exit.2, !dbg !9 __barray_check_bounds.exit.2: ; preds = %cond_exit_20.1 - tail call void @___reset(i64 %qalloc.i.2), !dbg !9 + notail call void @___reset(i64 %qalloc.i.2), !dbg !9 %9 = load i64, ptr %1, align 4 %10 = and i64 %9, 4 %.not300 = icmp eq i64 %10, 0 @@ -67,12 +67,12 @@ cond_exit_20.2: ; preds = %__barray_check_boun store i64 %11, ptr %1, align 4 %12 = getelementptr inbounds nuw i8, ptr %0, i64 16 store i64 %qalloc.i.2, ptr %12, align 4 - %qalloc.i.3 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.3 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1, !dbg !9 br i1 %not_max.not.not.i.3, label %cond_299_case_0.i, label %__barray_check_bounds.exit.3, !dbg !9 __barray_check_bounds.exit.3: ; preds = %cond_exit_20.2 - tail call void @___reset(i64 %qalloc.i.3), !dbg !9 + notail call void @___reset(i64 %qalloc.i.3), !dbg !9 %13 = load i64, ptr %1, align 4 %14 = and i64 %13, 8 %.not301 = icmp eq i64 %14, 0 @@ -83,12 +83,12 @@ cond_exit_20.3: ; preds = %__barray_check_boun store i64 %15, ptr %1, align 4 %16 = getelementptr inbounds nuw i8, ptr %0, i64 24 store i64 %qalloc.i.3, ptr %16, align 4 - %qalloc.i.4 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.4 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1, !dbg !9 br i1 %not_max.not.not.i.4, label %cond_299_case_0.i, label %__barray_check_bounds.exit.4, !dbg !9 __barray_check_bounds.exit.4: ; preds = %cond_exit_20.3 - tail call void @___reset(i64 %qalloc.i.4), !dbg !9 + notail call void @___reset(i64 %qalloc.i.4), !dbg !9 %17 = load i64, ptr %1, align 4 %18 = and i64 %17, 16 %.not302 = icmp eq i64 %18, 0 @@ -99,12 +99,12 @@ cond_exit_20.4: ; preds = %__barray_check_boun store i64 %19, ptr %1, align 4 %20 = getelementptr inbounds nuw i8, ptr %0, i64 32 store i64 %qalloc.i.4, ptr %20, align 4 - %qalloc.i.5 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.5 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.5 = icmp eq i64 %qalloc.i.5, -1, !dbg !9 br i1 %not_max.not.not.i.5, label %cond_299_case_0.i, label %__barray_check_bounds.exit.5, !dbg !9 __barray_check_bounds.exit.5: ; preds = %cond_exit_20.4 - tail call void @___reset(i64 %qalloc.i.5), !dbg !9 + notail call void @___reset(i64 %qalloc.i.5), !dbg !9 %21 = load i64, ptr %1, align 4 %22 = and i64 %21, 32 %.not303 = icmp eq i64 %22, 0 @@ -115,12 +115,12 @@ cond_exit_20.5: ; preds = %__barray_check_boun store i64 %23, ptr %1, align 4 %24 = getelementptr inbounds nuw i8, ptr %0, i64 40 store i64 %qalloc.i.5, ptr %24, align 4 - %qalloc.i.6 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.6 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.6 = icmp eq i64 %qalloc.i.6, -1, !dbg !9 br i1 %not_max.not.not.i.6, label %cond_299_case_0.i, label %__barray_check_bounds.exit.6, !dbg !9 __barray_check_bounds.exit.6: ; preds = %cond_exit_20.5 - tail call void @___reset(i64 %qalloc.i.6), !dbg !9 + notail call void @___reset(i64 %qalloc.i.6), !dbg !9 %25 = load i64, ptr %1, align 4 %26 = and i64 %25, 64 %.not304 = icmp eq i64 %26, 0 @@ -131,12 +131,12 @@ cond_exit_20.6: ; preds = %__barray_check_boun store i64 %27, ptr %1, align 4 %28 = getelementptr inbounds nuw i8, ptr %0, i64 48 store i64 %qalloc.i.6, ptr %28, align 4 - %qalloc.i.7 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.7 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.7 = icmp eq i64 %qalloc.i.7, -1, !dbg !9 br i1 %not_max.not.not.i.7, label %cond_299_case_0.i, label %__barray_check_bounds.exit.7, !dbg !9 __barray_check_bounds.exit.7: ; preds = %cond_exit_20.6 - tail call void @___reset(i64 %qalloc.i.7), !dbg !9 + notail call void @___reset(i64 %qalloc.i.7), !dbg !9 %29 = load i64, ptr %1, align 4 %30 = and i64 %29, 128 %.not305 = icmp eq i64 %30, 0 @@ -147,12 +147,12 @@ cond_exit_20.7: ; preds = %__barray_check_boun store i64 %31, ptr %1, align 4 %32 = getelementptr inbounds nuw i8, ptr %0, i64 56 store i64 %qalloc.i.7, ptr %32, align 4 - %qalloc.i.8 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.8 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.8 = icmp eq i64 %qalloc.i.8, -1, !dbg !9 br i1 %not_max.not.not.i.8, label %cond_299_case_0.i, label %__barray_check_bounds.exit.8, !dbg !9 __barray_check_bounds.exit.8: ; preds = %cond_exit_20.7 - tail call void @___reset(i64 %qalloc.i.8), !dbg !9 + notail call void @___reset(i64 %qalloc.i.8), !dbg !9 %33 = load i64, ptr %1, align 4 %34 = and i64 %33, 256 %.not306 = icmp eq i64 %34, 0 @@ -163,12 +163,12 @@ cond_exit_20.8: ; preds = %__barray_check_boun store i64 %35, ptr %1, align 4 %36 = getelementptr inbounds nuw i8, ptr %0, i64 64 store i64 %qalloc.i.8, ptr %36, align 4 - %qalloc.i.9 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.9 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.9 = icmp eq i64 %qalloc.i.9, -1, !dbg !9 br i1 %not_max.not.not.i.9, label %cond_299_case_0.i, label %__barray_check_bounds.exit.9, !dbg !9 __barray_check_bounds.exit.9: ; preds = %cond_exit_20.8 - tail call void @___reset(i64 %qalloc.i.9), !dbg !9 + notail call void @___reset(i64 %qalloc.i.9), !dbg !9 %37 = load i64, ptr %1, align 4 %38 = and i64 %37, 512 %.not307 = icmp eq i64 %38, 0 @@ -187,20 +187,20 @@ cond_exit_20.9: ; preds = %__barray_check_boun br i1 %42, label %panic.i238, label %__barray_mask_borrow.exit, !dbg !10 panic.i238: ; preds = %cond_exit_20.9 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !10 + notail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !10 unreachable, !dbg !10 __barray_mask_borrow.exit: ; preds = %cond_exit_20.9 %43 = or disjoint i64 %41, 1, !dbg !10 store i64 %43, ptr %1, align 4, !dbg !10 %44 = load i64, ptr %0, align 4, !dbg !12 - tail call void @___rxy(i64 %44, double 0x400921FB54442D18, double 0.000000e+00), !dbg !13 + notail call void @___rxy(i64 %44, double 0x400921FB54442D18, double 0.000000e+00), !dbg !13 %45 = load i64, ptr %1, align 4, !dbg !12 %46 = trunc i64 %45 to i1, !dbg !12 br i1 %46, label %__barray_mask_return.exit240, label %panic.i239, !dbg !12 panic.i239: ; preds = %__barray_mask_borrow.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !12 + notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !12 unreachable, !dbg !12 __barray_mask_return.exit240: ; preds = %__barray_mask_borrow.exit @@ -213,7 +213,7 @@ __barray_mask_return.exit240: ; preds = %__barray_mask_borro br i1 %.not, label %__barray_mask_borrow.exit242, label %panic.i241, !dbg !14 panic.i241: ; preds = %__barray_mask_return.exit240 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !14 + notail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !14 unreachable, !dbg !14 __barray_mask_borrow.exit242: ; preds = %__barray_mask_return.exit240 @@ -221,14 +221,14 @@ __barray_mask_borrow.exit242: ; preds = %__barray_mask_retur store i64 %50, ptr %1, align 4, !dbg !14 %51 = getelementptr inbounds nuw i8, ptr %0, i64 16, !dbg !16 %52 = load i64, ptr %51, align 4, !dbg !16 - tail call void @___rxy(i64 %52, double 0x400921FB54442D18, double 0.000000e+00), !dbg !17 + notail call void @___rxy(i64 %52, double 0x400921FB54442D18, double 0.000000e+00), !dbg !17 %53 = load i64, ptr %1, align 4, !dbg !16 %54 = and i64 %53, 4, !dbg !16 %.not268 = icmp eq i64 %54, 0, !dbg !16 br i1 %.not268, label %panic.i243, label %__barray_mask_return.exit244, !dbg !16 panic.i243: ; preds = %__barray_mask_borrow.exit242 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !16 + notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !16 unreachable, !dbg !16 __barray_mask_return.exit244: ; preds = %__barray_mask_borrow.exit242 @@ -241,7 +241,7 @@ __barray_mask_return.exit244: ; preds = %__barray_mask_borro br i1 %.not269, label %__barray_mask_borrow.exit246, label %panic.i245, !dbg !18 panic.i245: ; preds = %__barray_mask_return.exit244 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !18 + notail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !18 unreachable, !dbg !18 __barray_mask_borrow.exit246: ; preds = %__barray_mask_return.exit244 @@ -249,14 +249,14 @@ __barray_mask_borrow.exit246: ; preds = %__barray_mask_retur store i64 %58, ptr %1, align 4, !dbg !18 %59 = getelementptr inbounds nuw i8, ptr %0, i64 24, !dbg !20 %60 = load i64, ptr %59, align 4, !dbg !20 - tail call void @___rxy(i64 %60, double 0x400921FB54442D18, double 0.000000e+00), !dbg !21 + notail call void @___rxy(i64 %60, double 0x400921FB54442D18, double 0.000000e+00), !dbg !21 %61 = load i64, ptr %1, align 4, !dbg !20 %62 = and i64 %61, 8, !dbg !20 %.not270 = icmp eq i64 %62, 0, !dbg !20 br i1 %.not270, label %panic.i247, label %__barray_mask_return.exit248, !dbg !20 panic.i247: ; preds = %__barray_mask_borrow.exit246 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !20 + notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !20 unreachable, !dbg !20 __barray_mask_return.exit248: ; preds = %__barray_mask_borrow.exit246 @@ -269,7 +269,7 @@ __barray_mask_return.exit248: ; preds = %__barray_mask_borro br i1 %.not271, label %__barray_mask_borrow.exit250, label %panic.i249, !dbg !22 panic.i249: ; preds = %__barray_mask_return.exit248 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !22 + notail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !22 unreachable, !dbg !22 __barray_mask_borrow.exit250: ; preds = %__barray_mask_return.exit248 @@ -277,14 +277,14 @@ __barray_mask_borrow.exit250: ; preds = %__barray_mask_retur store i64 %66, ptr %1, align 4, !dbg !22 %67 = getelementptr inbounds nuw i8, ptr %0, i64 72, !dbg !24 %68 = load i64, ptr %67, align 4, !dbg !24 - tail call void @___rxy(i64 %68, double 0x400921FB54442D18, double 0.000000e+00), !dbg !25 + notail call void @___rxy(i64 %68, double 0x400921FB54442D18, double 0.000000e+00), !dbg !25 %69 = load i64, ptr %1, align 4, !dbg !24 %70 = and i64 %69, 512, !dbg !24 %.not272 = icmp eq i64 %70, 0, !dbg !24 br i1 %.not272, label %panic.i251, label %__barray_mask_return.exit252, !dbg !24 panic.i251: ; preds = %__barray_mask_borrow.exit250 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !24 + notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !24 unreachable, !dbg !24 __barray_mask_return.exit252: ; preds = %__barray_mask_borrow.exit250 @@ -335,7 +335,7 @@ mask_block_ok.i.i.i: ; preds = %75, %93 br i1 %96, label %93, label %mask_block_err.i.i.i, !dbg !44 mask_block_err.i.i.i: ; preds = %mask_block_ok.i.i.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0"), !dbg !44 + notail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0"), !dbg !44 unreachable, !dbg !44 __barray_check_bounds.exit.i.i: ; preds = %loop_body.i, %__barray_mask_return.exit252 @@ -355,7 +355,7 @@ __barray_check_bounds.exit.i.i: ; preds = %loop_body.i, %__bar br i1 %104, label %panic.i.i.i, label %__barray_check_bounds.exit.i, !dbg !56 panic.i.i.i: ; preds = %__barray_check_bounds.exit.i.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !56 + notail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !56 unreachable, !dbg !56 __barray_check_bounds.exit.i: ; preds = %__barray_check_bounds.exit.i.i @@ -364,15 +364,15 @@ __barray_check_bounds.exit.i: ; preds = %__barray_check_boun store i64 %106, ptr %100, align 4, !dbg !56 %107 = getelementptr inbounds i64, ptr %.fca.0.extract80.i185.i, i64 %98, !dbg !55 %108 = load i64, ptr %107, align 4, !dbg !55 - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %108) - tail call void @___qfree(i64 %108) + %lazy_measure.i = notail call i64 @___lazy_measure(i64 %108) + notail call void @___qfree(i64 %108) %109 = load i64, ptr %74, align 4 %110 = lshr i64 %109, %"163_0.sroa.15.0184.i" %111 = trunc i64 %110 to i1 br i1 %111, label %loop_body.i, label %panic.i.i panic.i.i: ; preds = %__barray_check_bounds.exit.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") + notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable loop_body.i: ; preds = %__barray_check_bounds.exit.i @@ -404,7 +404,7 @@ cond_exit_369: ; preds = %cond_exit_369.threa ret void mask_block_err.i: ; preds = %cond_exit_369.thread.9 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") + notail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable __barray_mask_borrow.exit259: ; preds = %"__hugr__.guppylang.std.quantum.measure_array$10.149.exit" @@ -430,7 +430,7 @@ __barray_mask_borrow.exit259.1: ; preds = %cond_exit_369.threa cond_392_case_1.1: ; preds = %__barray_mask_borrow.exit259.1 %.fca.1.extract.1 = extractvalue { i1, i64, i1 } %125, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.1) + notail call void @___dec_future_refcount(i64 %.fca.1.extract.1) %.pre281 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.1 @@ -450,7 +450,7 @@ __barray_mask_borrow.exit259.2: ; preds = %cond_exit_369.threa cond_392_case_1.2: ; preds = %__barray_mask_borrow.exit259.2 %.fca.1.extract.2 = extractvalue { i1, i64, i1 } %130, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.2) + notail call void @___dec_future_refcount(i64 %.fca.1.extract.2) %.pre282 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.2 @@ -470,7 +470,7 @@ __barray_mask_borrow.exit259.3: ; preds = %cond_exit_369.threa cond_392_case_1.3: ; preds = %__barray_mask_borrow.exit259.3 %.fca.1.extract.3 = extractvalue { i1, i64, i1 } %135, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.3) + notail call void @___dec_future_refcount(i64 %.fca.1.extract.3) %.pre283 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.3 @@ -490,7 +490,7 @@ __barray_mask_borrow.exit259.4: ; preds = %cond_exit_369.threa cond_392_case_1.4: ; preds = %__barray_mask_borrow.exit259.4 %.fca.1.extract.4 = extractvalue { i1, i64, i1 } %140, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.4) + notail call void @___dec_future_refcount(i64 %.fca.1.extract.4) %.pre284 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.4 @@ -510,7 +510,7 @@ __barray_mask_borrow.exit259.5: ; preds = %cond_exit_369.threa cond_392_case_1.5: ; preds = %__barray_mask_borrow.exit259.5 %.fca.1.extract.5 = extractvalue { i1, i64, i1 } %145, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.5) + notail call void @___dec_future_refcount(i64 %.fca.1.extract.5) %.pre285 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.5 @@ -530,7 +530,7 @@ __barray_mask_borrow.exit259.6: ; preds = %cond_exit_369.threa cond_392_case_1.6: ; preds = %__barray_mask_borrow.exit259.6 %.fca.1.extract.6 = extractvalue { i1, i64, i1 } %150, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.6) + notail call void @___dec_future_refcount(i64 %.fca.1.extract.6) %.pre286 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.6 @@ -550,7 +550,7 @@ __barray_mask_borrow.exit259.7: ; preds = %cond_exit_369.threa cond_392_case_1.7: ; preds = %__barray_mask_borrow.exit259.7 %.fca.1.extract.7 = extractvalue { i1, i64, i1 } %155, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.7) + notail call void @___dec_future_refcount(i64 %.fca.1.extract.7) %.pre287 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.7 @@ -570,7 +570,7 @@ __barray_mask_borrow.exit259.8: ; preds = %cond_exit_369.threa cond_392_case_1.8: ; preds = %__barray_mask_borrow.exit259.8 %.fca.1.extract.8 = extractvalue { i1, i64, i1 } %160, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.8) + notail call void @___dec_future_refcount(i64 %.fca.1.extract.8) %.pre288 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.8 @@ -590,7 +590,7 @@ __barray_mask_borrow.exit259.9: ; preds = %cond_exit_369.threa cond_392_case_1.9: ; preds = %__barray_mask_borrow.exit259.9 %.fca.1.extract.9 = extractvalue { i1, i64, i1 } %165, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.9) + notail call void @___dec_future_refcount(i64 %.fca.1.extract.9) %.pre289 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.9 @@ -603,7 +603,7 @@ cond_exit_369.thread.9: ; preds = %cond_392_case_1.9, cond_392_case_1: ; preds = %__barray_mask_borrow.exit259 %.fca.1.extract = extractvalue { i1, i64, i1 } %120, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract) + notail call void @___dec_future_refcount(i64 %.fca.1.extract) %.pre = load i64, ptr %74, align 4 br label %cond_exit_369.thread } @@ -630,7 +630,7 @@ declare void @___reset(i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !59 { entry: tail call void @setup(i64 %0), !dbg !63 - tail call void @"__hugr__.__main__.measure_qb_array..main.1"(), !dbg !63 + notail call void @"__hugr__.__main__.measure_qb_array..main.1"(), !dbg !63 %1 = tail call i64 @teardown(), !dbg !63 ret i64 %1, !dbg !63 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-no_results/no_results_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-no_results/no_results_x86_64-unknown-linux-gnu index 2b0bd5a60..a84e435a7 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-no_results/no_results_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-no_results/no_results_x86_64-unknown-linux-gnu @@ -7,21 +7,21 @@ target triple = "x86_64-unknown-linux-gnu" define void @"__hugr__.__main__.no_results..bar.1"() local_unnamed_addr !dbg !4 { alloca_block: - %qalloc.i = tail call i64 @___qalloc(), !dbg !8 + %qalloc.i = notail call i64 @___qalloc(), !dbg !8 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 br i1 %not_max.not.not.i, label %cond_18_case_0.i, label %__hugr__.__tk2_qalloc.14.exit, !dbg !8 cond_18_case_0.i: ; preds = %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 unreachable, !dbg !8 __hugr__.__tk2_qalloc.14.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i), !dbg !8 - tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 - tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 - %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) + notail call void @___reset(i64 %qalloc.i), !dbg !8 + notail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 + notail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 + %lazy_measure = notail call i64 @___lazy_measure(i64 %qalloc.i) + notail call void @___qfree(i64 %qalloc.i) + notail call void @___dec_future_refcount(i64 %lazy_measure) ret void } @@ -45,7 +45,7 @@ declare void @___rz(i64, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !10 { entry: tail call void @setup(i64 %0), !dbg !15 - tail call void @"__hugr__.__main__.no_results..bar.1"(), !dbg !15 + notail call void @"__hugr__.__main__.no_results..bar.1"(), !dbg !15 %1 = tail call i64 @teardown(), !dbg !15 ret i64 %1, !dbg !15 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-postselect_exit/postselect_exit_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-postselect_exit/postselect_exit_x86_64-unknown-linux-gnu index 38469c430..b71a7cf59 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-postselect_exit/postselect_exit_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-postselect_exit/postselect_exit_x86_64-unknown-linux-gnu @@ -9,33 +9,33 @@ target triple = "x86_64-unknown-linux-gnu" define void @"__hugr__.__main__.postselect_exit..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - %qalloc.i = tail call i64 @___qalloc(), !dbg !8 + %qalloc.i = notail call i64 @___qalloc(), !dbg !8 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 br i1 %not_max.not.not.i, label %cond_45_case_0.i, label %__hugr__.__tk2_qalloc.41.exit, !dbg !8 cond_45_case_0.i: ; preds = %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 unreachable, !dbg !8 __hugr__.__tk2_qalloc.41.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i), !dbg !8 - tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 - tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) - tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure) + notail call void @___reset(i64 %qalloc.i), !dbg !8 + notail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 + notail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 + %lazy_measure = notail call i64 @___lazy_measure(i64 %qalloc.i) + notail call void @___qfree(i64 %qalloc.i) + notail call void @___inc_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) + notail call void @___dec_future_refcount(i64 %lazy_measure) br i1 %read_bool, label %0, label %cond_98_case_1 cond_98_case_1: ; preds = %__hugr__.__tk2_qalloc.41.exit %read_bool66 = 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_c.1C9EF4D1.0, i64 11, i1 %read_bool66), !dbg !10 + notail call void @___dec_future_refcount(i64 %lazy_measure) + notail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool66), !dbg !10 ret void 0: ; preds = %__hugr__.__tk2_qalloc.41.exit - tail call void @panic(i32 42, ptr nonnull @s_Postselect.13DF1CD0.0), !dbg !11 + notail call void @panic(i32 42, ptr nonnull @s_Postselect.13DF1CD0.0), !dbg !11 unreachable } @@ -65,7 +65,7 @@ declare void @___rz(i64, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !12 { entry: tail call void @setup(i64 %0), !dbg !17 - tail call void @"__hugr__.__main__.postselect_exit..main.1"(), !dbg !17 + notail call void @"__hugr__.__main__.postselect_exit..main.1"(), !dbg !17 %1 = tail call i64 @teardown(), !dbg !17 ret i64 %1, !dbg !17 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-postselect_panic/postselect_panic_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-postselect_panic/postselect_panic_x86_64-unknown-linux-gnu index 70c237edc..f7d9e1414 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-postselect_panic/postselect_panic_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-postselect_panic/postselect_panic_x86_64-unknown-linux-gnu @@ -9,33 +9,33 @@ target triple = "x86_64-unknown-linux-gnu" define void @"__hugr__.__main__.postselect_panic..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - %qalloc.i = tail call i64 @___qalloc(), !dbg !8 + %qalloc.i = notail call i64 @___qalloc(), !dbg !8 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 br i1 %not_max.not.not.i, label %cond_43_case_0.i, label %__hugr__.__tk2_qalloc.39.exit, !dbg !8 cond_43_case_0.i: ; preds = %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 unreachable, !dbg !8 __hugr__.__tk2_qalloc.39.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i), !dbg !8 - tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 - tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) - tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure) + notail call void @___reset(i64 %qalloc.i), !dbg !8 + notail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 + notail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 + %lazy_measure = notail call i64 @___lazy_measure(i64 %qalloc.i) + notail call void @___qfree(i64 %qalloc.i) + notail call void @___inc_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) + notail call void @___dec_future_refcount(i64 %lazy_measure) br i1 %read_bool, label %0, label %cond_96_case_1 cond_96_case_1: ; preds = %__hugr__.__tk2_qalloc.39.exit %read_bool65 = 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_c.1C9EF4D1.0, i64 11, i1 %read_bool65), !dbg !10 + notail call void @___dec_future_refcount(i64 %lazy_measure) + notail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool65), !dbg !10 ret void 0: ; preds = %__hugr__.__tk2_qalloc.39.exit - tail call void @panic(i32 1001, ptr nonnull @s_Postselect.13DF1CD0.0), !dbg !11 + notail call void @panic(i32 1001, ptr nonnull @s_Postselect.13DF1CD0.0), !dbg !11 unreachable } @@ -65,7 +65,7 @@ declare void @___rz(i64, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !12 { entry: tail call void @setup(i64 %0), !dbg !17 - tail call void @"__hugr__.__main__.postselect_panic..main.1"(), !dbg !17 + notail call void @"__hugr__.__main__.postselect_panic..main.1"(), !dbg !17 %1 = tail call i64 @teardown(), !dbg !17 ret i64 %1, !dbg !17 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-print_current_shot/print_current_shot_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-print_current_shot/print_current_shot_x86_64-unknown-linux-gnu index 5b6f4a73a..d5a548818 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-print_current_shot/print_current_shot_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-print_current_shot/print_current_shot_x86_64-unknown-linux-gnu @@ -7,8 +7,8 @@ target triple = "x86_64-unknown-linux-gnu" define void @"__hugr__.__main__.print_current_shot..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - %shot = tail call i64 @get_current_shot(), !dbg !8 - tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot), !dbg !9 + %shot = notail call i64 @get_current_shot(), !dbg !8 + notail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot), !dbg !9 ret void } @@ -19,8 +19,8 @@ declare void @print_int(ptr, i64, i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !10 { entry: tail call void @setup(i64 %0), !dbg !15 - %shot.i = tail call i64 @get_current_shot(), !dbg !16 - tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot.i), !dbg !18 + %shot.i = notail call i64 @get_current_shot(), !dbg !16 + notail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot.i), !dbg !18 %1 = tail call i64 @teardown(), !dbg !15 ret i64 %1, !dbg !15 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-rng/rng_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-rng/rng_x86_64-unknown-linux-gnu index 802e05075..ffb4d1b61 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-rng/rng_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-rng/rng_x86_64-unknown-linux-gnu @@ -13,27 +13,27 @@ target triple = "x86_64-unknown-linux-gnu" define void @"__hugr__.__main__.rng..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - tail call void @random_seed(i64 42), !dbg !8 - %rint = tail call i32 @random_int(), !dbg !17 - %rint14 = tail call i32 @random_int(), !dbg !18 - %rfloat = tail call double @random_float(), !dbg !19 - %rintb = tail call i32 @random_rng(i32 100), !dbg !20 + notail call void @random_seed(i64 42), !dbg !8 + %rint = notail call i32 @random_int(), !dbg !17 + %rint14 = notail call i32 @random_int(), !dbg !18 + %rfloat = notail call double @random_float(), !dbg !19 + %rintb = notail call i32 @random_rng(i32 100), !dbg !20 %0 = sext i32 %rintb to i64, !dbg !20 %1 = sext i32 %rint14 to i64, !dbg !18 %2 = sext i32 %rint to i64, !dbg !17 - tail call void @print_int(ptr nonnull @res_rint.B928E41E.0, i64 13, i64 %2), !dbg !21 - tail call void @print_int(ptr nonnull @res_rint1.0884EC03.0, i64 14, i64 %1), !dbg !22 - tail call void @print_float(ptr nonnull @res_rfloat.F0E4DD2C.0, i64 17, double %rfloat), !dbg !23 - tail call void @print_int(ptr nonnull @res_rint_bnd.CB1E6B0D.0, i64 17, i64 %0), !dbg !24 - tail call void @random_seed(i64 84), !dbg !25 - %rint47 = tail call i32 @random_int(), !dbg !27 - %rfloat49 = tail call double @random_float(), !dbg !28 - %rintb52 = tail call i32 @random_rng(i32 200), !dbg !29 + notail call void @print_int(ptr nonnull @res_rint.B928E41E.0, i64 13, i64 %2), !dbg !21 + notail call void @print_int(ptr nonnull @res_rint1.0884EC03.0, i64 14, i64 %1), !dbg !22 + notail call void @print_float(ptr nonnull @res_rfloat.F0E4DD2C.0, i64 17, double %rfloat), !dbg !23 + notail call void @print_int(ptr nonnull @res_rint_bnd.CB1E6B0D.0, i64 17, i64 %0), !dbg !24 + notail call void @random_seed(i64 84), !dbg !25 + %rint47 = notail call i32 @random_int(), !dbg !27 + %rfloat49 = notail call double @random_float(), !dbg !28 + %rintb52 = notail call i32 @random_rng(i32 200), !dbg !29 %3 = sext i32 %rintb52 to i64, !dbg !29 %4 = sext i32 %rint47 to i64, !dbg !27 - tail call void @print_int(ptr nonnull @res_rint2.F0335598.0, i64 14, i64 %4), !dbg !30 - tail call void @print_float(ptr nonnull @res_rfloat2.4DAB941F.0, i64 18, double %rfloat49), !dbg !31 - tail call void @print_int(ptr nonnull @res_rint_bnd2.169DE399.0, i64 18, i64 %3), !dbg !32 + notail call void @print_int(ptr nonnull @res_rint2.F0335598.0, i64 14, i64 %4), !dbg !30 + notail call void @print_float(ptr nonnull @res_rfloat2.4DAB941F.0, i64 18, double %rfloat49), !dbg !31 + notail call void @print_int(ptr nonnull @res_rint_bnd2.169DE399.0, i64 18, i64 %3), !dbg !32 ret void } @@ -52,7 +52,7 @@ declare void @random_seed(i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !33 { entry: tail call void @setup(i64 %0), !dbg !37 - tail call void @"__hugr__.__main__.rng..main.1"(), !dbg !37 + notail call void @"__hugr__.__main__.rng..main.1"(), !dbg !37 %1 = tail call i64 @teardown(), !dbg !37 ret i64 %1, !dbg !37 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-rus/rus_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-rus/rus_x86_64-unknown-linux-gnu index 9b2a555e5..33f9ea18e 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-rus/rus_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-rus/rus_x86_64-unknown-linux-gnu @@ -8,88 +8,88 @@ target triple = "x86_64-unknown-linux-gnu" define void @"__hugr__.__main__.rus..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - %qalloc.i = tail call i64 @___qalloc(), !dbg !8 + %qalloc.i = notail call i64 @___qalloc(), !dbg !8 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 br i1 %not_max.not.not.i, label %cond_87_case_0.i, label %__hugr__.__tk2_qalloc.83.exit, !dbg !8 cond_87_case_0.i: ; preds = %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 unreachable, !dbg !8 __hugr__.__tk2_qalloc.83.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i), !dbg !8 - %qalloc.i132.i = tail call i64 @___qalloc(), !dbg !9 + notail call void @___reset(i64 %qalloc.i), !dbg !8 + %qalloc.i132.i = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i133.i = icmp eq i64 %qalloc.i132.i, -1, !dbg !9 br i1 %not_max.not.not.i133.i, label %cond_101_case_0.i.i, label %__hugr__.__tk2_qalloc.97.exit.i, !dbg !9 cond_101_case_0.i.i: ; preds = %cond_242_case_1.backedge.i, %__hugr__.__tk2_qalloc.83.exit - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 unreachable, !dbg !9 __hugr__.__tk2_qalloc.97.exit.i: ; preds = %__hugr__.__tk2_qalloc.83.exit, %cond_242_case_1.backedge.i %qalloc.i134.i = phi i64 [ %qalloc.i.i, %cond_242_case_1.backedge.i ], [ %qalloc.i132.i, %__hugr__.__tk2_qalloc.83.exit ] - tail call void @___reset(i64 %qalloc.i134.i), !dbg !9 - %qalloc.i128.i = tail call i64 @___qalloc(), !dbg !15 + notail call void @___reset(i64 %qalloc.i134.i), !dbg !9 + %qalloc.i128.i = notail call i64 @___qalloc(), !dbg !15 %not_max.not.not.i129.i = icmp eq i64 %qalloc.i128.i, -1, !dbg !15 br i1 %not_max.not.not.i129.i, label %cond_115_case_0.i.i, label %__hugr__.__tk2_qalloc.111.exit.i, !dbg !15 cond_115_case_0.i.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !15 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !15 unreachable, !dbg !15 __hugr__.__tk2_qalloc.111.exit.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i - tail call void @___reset(i64 %qalloc.i128.i), !dbg !15 - tail call void @___rxy(i64 %qalloc.i128.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !16 - tail call void @___rz(i64 %qalloc.i128.i, double 0x400921FB54442D18), !dbg !16 - tail call void @___rxy(i64 %qalloc.i134.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !17 - tail call void @___rz(i64 %qalloc.i134.i, double 0x400921FB54442D18), !dbg !17 - tail call void @___rz(i64 %qalloc.i134.i, double 0xBFE921FB54442D18), !dbg !18 - tail call void @___rxy(i64 %qalloc.i134.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18), !dbg !19 - tail call void @___rzz(i64 %qalloc.i128.i, i64 %qalloc.i134.i, double 0x3FF921FB54442D18), !dbg !19 - tail call void @___rz(i64 %qalloc.i128.i, double 0xBFF921FB54442D18), !dbg !19 - tail call void @___rxy(i64 %qalloc.i134.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18), !dbg !19 - tail call void @___rz(i64 %qalloc.i134.i, double 0xBFF921FB54442D18), !dbg !19 - tail call void @___rz(i64 %qalloc.i134.i, double 0x3FE921FB54442D18), !dbg !20 - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i134.i) - tail call void @___qfree(i64 %qalloc.i134.i) + notail call void @___reset(i64 %qalloc.i128.i), !dbg !15 + notail call void @___rxy(i64 %qalloc.i128.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !16 + notail call void @___rz(i64 %qalloc.i128.i, double 0x400921FB54442D18), !dbg !16 + notail call void @___rxy(i64 %qalloc.i134.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !17 + notail call void @___rz(i64 %qalloc.i134.i, double 0x400921FB54442D18), !dbg !17 + notail call void @___rz(i64 %qalloc.i134.i, double 0xBFE921FB54442D18), !dbg !18 + notail call void @___rxy(i64 %qalloc.i134.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18), !dbg !19 + notail call void @___rzz(i64 %qalloc.i128.i, i64 %qalloc.i134.i, double 0x3FF921FB54442D18), !dbg !19 + notail call void @___rz(i64 %qalloc.i128.i, double 0xBFF921FB54442D18), !dbg !19 + notail call void @___rxy(i64 %qalloc.i134.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18), !dbg !19 + notail call void @___rz(i64 %qalloc.i134.i, double 0xBFF921FB54442D18), !dbg !19 + notail call void @___rz(i64 %qalloc.i134.i, double 0x3FE921FB54442D18), !dbg !20 + %lazy_measure.i = notail call i64 @___lazy_measure(i64 %qalloc.i134.i) + notail call void @___qfree(i64 %qalloc.i134.i) %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) - tail call void @___dec_future_refcount(i64 %lazy_measure.i) + notail call void @___dec_future_refcount(i64 %lazy_measure.i) br i1 %read_bool.i, label %cond_256_case_1.i, label %0 0: ; preds = %__hugr__.__tk2_qalloc.111.exit.i - tail call void @___qfree(i64 %qalloc.i128.i), !dbg !21 + notail call void @___qfree(i64 %qalloc.i128.i), !dbg !21 br label %cond_242_case_1.backedge.i cond_242_case_1.backedge.i: ; preds = %1, %0 - %qalloc.i.i = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.i = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1, !dbg !9 br i1 %not_max.not.not.i.i, label %cond_101_case_0.i.i, label %__hugr__.__tk2_qalloc.97.exit.i, !dbg !9 cond_256_case_1.i: ; preds = %__hugr__.__tk2_qalloc.111.exit.i - tail call void @___rz(i64 %qalloc.i, double 0x3FE921FB54442D18), !dbg !22 - tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !23 - tail call void @___rxy(i64 %qalloc.i128.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18), !dbg !24 - tail call void @___rzz(i64 %qalloc.i, i64 %qalloc.i128.i, double 0x3FF921FB54442D18), !dbg !24 - tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18), !dbg !24 - tail call void @___rxy(i64 %qalloc.i128.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18), !dbg !24 - tail call void @___rz(i64 %qalloc.i128.i, double 0xBFF921FB54442D18), !dbg !24 - tail call void @___rz(i64 %qalloc.i128.i, double 0x3FE921FB54442D18), !dbg !25 - %lazy_measure67.i = tail call i64 @___lazy_measure(i64 %qalloc.i128.i) - tail call void @___qfree(i64 %qalloc.i128.i) + notail call void @___rz(i64 %qalloc.i, double 0x3FE921FB54442D18), !dbg !22 + notail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !23 + notail call void @___rxy(i64 %qalloc.i128.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18), !dbg !24 + notail call void @___rzz(i64 %qalloc.i, i64 %qalloc.i128.i, double 0x3FF921FB54442D18), !dbg !24 + notail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18), !dbg !24 + notail call void @___rxy(i64 %qalloc.i128.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18), !dbg !24 + notail call void @___rz(i64 %qalloc.i128.i, double 0xBFF921FB54442D18), !dbg !24 + notail call void @___rz(i64 %qalloc.i128.i, double 0x3FE921FB54442D18), !dbg !25 + %lazy_measure67.i = notail call i64 @___lazy_measure(i64 %qalloc.i128.i) + notail call void @___qfree(i64 %qalloc.i128.i) %read_bool80.i = tail call i1 @___read_future_bool(i64 %lazy_measure67.i) - tail call void @___dec_future_refcount(i64 %lazy_measure67.i) + notail call void @___dec_future_refcount(i64 %lazy_measure67.i) br i1 %read_bool80.i, label %"__hugr__.__main__.rus..rus.17.exit", label %1 1: ; preds = %cond_256_case_1.i - tail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00), !dbg !26 + notail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00), !dbg !26 br label %cond_242_case_1.backedge.i "__hugr__.__main__.rus..rus.17.exit": ; preds = %cond_256_case_1.i - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) - tail call void @___qfree(i64 %qalloc.i) + %lazy_measure = notail call i64 @___lazy_measure(i64 %qalloc.i) + notail 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) - tail call void @print_bool(ptr nonnull @res_result.457DE32D.0, i64 16, i1 %read_bool), !dbg !27 + notail call void @___dec_future_refcount(i64 %lazy_measure) + notail call void @print_bool(ptr nonnull @res_result.457DE32D.0, i64 16, i1 %read_bool), !dbg !27 ret void } @@ -119,7 +119,7 @@ declare void @___rzz(i64, i64, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !28 { entry: tail call void @setup(i64 %0), !dbg !30 - tail call void @"__hugr__.__main__.rus..main.1"(), !dbg !30 + notail call void @"__hugr__.__main__.rus..main.1"(), !dbg !30 %1 = tail call i64 @teardown(), !dbg !30 ret i64 %1, !dbg !30 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-discard_qb_array/discard_qb_array_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-discard_qb_array/discard_qb_array_x86_64-windows-msvc index f9bb0b2b8..914dbc074 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-discard_qb_array/discard_qb_array_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-discard_qb_array/discard_qb_array_x86_64-windows-msvc @@ -12,34 +12,34 @@ alloca_block: %0 = tail call ptr @heap_alloc(i64 80), !dbg !8 %1 = tail call ptr @heap_alloc(i64 8), !dbg !8 store i64 -1, ptr %1, align 1, !dbg !8 - %qalloc.i = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !9 br i1 %not_max.not.not.i, label %cond_233_case_0.i, label %__barray_check_bounds.exit, !dbg !9 cond_233_case_0.i: ; preds = %cond_exit_20.8, %cond_exit_20.7, %cond_exit_20.6, %cond_exit_20.5, %cond_exit_20.4, %cond_exit_20.3, %cond_exit_20.2, %cond_exit_20.1, %cond_exit_20, %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 unreachable, !dbg !9 __barray_check_bounds.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i), !dbg !9 + notail call void @___reset(i64 %qalloc.i), !dbg !9 %2 = load i64, ptr %1, align 4 %3 = trunc i64 %2 to i1 br i1 %3, label %cond_exit_20, 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") + notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable cond_exit_20: ; preds = %__barray_check_bounds.exit %4 = and i64 %2, -2 store i64 %4, ptr %1, align 4 store i64 %qalloc.i, ptr %0, align 4 - %qalloc.i.1 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.1 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1, !dbg !9 br i1 %not_max.not.not.i.1, label %cond_233_case_0.i, label %__barray_check_bounds.exit.1, !dbg !9 __barray_check_bounds.exit.1: ; preds = %cond_exit_20 - tail call void @___reset(i64 %qalloc.i.1), !dbg !9 + notail call void @___reset(i64 %qalloc.i.1), !dbg !9 %5 = load i64, ptr %1, align 4 %6 = and i64 %5, 2 %.not = icmp eq i64 %6, 0 @@ -50,12 +50,12 @@ cond_exit_20.1: ; preds = %__barray_check_boun store i64 %7, ptr %1, align 4 %8 = getelementptr inbounds nuw i8, ptr %0, i64 8 store i64 %qalloc.i.1, ptr %8, align 4 - %qalloc.i.2 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.2 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1, !dbg !9 br i1 %not_max.not.not.i.2, label %cond_233_case_0.i, label %__barray_check_bounds.exit.2, !dbg !9 __barray_check_bounds.exit.2: ; preds = %cond_exit_20.1 - tail call void @___reset(i64 %qalloc.i.2), !dbg !9 + notail call void @___reset(i64 %qalloc.i.2), !dbg !9 %9 = load i64, ptr %1, align 4 %10 = and i64 %9, 4 %.not108 = icmp eq i64 %10, 0 @@ -66,12 +66,12 @@ cond_exit_20.2: ; preds = %__barray_check_boun store i64 %11, ptr %1, align 4 %12 = getelementptr inbounds nuw i8, ptr %0, i64 16 store i64 %qalloc.i.2, ptr %12, align 4 - %qalloc.i.3 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.3 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1, !dbg !9 br i1 %not_max.not.not.i.3, label %cond_233_case_0.i, label %__barray_check_bounds.exit.3, !dbg !9 __barray_check_bounds.exit.3: ; preds = %cond_exit_20.2 - tail call void @___reset(i64 %qalloc.i.3), !dbg !9 + notail call void @___reset(i64 %qalloc.i.3), !dbg !9 %13 = load i64, ptr %1, align 4 %14 = and i64 %13, 8 %.not109 = icmp eq i64 %14, 0 @@ -82,12 +82,12 @@ cond_exit_20.3: ; preds = %__barray_check_boun store i64 %15, ptr %1, align 4 %16 = getelementptr inbounds nuw i8, ptr %0, i64 24 store i64 %qalloc.i.3, ptr %16, align 4 - %qalloc.i.4 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.4 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1, !dbg !9 br i1 %not_max.not.not.i.4, label %cond_233_case_0.i, label %__barray_check_bounds.exit.4, !dbg !9 __barray_check_bounds.exit.4: ; preds = %cond_exit_20.3 - tail call void @___reset(i64 %qalloc.i.4), !dbg !9 + notail call void @___reset(i64 %qalloc.i.4), !dbg !9 %17 = load i64, ptr %1, align 4 %18 = and i64 %17, 16 %.not110 = icmp eq i64 %18, 0 @@ -98,12 +98,12 @@ cond_exit_20.4: ; preds = %__barray_check_boun store i64 %19, ptr %1, align 4 %20 = getelementptr inbounds nuw i8, ptr %0, i64 32 store i64 %qalloc.i.4, ptr %20, align 4 - %qalloc.i.5 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.5 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.5 = icmp eq i64 %qalloc.i.5, -1, !dbg !9 br i1 %not_max.not.not.i.5, label %cond_233_case_0.i, label %__barray_check_bounds.exit.5, !dbg !9 __barray_check_bounds.exit.5: ; preds = %cond_exit_20.4 - tail call void @___reset(i64 %qalloc.i.5), !dbg !9 + notail call void @___reset(i64 %qalloc.i.5), !dbg !9 %21 = load i64, ptr %1, align 4 %22 = and i64 %21, 32 %.not111 = icmp eq i64 %22, 0 @@ -114,12 +114,12 @@ cond_exit_20.5: ; preds = %__barray_check_boun store i64 %23, ptr %1, align 4 %24 = getelementptr inbounds nuw i8, ptr %0, i64 40 store i64 %qalloc.i.5, ptr %24, align 4 - %qalloc.i.6 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.6 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.6 = icmp eq i64 %qalloc.i.6, -1, !dbg !9 br i1 %not_max.not.not.i.6, label %cond_233_case_0.i, label %__barray_check_bounds.exit.6, !dbg !9 __barray_check_bounds.exit.6: ; preds = %cond_exit_20.5 - tail call void @___reset(i64 %qalloc.i.6), !dbg !9 + notail call void @___reset(i64 %qalloc.i.6), !dbg !9 %25 = load i64, ptr %1, align 4 %26 = and i64 %25, 64 %.not112 = icmp eq i64 %26, 0 @@ -130,12 +130,12 @@ cond_exit_20.6: ; preds = %__barray_check_boun store i64 %27, ptr %1, align 4 %28 = getelementptr inbounds nuw i8, ptr %0, i64 48 store i64 %qalloc.i.6, ptr %28, align 4 - %qalloc.i.7 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.7 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.7 = icmp eq i64 %qalloc.i.7, -1, !dbg !9 br i1 %not_max.not.not.i.7, label %cond_233_case_0.i, label %__barray_check_bounds.exit.7, !dbg !9 __barray_check_bounds.exit.7: ; preds = %cond_exit_20.6 - tail call void @___reset(i64 %qalloc.i.7), !dbg !9 + notail call void @___reset(i64 %qalloc.i.7), !dbg !9 %29 = load i64, ptr %1, align 4 %30 = and i64 %29, 128 %.not113 = icmp eq i64 %30, 0 @@ -146,12 +146,12 @@ cond_exit_20.7: ; preds = %__barray_check_boun store i64 %31, ptr %1, align 4 %32 = getelementptr inbounds nuw i8, ptr %0, i64 56 store i64 %qalloc.i.7, ptr %32, align 4 - %qalloc.i.8 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.8 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.8 = icmp eq i64 %qalloc.i.8, -1, !dbg !9 br i1 %not_max.not.not.i.8, label %cond_233_case_0.i, label %__barray_check_bounds.exit.8, !dbg !9 __barray_check_bounds.exit.8: ; preds = %cond_exit_20.7 - tail call void @___reset(i64 %qalloc.i.8), !dbg !9 + notail call void @___reset(i64 %qalloc.i.8), !dbg !9 %33 = load i64, ptr %1, align 4 %34 = and i64 %33, 256 %.not114 = icmp eq i64 %34, 0 @@ -162,12 +162,12 @@ cond_exit_20.8: ; preds = %__barray_check_boun store i64 %35, ptr %1, align 4 %36 = getelementptr inbounds nuw i8, ptr %0, i64 64 store i64 %qalloc.i.8, ptr %36, align 4 - %qalloc.i.9 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.9 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.9 = icmp eq i64 %qalloc.i.9, -1, !dbg !9 br i1 %not_max.not.not.i.9, label %cond_233_case_0.i, label %__barray_check_bounds.exit.9, !dbg !9 __barray_check_bounds.exit.9: ; preds = %cond_exit_20.8 - tail call void @___reset(i64 %qalloc.i.9), !dbg !9 + notail call void @___reset(i64 %qalloc.i.9), !dbg !9 %37 = load i64, ptr %1, align 4 %38 = and i64 %37, 512 %.not115 = icmp eq i64 %38, 0 @@ -193,7 +193,7 @@ __barray_mask_borrow.exit.1.i: ; preds = %cond_171_case_1.1.i store i64 %45, ptr %1, align 4, !dbg !21 %46 = getelementptr inbounds nuw i8, ptr %0, i64 8, !dbg !23 %47 = load i64, ptr %46, align 4, !dbg !23 - tail call void @___qfree(i64 %47), !dbg !24 + notail call void @___qfree(i64 %47), !dbg !24 %.pre337.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.2.i @@ -208,7 +208,7 @@ __barray_mask_borrow.exit.2.i: ; preds = %cond_171_case_1.2.i store i64 %50, ptr %1, align 4, !dbg !21 %51 = getelementptr inbounds nuw i8, ptr %0, i64 16, !dbg !23 %52 = load i64, ptr %51, align 4, !dbg !23 - tail call void @___qfree(i64 %52), !dbg !24 + notail call void @___qfree(i64 %52), !dbg !24 %.pre338.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.3.i @@ -223,7 +223,7 @@ __barray_mask_borrow.exit.3.i: ; preds = %cond_171_case_1.3.i store i64 %55, ptr %1, align 4, !dbg !21 %56 = getelementptr inbounds nuw i8, ptr %0, i64 24, !dbg !23 %57 = load i64, ptr %56, align 4, !dbg !23 - tail call void @___qfree(i64 %57), !dbg !24 + notail call void @___qfree(i64 %57), !dbg !24 %.pre339.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.4.i @@ -238,7 +238,7 @@ __barray_mask_borrow.exit.4.i: ; preds = %cond_171_case_1.4.i store i64 %60, ptr %1, align 4, !dbg !21 %61 = getelementptr inbounds nuw i8, ptr %0, i64 32, !dbg !23 %62 = load i64, ptr %61, align 4, !dbg !23 - tail call void @___qfree(i64 %62), !dbg !24 + notail call void @___qfree(i64 %62), !dbg !24 %.pre340.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.5.i @@ -253,7 +253,7 @@ __barray_mask_borrow.exit.5.i: ; preds = %cond_171_case_1.5.i store i64 %65, ptr %1, align 4, !dbg !21 %66 = getelementptr inbounds nuw i8, ptr %0, i64 40, !dbg !23 %67 = load i64, ptr %66, align 4, !dbg !23 - tail call void @___qfree(i64 %67), !dbg !24 + notail call void @___qfree(i64 %67), !dbg !24 %.pre341.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.6.i @@ -268,7 +268,7 @@ __barray_mask_borrow.exit.6.i: ; preds = %cond_171_case_1.6.i store i64 %70, ptr %1, align 4, !dbg !21 %71 = getelementptr inbounds nuw i8, ptr %0, i64 48, !dbg !23 %72 = load i64, ptr %71, align 4, !dbg !23 - tail call void @___qfree(i64 %72), !dbg !24 + notail call void @___qfree(i64 %72), !dbg !24 %.pre342.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.7.i @@ -283,7 +283,7 @@ __barray_mask_borrow.exit.7.i: ; preds = %cond_171_case_1.7.i store i64 %75, ptr %1, align 4, !dbg !21 %76 = getelementptr inbounds nuw i8, ptr %0, i64 56, !dbg !23 %77 = load i64, ptr %76, align 4, !dbg !23 - tail call void @___qfree(i64 %77), !dbg !24 + notail call void @___qfree(i64 %77), !dbg !24 %.pre343.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.8.i @@ -298,7 +298,7 @@ __barray_mask_borrow.exit.8.i: ; preds = %cond_171_case_1.8.i store i64 %80, ptr %1, align 4, !dbg !21 %81 = getelementptr inbounds nuw i8, ptr %0, i64 64, !dbg !23 %82 = load i64, ptr %81, align 4, !dbg !23 - tail call void @___qfree(i64 %82), !dbg !24 + notail call void @___qfree(i64 %82), !dbg !24 %.pre = load i64, ptr %1, align 4, !dbg !10 br label %__barray_check_bounds.exit.9.i @@ -313,7 +313,7 @@ __barray_mask_borrow.exit.9.i: ; preds = %__barray_check_boun store i64 %85, ptr %1, align 4, !dbg !21 %86 = getelementptr inbounds nuw i8, ptr %0, i64 72, !dbg !23 %87 = load i64, ptr %86, align 4, !dbg !23 - tail call void @___qfree(i64 %87), !dbg !24 + notail call void @___qfree(i64 %87), !dbg !24 %.pre344.i = load i64, ptr %1, align 4, !dbg !25 br label %cond_exit_156.i @@ -325,14 +325,14 @@ cond_exit_156.i: ; preds = %__barray_mask_borro br i1 %90, label %"__hugr__.guppylang.std.quantum.discard_array$10.113.exit", label %mask_block_err.i.i, !dbg !25 mask_block_err.i.i: ; preds = %cond_exit_156.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0"), !dbg !25 + notail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0"), !dbg !25 unreachable, !dbg !25 __barray_mask_borrow.exit.i: ; preds = %cond_exit_20.9 %91 = or disjoint i64 %41, 1, !dbg !21 store i64 %91, ptr %1, align 4, !dbg !21 %92 = load i64, ptr %0, align 4, !dbg !23 - tail call void @___qfree(i64 %92), !dbg !24 + notail call void @___qfree(i64 %92), !dbg !24 %.pre.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.1.i @@ -358,7 +358,7 @@ declare void @___reset(i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !28 { entry: tail call void @setup(i64 %0), !dbg !32 - tail call void @"__hugr__.__main__.discard_qb_array..main.1"(), !dbg !32 + notail call void @"__hugr__.__main__.discard_qb_array..main.1"(), !dbg !32 %1 = tail call i64 @teardown(), !dbg !32 ret i64 %1, !dbg !32 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-flip_some/flip_some_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-flip_some/flip_some_x86_64-windows-msvc index 4ff3138cb..ca9ddaeab 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-flip_some/flip_some_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-flip_some/flip_some_x86_64-windows-msvc @@ -11,69 +11,69 @@ target triple = "x86_64-windows-msvc" define void @"__hugr__.__main__.flip_some..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - %qalloc.i = tail call i64 @___qalloc(), !dbg !8 + %qalloc.i = notail call i64 @___qalloc(), !dbg !8 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 br i1 %not_max.not.not.i, label %cond_40_case_0.i, label %__hugr__.__tk2_qalloc.36.exit, !dbg !8 cond_40_case_0.i: ; preds = %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 unreachable, !dbg !8 __hugr__.__tk2_qalloc.36.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i), !dbg !8 - tail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00), !dbg !9 - %qalloc.i101 = tail call i64 @___qalloc(), !dbg !10 + notail call void @___reset(i64 %qalloc.i), !dbg !8 + notail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00), !dbg !9 + %qalloc.i101 = notail call i64 @___qalloc(), !dbg !10 %not_max.not.not.i102 = icmp eq i64 %qalloc.i101, -1, !dbg !10 br i1 %not_max.not.not.i102, label %cond_54_case_0.i, label %__hugr__.__tk2_qalloc.50.exit, !dbg !10 cond_54_case_0.i: ; preds = %__hugr__.__tk2_qalloc.36.exit - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !10 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !10 unreachable, !dbg !10 __hugr__.__tk2_qalloc.50.exit: ; preds = %__hugr__.__tk2_qalloc.36.exit - tail call void @___reset(i64 %qalloc.i101), !dbg !10 - %qalloc.i103 = tail call i64 @___qalloc(), !dbg !11 + notail call void @___reset(i64 %qalloc.i101), !dbg !10 + %qalloc.i103 = notail call i64 @___qalloc(), !dbg !11 %not_max.not.not.i104 = icmp eq i64 %qalloc.i103, -1, !dbg !11 br i1 %not_max.not.not.i104, label %cond_68_case_0.i, label %__hugr__.__tk2_qalloc.64.exit, !dbg !11 cond_68_case_0.i: ; preds = %__hugr__.__tk2_qalloc.50.exit - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !11 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !11 unreachable, !dbg !11 __hugr__.__tk2_qalloc.64.exit: ; preds = %__hugr__.__tk2_qalloc.50.exit - tail call void @___reset(i64 %qalloc.i103), !dbg !11 - tail call void @___rxy(i64 %qalloc.i103, double 0x400921FB54442D18, double 0.000000e+00), !dbg !12 - %qalloc.i105 = tail call i64 @___qalloc(), !dbg !13 + notail call void @___reset(i64 %qalloc.i103), !dbg !11 + notail call void @___rxy(i64 %qalloc.i103, double 0x400921FB54442D18, double 0.000000e+00), !dbg !12 + %qalloc.i105 = notail call i64 @___qalloc(), !dbg !13 %not_max.not.not.i106 = icmp eq i64 %qalloc.i105, -1, !dbg !13 br i1 %not_max.not.not.i106, label %cond_82_case_0.i, label %__hugr__.__tk2_qalloc.78.exit, !dbg !13 cond_82_case_0.i: ; preds = %__hugr__.__tk2_qalloc.64.exit - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !13 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !13 unreachable, !dbg !13 __hugr__.__tk2_qalloc.78.exit: ; preds = %__hugr__.__tk2_qalloc.64.exit - tail call void @___reset(i64 %qalloc.i105), !dbg !13 - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) - tail call void @___qfree(i64 %qalloc.i) + notail call void @___reset(i64 %qalloc.i105), !dbg !13 + %lazy_measure = notail call i64 @___lazy_measure(i64 %qalloc.i) + notail 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) - tail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool), !dbg !14 - %lazy_measure22 = tail call i64 @___lazy_measure(i64 %qalloc.i101) - tail call void @___qfree(i64 %qalloc.i101) + notail call void @___dec_future_refcount(i64 %lazy_measure) + notail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool), !dbg !14 + %lazy_measure22 = notail call i64 @___lazy_measure(i64 %qalloc.i101) + notail call void @___qfree(i64 %qalloc.i101) %read_bool35 = 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_c1.1F7A6571.0, i64 12, i1 %read_bool35), !dbg !15 - %lazy_measure44 = tail call i64 @___lazy_measure(i64 %qalloc.i103) - tail call void @___qfree(i64 %qalloc.i103) + notail call void @___dec_future_refcount(i64 %lazy_measure22) + notail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool35), !dbg !15 + %lazy_measure44 = notail call i64 @___lazy_measure(i64 %qalloc.i103) + notail call void @___qfree(i64 %qalloc.i103) %read_bool57 = tail call i1 @___read_future_bool(i64 %lazy_measure44) - tail call void @___dec_future_refcount(i64 %lazy_measure44) - tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool57), !dbg !16 - tail call void @___rxy(i64 %qalloc.i105, double 0x400921FB54442D18, double 0.000000e+00), !dbg !17 - %lazy_measure67 = tail call i64 @___lazy_measure(i64 %qalloc.i105) - tail call void @___qfree(i64 %qalloc.i105) + notail call void @___dec_future_refcount(i64 %lazy_measure44) + notail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool57), !dbg !16 + notail call void @___rxy(i64 %qalloc.i105, double 0x400921FB54442D18, double 0.000000e+00), !dbg !17 + %lazy_measure67 = notail call i64 @___lazy_measure(i64 %qalloc.i105) + notail call void @___qfree(i64 %qalloc.i105) %read_bool80 = tail call i1 @___read_future_bool(i64 %lazy_measure67) - tail call void @___dec_future_refcount(i64 %lazy_measure67) - tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool80), !dbg !18 + notail call void @___dec_future_refcount(i64 %lazy_measure67) + notail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool80), !dbg !18 ret void } @@ -99,7 +99,7 @@ declare void @___rxy(i64, double, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !19 { entry: tail call void @setup(i64 %0), !dbg !24 - tail call void @"__hugr__.__main__.flip_some..main.1"(), !dbg !24 + notail call void @"__hugr__.__main__.flip_some..main.1"(), !dbg !24 %1 = tail call i64 @teardown(), !dbg !24 ret i64 %1, !dbg !24 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-measure_qb_array/measure_qb_array_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-measure_qb_array/measure_qb_array_x86_64-windows-msvc index 419d2b9a8..2734b505c 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-measure_qb_array/measure_qb_array_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-measure_qb_array/measure_qb_array_x86_64-windows-msvc @@ -13,34 +13,34 @@ alloca_block: %0 = tail call ptr @heap_alloc(i64 80), !dbg !8 %1 = tail call ptr @heap_alloc(i64 8), !dbg !8 store i64 -1, ptr %1, align 1, !dbg !8 - %qalloc.i = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !9 br i1 %not_max.not.not.i, label %cond_299_case_0.i, label %__barray_check_bounds.exit, !dbg !9 cond_299_case_0.i: ; preds = %cond_exit_20.8, %cond_exit_20.7, %cond_exit_20.6, %cond_exit_20.5, %cond_exit_20.4, %cond_exit_20.3, %cond_exit_20.2, %cond_exit_20.1, %cond_exit_20, %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 unreachable, !dbg !9 __barray_check_bounds.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i), !dbg !9 + notail call void @___reset(i64 %qalloc.i), !dbg !9 %2 = load i64, ptr %1, align 4 %3 = trunc i64 %2 to i1 br i1 %3, label %cond_exit_20, 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") + notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable cond_exit_20: ; preds = %__barray_check_bounds.exit %4 = and i64 %2, -2 store i64 %4, ptr %1, align 4 store i64 %qalloc.i, ptr %0, align 4 - %qalloc.i.1 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.1 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1, !dbg !9 br i1 %not_max.not.not.i.1, label %cond_299_case_0.i, label %__barray_check_bounds.exit.1, !dbg !9 __barray_check_bounds.exit.1: ; preds = %cond_exit_20 - tail call void @___reset(i64 %qalloc.i.1), !dbg !9 + notail call void @___reset(i64 %qalloc.i.1), !dbg !9 %5 = load i64, ptr %1, align 4 %6 = and i64 %5, 2 %.not299 = icmp eq i64 %6, 0 @@ -51,12 +51,12 @@ cond_exit_20.1: ; preds = %__barray_check_boun store i64 %7, ptr %1, align 4 %8 = getelementptr inbounds nuw i8, ptr %0, i64 8 store i64 %qalloc.i.1, ptr %8, align 4 - %qalloc.i.2 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.2 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1, !dbg !9 br i1 %not_max.not.not.i.2, label %cond_299_case_0.i, label %__barray_check_bounds.exit.2, !dbg !9 __barray_check_bounds.exit.2: ; preds = %cond_exit_20.1 - tail call void @___reset(i64 %qalloc.i.2), !dbg !9 + notail call void @___reset(i64 %qalloc.i.2), !dbg !9 %9 = load i64, ptr %1, align 4 %10 = and i64 %9, 4 %.not300 = icmp eq i64 %10, 0 @@ -67,12 +67,12 @@ cond_exit_20.2: ; preds = %__barray_check_boun store i64 %11, ptr %1, align 4 %12 = getelementptr inbounds nuw i8, ptr %0, i64 16 store i64 %qalloc.i.2, ptr %12, align 4 - %qalloc.i.3 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.3 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1, !dbg !9 br i1 %not_max.not.not.i.3, label %cond_299_case_0.i, label %__barray_check_bounds.exit.3, !dbg !9 __barray_check_bounds.exit.3: ; preds = %cond_exit_20.2 - tail call void @___reset(i64 %qalloc.i.3), !dbg !9 + notail call void @___reset(i64 %qalloc.i.3), !dbg !9 %13 = load i64, ptr %1, align 4 %14 = and i64 %13, 8 %.not301 = icmp eq i64 %14, 0 @@ -83,12 +83,12 @@ cond_exit_20.3: ; preds = %__barray_check_boun store i64 %15, ptr %1, align 4 %16 = getelementptr inbounds nuw i8, ptr %0, i64 24 store i64 %qalloc.i.3, ptr %16, align 4 - %qalloc.i.4 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.4 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1, !dbg !9 br i1 %not_max.not.not.i.4, label %cond_299_case_0.i, label %__barray_check_bounds.exit.4, !dbg !9 __barray_check_bounds.exit.4: ; preds = %cond_exit_20.3 - tail call void @___reset(i64 %qalloc.i.4), !dbg !9 + notail call void @___reset(i64 %qalloc.i.4), !dbg !9 %17 = load i64, ptr %1, align 4 %18 = and i64 %17, 16 %.not302 = icmp eq i64 %18, 0 @@ -99,12 +99,12 @@ cond_exit_20.4: ; preds = %__barray_check_boun store i64 %19, ptr %1, align 4 %20 = getelementptr inbounds nuw i8, ptr %0, i64 32 store i64 %qalloc.i.4, ptr %20, align 4 - %qalloc.i.5 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.5 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.5 = icmp eq i64 %qalloc.i.5, -1, !dbg !9 br i1 %not_max.not.not.i.5, label %cond_299_case_0.i, label %__barray_check_bounds.exit.5, !dbg !9 __barray_check_bounds.exit.5: ; preds = %cond_exit_20.4 - tail call void @___reset(i64 %qalloc.i.5), !dbg !9 + notail call void @___reset(i64 %qalloc.i.5), !dbg !9 %21 = load i64, ptr %1, align 4 %22 = and i64 %21, 32 %.not303 = icmp eq i64 %22, 0 @@ -115,12 +115,12 @@ cond_exit_20.5: ; preds = %__barray_check_boun store i64 %23, ptr %1, align 4 %24 = getelementptr inbounds nuw i8, ptr %0, i64 40 store i64 %qalloc.i.5, ptr %24, align 4 - %qalloc.i.6 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.6 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.6 = icmp eq i64 %qalloc.i.6, -1, !dbg !9 br i1 %not_max.not.not.i.6, label %cond_299_case_0.i, label %__barray_check_bounds.exit.6, !dbg !9 __barray_check_bounds.exit.6: ; preds = %cond_exit_20.5 - tail call void @___reset(i64 %qalloc.i.6), !dbg !9 + notail call void @___reset(i64 %qalloc.i.6), !dbg !9 %25 = load i64, ptr %1, align 4 %26 = and i64 %25, 64 %.not304 = icmp eq i64 %26, 0 @@ -131,12 +131,12 @@ cond_exit_20.6: ; preds = %__barray_check_boun store i64 %27, ptr %1, align 4 %28 = getelementptr inbounds nuw i8, ptr %0, i64 48 store i64 %qalloc.i.6, ptr %28, align 4 - %qalloc.i.7 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.7 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.7 = icmp eq i64 %qalloc.i.7, -1, !dbg !9 br i1 %not_max.not.not.i.7, label %cond_299_case_0.i, label %__barray_check_bounds.exit.7, !dbg !9 __barray_check_bounds.exit.7: ; preds = %cond_exit_20.6 - tail call void @___reset(i64 %qalloc.i.7), !dbg !9 + notail call void @___reset(i64 %qalloc.i.7), !dbg !9 %29 = load i64, ptr %1, align 4 %30 = and i64 %29, 128 %.not305 = icmp eq i64 %30, 0 @@ -147,12 +147,12 @@ cond_exit_20.7: ; preds = %__barray_check_boun store i64 %31, ptr %1, align 4 %32 = getelementptr inbounds nuw i8, ptr %0, i64 56 store i64 %qalloc.i.7, ptr %32, align 4 - %qalloc.i.8 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.8 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.8 = icmp eq i64 %qalloc.i.8, -1, !dbg !9 br i1 %not_max.not.not.i.8, label %cond_299_case_0.i, label %__barray_check_bounds.exit.8, !dbg !9 __barray_check_bounds.exit.8: ; preds = %cond_exit_20.7 - tail call void @___reset(i64 %qalloc.i.8), !dbg !9 + notail call void @___reset(i64 %qalloc.i.8), !dbg !9 %33 = load i64, ptr %1, align 4 %34 = and i64 %33, 256 %.not306 = icmp eq i64 %34, 0 @@ -163,12 +163,12 @@ cond_exit_20.8: ; preds = %__barray_check_boun store i64 %35, ptr %1, align 4 %36 = getelementptr inbounds nuw i8, ptr %0, i64 64 store i64 %qalloc.i.8, ptr %36, align 4 - %qalloc.i.9 = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.9 = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.9 = icmp eq i64 %qalloc.i.9, -1, !dbg !9 br i1 %not_max.not.not.i.9, label %cond_299_case_0.i, label %__barray_check_bounds.exit.9, !dbg !9 __barray_check_bounds.exit.9: ; preds = %cond_exit_20.8 - tail call void @___reset(i64 %qalloc.i.9), !dbg !9 + notail call void @___reset(i64 %qalloc.i.9), !dbg !9 %37 = load i64, ptr %1, align 4 %38 = and i64 %37, 512 %.not307 = icmp eq i64 %38, 0 @@ -187,20 +187,20 @@ cond_exit_20.9: ; preds = %__barray_check_boun br i1 %42, label %panic.i238, label %__barray_mask_borrow.exit, !dbg !10 panic.i238: ; preds = %cond_exit_20.9 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !10 + notail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !10 unreachable, !dbg !10 __barray_mask_borrow.exit: ; preds = %cond_exit_20.9 %43 = or disjoint i64 %41, 1, !dbg !10 store i64 %43, ptr %1, align 4, !dbg !10 %44 = load i64, ptr %0, align 4, !dbg !12 - tail call void @___rxy(i64 %44, double 0x400921FB54442D18, double 0.000000e+00), !dbg !13 + notail call void @___rxy(i64 %44, double 0x400921FB54442D18, double 0.000000e+00), !dbg !13 %45 = load i64, ptr %1, align 4, !dbg !12 %46 = trunc i64 %45 to i1, !dbg !12 br i1 %46, label %__barray_mask_return.exit240, label %panic.i239, !dbg !12 panic.i239: ; preds = %__barray_mask_borrow.exit - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !12 + notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !12 unreachable, !dbg !12 __barray_mask_return.exit240: ; preds = %__barray_mask_borrow.exit @@ -213,7 +213,7 @@ __barray_mask_return.exit240: ; preds = %__barray_mask_borro br i1 %.not, label %__barray_mask_borrow.exit242, label %panic.i241, !dbg !14 panic.i241: ; preds = %__barray_mask_return.exit240 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !14 + notail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !14 unreachable, !dbg !14 __barray_mask_borrow.exit242: ; preds = %__barray_mask_return.exit240 @@ -221,14 +221,14 @@ __barray_mask_borrow.exit242: ; preds = %__barray_mask_retur store i64 %50, ptr %1, align 4, !dbg !14 %51 = getelementptr inbounds nuw i8, ptr %0, i64 16, !dbg !16 %52 = load i64, ptr %51, align 4, !dbg !16 - tail call void @___rxy(i64 %52, double 0x400921FB54442D18, double 0.000000e+00), !dbg !17 + notail call void @___rxy(i64 %52, double 0x400921FB54442D18, double 0.000000e+00), !dbg !17 %53 = load i64, ptr %1, align 4, !dbg !16 %54 = and i64 %53, 4, !dbg !16 %.not268 = icmp eq i64 %54, 0, !dbg !16 br i1 %.not268, label %panic.i243, label %__barray_mask_return.exit244, !dbg !16 panic.i243: ; preds = %__barray_mask_borrow.exit242 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !16 + notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !16 unreachable, !dbg !16 __barray_mask_return.exit244: ; preds = %__barray_mask_borrow.exit242 @@ -241,7 +241,7 @@ __barray_mask_return.exit244: ; preds = %__barray_mask_borro br i1 %.not269, label %__barray_mask_borrow.exit246, label %panic.i245, !dbg !18 panic.i245: ; preds = %__barray_mask_return.exit244 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !18 + notail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !18 unreachable, !dbg !18 __barray_mask_borrow.exit246: ; preds = %__barray_mask_return.exit244 @@ -249,14 +249,14 @@ __barray_mask_borrow.exit246: ; preds = %__barray_mask_retur store i64 %58, ptr %1, align 4, !dbg !18 %59 = getelementptr inbounds nuw i8, ptr %0, i64 24, !dbg !20 %60 = load i64, ptr %59, align 4, !dbg !20 - tail call void @___rxy(i64 %60, double 0x400921FB54442D18, double 0.000000e+00), !dbg !21 + notail call void @___rxy(i64 %60, double 0x400921FB54442D18, double 0.000000e+00), !dbg !21 %61 = load i64, ptr %1, align 4, !dbg !20 %62 = and i64 %61, 8, !dbg !20 %.not270 = icmp eq i64 %62, 0, !dbg !20 br i1 %.not270, label %panic.i247, label %__barray_mask_return.exit248, !dbg !20 panic.i247: ; preds = %__barray_mask_borrow.exit246 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !20 + notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !20 unreachable, !dbg !20 __barray_mask_return.exit248: ; preds = %__barray_mask_borrow.exit246 @@ -269,7 +269,7 @@ __barray_mask_return.exit248: ; preds = %__barray_mask_borro br i1 %.not271, label %__barray_mask_borrow.exit250, label %panic.i249, !dbg !22 panic.i249: ; preds = %__barray_mask_return.exit248 - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !22 + notail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !22 unreachable, !dbg !22 __barray_mask_borrow.exit250: ; preds = %__barray_mask_return.exit248 @@ -277,14 +277,14 @@ __barray_mask_borrow.exit250: ; preds = %__barray_mask_retur store i64 %66, ptr %1, align 4, !dbg !22 %67 = getelementptr inbounds nuw i8, ptr %0, i64 72, !dbg !24 %68 = load i64, ptr %67, align 4, !dbg !24 - tail call void @___rxy(i64 %68, double 0x400921FB54442D18, double 0.000000e+00), !dbg !25 + notail call void @___rxy(i64 %68, double 0x400921FB54442D18, double 0.000000e+00), !dbg !25 %69 = load i64, ptr %1, align 4, !dbg !24 %70 = and i64 %69, 512, !dbg !24 %.not272 = icmp eq i64 %70, 0, !dbg !24 br i1 %.not272, label %panic.i251, label %__barray_mask_return.exit252, !dbg !24 panic.i251: ; preds = %__barray_mask_borrow.exit250 - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !24 + notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !24 unreachable, !dbg !24 __barray_mask_return.exit252: ; preds = %__barray_mask_borrow.exit250 @@ -335,7 +335,7 @@ mask_block_ok.i.i.i: ; preds = %75, %93 br i1 %96, label %93, label %mask_block_err.i.i.i, !dbg !44 mask_block_err.i.i.i: ; preds = %mask_block_ok.i.i.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0"), !dbg !44 + notail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0"), !dbg !44 unreachable, !dbg !44 __barray_check_bounds.exit.i.i: ; preds = %loop_body.i, %__barray_mask_return.exit252 @@ -355,7 +355,7 @@ __barray_check_bounds.exit.i.i: ; preds = %loop_body.i, %__bar br i1 %104, label %panic.i.i.i, label %__barray_check_bounds.exit.i, !dbg !56 panic.i.i.i: ; preds = %__barray_check_bounds.exit.i.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !56 + notail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !56 unreachable, !dbg !56 __barray_check_bounds.exit.i: ; preds = %__barray_check_bounds.exit.i.i @@ -364,15 +364,15 @@ __barray_check_bounds.exit.i: ; preds = %__barray_check_boun store i64 %106, ptr %100, align 4, !dbg !56 %107 = getelementptr inbounds i64, ptr %.fca.0.extract80.i185.i, i64 %98, !dbg !55 %108 = load i64, ptr %107, align 4, !dbg !55 - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %108) - tail call void @___qfree(i64 %108) + %lazy_measure.i = notail call i64 @___lazy_measure(i64 %108) + notail call void @___qfree(i64 %108) %109 = load i64, ptr %74, align 4 %110 = lshr i64 %109, %"163_0.sroa.15.0184.i" %111 = trunc i64 %110 to i1 br i1 %111, label %loop_body.i, label %panic.i.i panic.i.i: ; preds = %__barray_check_bounds.exit.i - tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") + notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable loop_body.i: ; preds = %__barray_check_bounds.exit.i @@ -404,7 +404,7 @@ cond_exit_369: ; preds = %cond_exit_369.threa ret void mask_block_err.i: ; preds = %cond_exit_369.thread.9 - tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") + notail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable __barray_mask_borrow.exit259: ; preds = %"__hugr__.guppylang.std.quantum.measure_array$10.149.exit" @@ -430,7 +430,7 @@ __barray_mask_borrow.exit259.1: ; preds = %cond_exit_369.threa cond_392_case_1.1: ; preds = %__barray_mask_borrow.exit259.1 %.fca.1.extract.1 = extractvalue { i1, i64, i1 } %125, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.1) + notail call void @___dec_future_refcount(i64 %.fca.1.extract.1) %.pre281 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.1 @@ -450,7 +450,7 @@ __barray_mask_borrow.exit259.2: ; preds = %cond_exit_369.threa cond_392_case_1.2: ; preds = %__barray_mask_borrow.exit259.2 %.fca.1.extract.2 = extractvalue { i1, i64, i1 } %130, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.2) + notail call void @___dec_future_refcount(i64 %.fca.1.extract.2) %.pre282 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.2 @@ -470,7 +470,7 @@ __barray_mask_borrow.exit259.3: ; preds = %cond_exit_369.threa cond_392_case_1.3: ; preds = %__barray_mask_borrow.exit259.3 %.fca.1.extract.3 = extractvalue { i1, i64, i1 } %135, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.3) + notail call void @___dec_future_refcount(i64 %.fca.1.extract.3) %.pre283 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.3 @@ -490,7 +490,7 @@ __barray_mask_borrow.exit259.4: ; preds = %cond_exit_369.threa cond_392_case_1.4: ; preds = %__barray_mask_borrow.exit259.4 %.fca.1.extract.4 = extractvalue { i1, i64, i1 } %140, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.4) + notail call void @___dec_future_refcount(i64 %.fca.1.extract.4) %.pre284 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.4 @@ -510,7 +510,7 @@ __barray_mask_borrow.exit259.5: ; preds = %cond_exit_369.threa cond_392_case_1.5: ; preds = %__barray_mask_borrow.exit259.5 %.fca.1.extract.5 = extractvalue { i1, i64, i1 } %145, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.5) + notail call void @___dec_future_refcount(i64 %.fca.1.extract.5) %.pre285 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.5 @@ -530,7 +530,7 @@ __barray_mask_borrow.exit259.6: ; preds = %cond_exit_369.threa cond_392_case_1.6: ; preds = %__barray_mask_borrow.exit259.6 %.fca.1.extract.6 = extractvalue { i1, i64, i1 } %150, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.6) + notail call void @___dec_future_refcount(i64 %.fca.1.extract.6) %.pre286 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.6 @@ -550,7 +550,7 @@ __barray_mask_borrow.exit259.7: ; preds = %cond_exit_369.threa cond_392_case_1.7: ; preds = %__barray_mask_borrow.exit259.7 %.fca.1.extract.7 = extractvalue { i1, i64, i1 } %155, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.7) + notail call void @___dec_future_refcount(i64 %.fca.1.extract.7) %.pre287 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.7 @@ -570,7 +570,7 @@ __barray_mask_borrow.exit259.8: ; preds = %cond_exit_369.threa cond_392_case_1.8: ; preds = %__barray_mask_borrow.exit259.8 %.fca.1.extract.8 = extractvalue { i1, i64, i1 } %160, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.8) + notail call void @___dec_future_refcount(i64 %.fca.1.extract.8) %.pre288 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.8 @@ -590,7 +590,7 @@ __barray_mask_borrow.exit259.9: ; preds = %cond_exit_369.threa cond_392_case_1.9: ; preds = %__barray_mask_borrow.exit259.9 %.fca.1.extract.9 = extractvalue { i1, i64, i1 } %165, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract.9) + notail call void @___dec_future_refcount(i64 %.fca.1.extract.9) %.pre289 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.9 @@ -603,7 +603,7 @@ cond_exit_369.thread.9: ; preds = %cond_392_case_1.9, cond_392_case_1: ; preds = %__barray_mask_borrow.exit259 %.fca.1.extract = extractvalue { i1, i64, i1 } %120, 1 - tail call void @___dec_future_refcount(i64 %.fca.1.extract) + notail call void @___dec_future_refcount(i64 %.fca.1.extract) %.pre = load i64, ptr %74, align 4 br label %cond_exit_369.thread } @@ -630,7 +630,7 @@ declare void @___reset(i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !59 { entry: tail call void @setup(i64 %0), !dbg !63 - tail call void @"__hugr__.__main__.measure_qb_array..main.1"(), !dbg !63 + notail call void @"__hugr__.__main__.measure_qb_array..main.1"(), !dbg !63 %1 = tail call i64 @teardown(), !dbg !63 ret i64 %1, !dbg !63 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-no_results/no_results_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-no_results/no_results_x86_64-windows-msvc index 3272e6249..e6cb14582 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-no_results/no_results_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-no_results/no_results_x86_64-windows-msvc @@ -7,21 +7,21 @@ target triple = "x86_64-windows-msvc" define void @"__hugr__.__main__.no_results..bar.1"() local_unnamed_addr !dbg !4 { alloca_block: - %qalloc.i = tail call i64 @___qalloc(), !dbg !8 + %qalloc.i = notail call i64 @___qalloc(), !dbg !8 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 br i1 %not_max.not.not.i, label %cond_18_case_0.i, label %__hugr__.__tk2_qalloc.14.exit, !dbg !8 cond_18_case_0.i: ; preds = %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 unreachable, !dbg !8 __hugr__.__tk2_qalloc.14.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i), !dbg !8 - tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 - tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 - %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) + notail call void @___reset(i64 %qalloc.i), !dbg !8 + notail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 + notail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 + %lazy_measure = notail call i64 @___lazy_measure(i64 %qalloc.i) + notail call void @___qfree(i64 %qalloc.i) + notail call void @___dec_future_refcount(i64 %lazy_measure) ret void } @@ -45,7 +45,7 @@ declare void @___rz(i64, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !10 { entry: tail call void @setup(i64 %0), !dbg !15 - tail call void @"__hugr__.__main__.no_results..bar.1"(), !dbg !15 + notail call void @"__hugr__.__main__.no_results..bar.1"(), !dbg !15 %1 = tail call i64 @teardown(), !dbg !15 ret i64 %1, !dbg !15 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-postselect_exit/postselect_exit_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-postselect_exit/postselect_exit_x86_64-windows-msvc index 2b142ff01..8c6c88ec9 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-postselect_exit/postselect_exit_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-postselect_exit/postselect_exit_x86_64-windows-msvc @@ -9,33 +9,33 @@ target triple = "x86_64-windows-msvc" define void @"__hugr__.__main__.postselect_exit..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - %qalloc.i = tail call i64 @___qalloc(), !dbg !8 + %qalloc.i = notail call i64 @___qalloc(), !dbg !8 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 br i1 %not_max.not.not.i, label %cond_45_case_0.i, label %__hugr__.__tk2_qalloc.41.exit, !dbg !8 cond_45_case_0.i: ; preds = %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 unreachable, !dbg !8 __hugr__.__tk2_qalloc.41.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i), !dbg !8 - tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 - tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) - tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure) + notail call void @___reset(i64 %qalloc.i), !dbg !8 + notail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 + notail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 + %lazy_measure = notail call i64 @___lazy_measure(i64 %qalloc.i) + notail call void @___qfree(i64 %qalloc.i) + notail call void @___inc_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) + notail call void @___dec_future_refcount(i64 %lazy_measure) br i1 %read_bool, label %0, label %cond_98_case_1 cond_98_case_1: ; preds = %__hugr__.__tk2_qalloc.41.exit %read_bool66 = 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_c.1C9EF4D1.0, i64 11, i1 %read_bool66), !dbg !10 + notail call void @___dec_future_refcount(i64 %lazy_measure) + notail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool66), !dbg !10 ret void 0: ; preds = %__hugr__.__tk2_qalloc.41.exit - tail call void @panic(i32 42, ptr nonnull @s_Postselect.13DF1CD0.0), !dbg !11 + notail call void @panic(i32 42, ptr nonnull @s_Postselect.13DF1CD0.0), !dbg !11 unreachable } @@ -65,7 +65,7 @@ declare void @___rz(i64, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !12 { entry: tail call void @setup(i64 %0), !dbg !17 - tail call void @"__hugr__.__main__.postselect_exit..main.1"(), !dbg !17 + notail call void @"__hugr__.__main__.postselect_exit..main.1"(), !dbg !17 %1 = tail call i64 @teardown(), !dbg !17 ret i64 %1, !dbg !17 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-postselect_panic/postselect_panic_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-postselect_panic/postselect_panic_x86_64-windows-msvc index 4012ba1cc..3d6dfaf95 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-postselect_panic/postselect_panic_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-postselect_panic/postselect_panic_x86_64-windows-msvc @@ -9,33 +9,33 @@ target triple = "x86_64-windows-msvc" define void @"__hugr__.__main__.postselect_panic..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - %qalloc.i = tail call i64 @___qalloc(), !dbg !8 + %qalloc.i = notail call i64 @___qalloc(), !dbg !8 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 br i1 %not_max.not.not.i, label %cond_43_case_0.i, label %__hugr__.__tk2_qalloc.39.exit, !dbg !8 cond_43_case_0.i: ; preds = %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 unreachable, !dbg !8 __hugr__.__tk2_qalloc.39.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i), !dbg !8 - tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 - tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) - tail call void @___qfree(i64 %qalloc.i) - tail call void @___inc_future_refcount(i64 %lazy_measure) + notail call void @___reset(i64 %qalloc.i), !dbg !8 + notail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 + notail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 + %lazy_measure = notail call i64 @___lazy_measure(i64 %qalloc.i) + notail call void @___qfree(i64 %qalloc.i) + notail call void @___inc_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) + notail call void @___dec_future_refcount(i64 %lazy_measure) br i1 %read_bool, label %0, label %cond_96_case_1 cond_96_case_1: ; preds = %__hugr__.__tk2_qalloc.39.exit %read_bool65 = 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_c.1C9EF4D1.0, i64 11, i1 %read_bool65), !dbg !10 + notail call void @___dec_future_refcount(i64 %lazy_measure) + notail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool65), !dbg !10 ret void 0: ; preds = %__hugr__.__tk2_qalloc.39.exit - tail call void @panic(i32 1001, ptr nonnull @s_Postselect.13DF1CD0.0), !dbg !11 + notail call void @panic(i32 1001, ptr nonnull @s_Postselect.13DF1CD0.0), !dbg !11 unreachable } @@ -65,7 +65,7 @@ declare void @___rz(i64, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !12 { entry: tail call void @setup(i64 %0), !dbg !17 - tail call void @"__hugr__.__main__.postselect_panic..main.1"(), !dbg !17 + notail call void @"__hugr__.__main__.postselect_panic..main.1"(), !dbg !17 %1 = tail call i64 @teardown(), !dbg !17 ret i64 %1, !dbg !17 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-print_current_shot/print_current_shot_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-print_current_shot/print_current_shot_x86_64-windows-msvc index 324ca126f..697995e11 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-print_current_shot/print_current_shot_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-print_current_shot/print_current_shot_x86_64-windows-msvc @@ -7,8 +7,8 @@ target triple = "x86_64-windows-msvc" define void @"__hugr__.__main__.print_current_shot..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - %shot = tail call i64 @get_current_shot(), !dbg !8 - tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot), !dbg !9 + %shot = notail call i64 @get_current_shot(), !dbg !8 + notail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot), !dbg !9 ret void } @@ -19,8 +19,8 @@ declare void @print_int(ptr, i64, i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !10 { entry: tail call void @setup(i64 %0), !dbg !15 - %shot.i = tail call i64 @get_current_shot(), !dbg !16 - tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot.i), !dbg !18 + %shot.i = notail call i64 @get_current_shot(), !dbg !16 + notail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot.i), !dbg !18 %1 = tail call i64 @teardown(), !dbg !15 ret i64 %1, !dbg !15 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-rng/rng_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-rng/rng_x86_64-windows-msvc index c0a74200b..393c41144 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-rng/rng_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-rng/rng_x86_64-windows-msvc @@ -13,27 +13,27 @@ target triple = "x86_64-windows-msvc" define void @"__hugr__.__main__.rng..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - tail call void @random_seed(i64 42), !dbg !8 - %rint = tail call i32 @random_int(), !dbg !17 - %rint14 = tail call i32 @random_int(), !dbg !18 - %rfloat = tail call double @random_float(), !dbg !19 - %rintb = tail call i32 @random_rng(i32 100), !dbg !20 + notail call void @random_seed(i64 42), !dbg !8 + %rint = notail call i32 @random_int(), !dbg !17 + %rint14 = notail call i32 @random_int(), !dbg !18 + %rfloat = notail call double @random_float(), !dbg !19 + %rintb = notail call i32 @random_rng(i32 100), !dbg !20 %0 = sext i32 %rintb to i64, !dbg !20 %1 = sext i32 %rint14 to i64, !dbg !18 %2 = sext i32 %rint to i64, !dbg !17 - tail call void @print_int(ptr nonnull @res_rint.B928E41E.0, i64 13, i64 %2), !dbg !21 - tail call void @print_int(ptr nonnull @res_rint1.0884EC03.0, i64 14, i64 %1), !dbg !22 - tail call void @print_float(ptr nonnull @res_rfloat.F0E4DD2C.0, i64 17, double %rfloat), !dbg !23 - tail call void @print_int(ptr nonnull @res_rint_bnd.CB1E6B0D.0, i64 17, i64 %0), !dbg !24 - tail call void @random_seed(i64 84), !dbg !25 - %rint47 = tail call i32 @random_int(), !dbg !27 - %rfloat49 = tail call double @random_float(), !dbg !28 - %rintb52 = tail call i32 @random_rng(i32 200), !dbg !29 + notail call void @print_int(ptr nonnull @res_rint.B928E41E.0, i64 13, i64 %2), !dbg !21 + notail call void @print_int(ptr nonnull @res_rint1.0884EC03.0, i64 14, i64 %1), !dbg !22 + notail call void @print_float(ptr nonnull @res_rfloat.F0E4DD2C.0, i64 17, double %rfloat), !dbg !23 + notail call void @print_int(ptr nonnull @res_rint_bnd.CB1E6B0D.0, i64 17, i64 %0), !dbg !24 + notail call void @random_seed(i64 84), !dbg !25 + %rint47 = notail call i32 @random_int(), !dbg !27 + %rfloat49 = notail call double @random_float(), !dbg !28 + %rintb52 = notail call i32 @random_rng(i32 200), !dbg !29 %3 = sext i32 %rintb52 to i64, !dbg !29 %4 = sext i32 %rint47 to i64, !dbg !27 - tail call void @print_int(ptr nonnull @res_rint2.F0335598.0, i64 14, i64 %4), !dbg !30 - tail call void @print_float(ptr nonnull @res_rfloat2.4DAB941F.0, i64 18, double %rfloat49), !dbg !31 - tail call void @print_int(ptr nonnull @res_rint_bnd2.169DE399.0, i64 18, i64 %3), !dbg !32 + notail call void @print_int(ptr nonnull @res_rint2.F0335598.0, i64 14, i64 %4), !dbg !30 + notail call void @print_float(ptr nonnull @res_rfloat2.4DAB941F.0, i64 18, double %rfloat49), !dbg !31 + notail call void @print_int(ptr nonnull @res_rint_bnd2.169DE399.0, i64 18, i64 %3), !dbg !32 ret void } @@ -52,7 +52,7 @@ declare void @random_seed(i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !33 { entry: tail call void @setup(i64 %0), !dbg !37 - tail call void @"__hugr__.__main__.rng..main.1"(), !dbg !37 + notail call void @"__hugr__.__main__.rng..main.1"(), !dbg !37 %1 = tail call i64 @teardown(), !dbg !37 ret i64 %1, !dbg !37 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-rus/rus_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-rus/rus_x86_64-windows-msvc index 40deb85c3..ef37409a2 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-rus/rus_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-rus/rus_x86_64-windows-msvc @@ -8,88 +8,88 @@ target triple = "x86_64-windows-msvc" define void @"__hugr__.__main__.rus..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - %qalloc.i = tail call i64 @___qalloc(), !dbg !8 + %qalloc.i = notail call i64 @___qalloc(), !dbg !8 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 br i1 %not_max.not.not.i, label %cond_87_case_0.i, label %__hugr__.__tk2_qalloc.83.exit, !dbg !8 cond_87_case_0.i: ; preds = %alloca_block - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 unreachable, !dbg !8 __hugr__.__tk2_qalloc.83.exit: ; preds = %alloca_block - tail call void @___reset(i64 %qalloc.i), !dbg !8 - %qalloc.i132.i = tail call i64 @___qalloc(), !dbg !9 + notail call void @___reset(i64 %qalloc.i), !dbg !8 + %qalloc.i132.i = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i133.i = icmp eq i64 %qalloc.i132.i, -1, !dbg !9 br i1 %not_max.not.not.i133.i, label %cond_101_case_0.i.i, label %__hugr__.__tk2_qalloc.97.exit.i, !dbg !9 cond_101_case_0.i.i: ; preds = %cond_242_case_1.backedge.i, %__hugr__.__tk2_qalloc.83.exit - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 unreachable, !dbg !9 __hugr__.__tk2_qalloc.97.exit.i: ; preds = %__hugr__.__tk2_qalloc.83.exit, %cond_242_case_1.backedge.i %qalloc.i134.i = phi i64 [ %qalloc.i.i, %cond_242_case_1.backedge.i ], [ %qalloc.i132.i, %__hugr__.__tk2_qalloc.83.exit ] - tail call void @___reset(i64 %qalloc.i134.i), !dbg !9 - %qalloc.i128.i = tail call i64 @___qalloc(), !dbg !15 + notail call void @___reset(i64 %qalloc.i134.i), !dbg !9 + %qalloc.i128.i = notail call i64 @___qalloc(), !dbg !15 %not_max.not.not.i129.i = icmp eq i64 %qalloc.i128.i, -1, !dbg !15 br i1 %not_max.not.not.i129.i, label %cond_115_case_0.i.i, label %__hugr__.__tk2_qalloc.111.exit.i, !dbg !15 cond_115_case_0.i.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i - tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !15 + notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !15 unreachable, !dbg !15 __hugr__.__tk2_qalloc.111.exit.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i - tail call void @___reset(i64 %qalloc.i128.i), !dbg !15 - tail call void @___rxy(i64 %qalloc.i128.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !16 - tail call void @___rz(i64 %qalloc.i128.i, double 0x400921FB54442D18), !dbg !16 - tail call void @___rxy(i64 %qalloc.i134.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !17 - tail call void @___rz(i64 %qalloc.i134.i, double 0x400921FB54442D18), !dbg !17 - tail call void @___rz(i64 %qalloc.i134.i, double 0xBFE921FB54442D18), !dbg !18 - tail call void @___rxy(i64 %qalloc.i134.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18), !dbg !19 - tail call void @___rzz(i64 %qalloc.i128.i, i64 %qalloc.i134.i, double 0x3FF921FB54442D18), !dbg !19 - tail call void @___rz(i64 %qalloc.i128.i, double 0xBFF921FB54442D18), !dbg !19 - tail call void @___rxy(i64 %qalloc.i134.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18), !dbg !19 - tail call void @___rz(i64 %qalloc.i134.i, double 0xBFF921FB54442D18), !dbg !19 - tail call void @___rz(i64 %qalloc.i134.i, double 0x3FE921FB54442D18), !dbg !20 - %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i134.i) - tail call void @___qfree(i64 %qalloc.i134.i) + notail call void @___reset(i64 %qalloc.i128.i), !dbg !15 + notail call void @___rxy(i64 %qalloc.i128.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !16 + notail call void @___rz(i64 %qalloc.i128.i, double 0x400921FB54442D18), !dbg !16 + notail call void @___rxy(i64 %qalloc.i134.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !17 + notail call void @___rz(i64 %qalloc.i134.i, double 0x400921FB54442D18), !dbg !17 + notail call void @___rz(i64 %qalloc.i134.i, double 0xBFE921FB54442D18), !dbg !18 + notail call void @___rxy(i64 %qalloc.i134.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18), !dbg !19 + notail call void @___rzz(i64 %qalloc.i128.i, i64 %qalloc.i134.i, double 0x3FF921FB54442D18), !dbg !19 + notail call void @___rz(i64 %qalloc.i128.i, double 0xBFF921FB54442D18), !dbg !19 + notail call void @___rxy(i64 %qalloc.i134.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18), !dbg !19 + notail call void @___rz(i64 %qalloc.i134.i, double 0xBFF921FB54442D18), !dbg !19 + notail call void @___rz(i64 %qalloc.i134.i, double 0x3FE921FB54442D18), !dbg !20 + %lazy_measure.i = notail call i64 @___lazy_measure(i64 %qalloc.i134.i) + notail call void @___qfree(i64 %qalloc.i134.i) %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) - tail call void @___dec_future_refcount(i64 %lazy_measure.i) + notail call void @___dec_future_refcount(i64 %lazy_measure.i) br i1 %read_bool.i, label %cond_256_case_1.i, label %0 0: ; preds = %__hugr__.__tk2_qalloc.111.exit.i - tail call void @___qfree(i64 %qalloc.i128.i), !dbg !21 + notail call void @___qfree(i64 %qalloc.i128.i), !dbg !21 br label %cond_242_case_1.backedge.i cond_242_case_1.backedge.i: ; preds = %1, %0 - %qalloc.i.i = tail call i64 @___qalloc(), !dbg !9 + %qalloc.i.i = notail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1, !dbg !9 br i1 %not_max.not.not.i.i, label %cond_101_case_0.i.i, label %__hugr__.__tk2_qalloc.97.exit.i, !dbg !9 cond_256_case_1.i: ; preds = %__hugr__.__tk2_qalloc.111.exit.i - tail call void @___rz(i64 %qalloc.i, double 0x3FE921FB54442D18), !dbg !22 - tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !23 - tail call void @___rxy(i64 %qalloc.i128.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18), !dbg !24 - tail call void @___rzz(i64 %qalloc.i, i64 %qalloc.i128.i, double 0x3FF921FB54442D18), !dbg !24 - tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18), !dbg !24 - tail call void @___rxy(i64 %qalloc.i128.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18), !dbg !24 - tail call void @___rz(i64 %qalloc.i128.i, double 0xBFF921FB54442D18), !dbg !24 - tail call void @___rz(i64 %qalloc.i128.i, double 0x3FE921FB54442D18), !dbg !25 - %lazy_measure67.i = tail call i64 @___lazy_measure(i64 %qalloc.i128.i) - tail call void @___qfree(i64 %qalloc.i128.i) + notail call void @___rz(i64 %qalloc.i, double 0x3FE921FB54442D18), !dbg !22 + notail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !23 + notail call void @___rxy(i64 %qalloc.i128.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18), !dbg !24 + notail call void @___rzz(i64 %qalloc.i, i64 %qalloc.i128.i, double 0x3FF921FB54442D18), !dbg !24 + notail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18), !dbg !24 + notail call void @___rxy(i64 %qalloc.i128.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18), !dbg !24 + notail call void @___rz(i64 %qalloc.i128.i, double 0xBFF921FB54442D18), !dbg !24 + notail call void @___rz(i64 %qalloc.i128.i, double 0x3FE921FB54442D18), !dbg !25 + %lazy_measure67.i = notail call i64 @___lazy_measure(i64 %qalloc.i128.i) + notail call void @___qfree(i64 %qalloc.i128.i) %read_bool80.i = tail call i1 @___read_future_bool(i64 %lazy_measure67.i) - tail call void @___dec_future_refcount(i64 %lazy_measure67.i) + notail call void @___dec_future_refcount(i64 %lazy_measure67.i) br i1 %read_bool80.i, label %"__hugr__.__main__.rus..rus.17.exit", label %1 1: ; preds = %cond_256_case_1.i - tail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00), !dbg !26 + notail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00), !dbg !26 br label %cond_242_case_1.backedge.i "__hugr__.__main__.rus..rus.17.exit": ; preds = %cond_256_case_1.i - %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) - tail call void @___qfree(i64 %qalloc.i) + %lazy_measure = notail call i64 @___lazy_measure(i64 %qalloc.i) + notail 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) - tail call void @print_bool(ptr nonnull @res_result.457DE32D.0, i64 16, i1 %read_bool), !dbg !27 + notail call void @___dec_future_refcount(i64 %lazy_measure) + notail call void @print_bool(ptr nonnull @res_result.457DE32D.0, i64 16, i1 %read_bool), !dbg !27 ret void } @@ -119,7 +119,7 @@ declare void @___rzz(i64, i64, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !28 { entry: tail call void @setup(i64 %0), !dbg !30 - tail call void @"__hugr__.__main__.rus..main.1"(), !dbg !30 + notail call void @"__hugr__.__main__.rus..main.1"(), !dbg !30 %1 = tail call i64 @teardown(), !dbg !30 ret i64 %1, !dbg !30 } diff --git a/qis-compiler/rust/lib.rs b/qis-compiler/rust/lib.rs index 816a70855..82dd2f7c6 100644 --- a/qis-compiler/rust/lib.rs +++ b/qis-compiler/rust/lib.rs @@ -16,6 +16,7 @@ use inkwell::support::LLVMString; use inkwell::targets::{ CodeModel, InitializationConfig, RelocMode, Target, TargetMachine, TargetTriple, }; +use inkwell::values::LLVMTailCallKind; use itertools::Itertools; use pyo3::prelude::*; use tket::hugr::ops::DataflowParent; @@ -285,7 +286,8 @@ fn wrap_main<'c>( .ok_or_else(|| anyhow!("Entrypoint function '{hugr_entry}' not found in Module"))?; let _ = builder.build_call(setup, &[initial_tc.into()], "")?; - let _ = builder.build_call(hugr_main, &[], "")?; + let main_call = builder.build_call(hugr_main, &[], "")?; + main_call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); let tc = builder .build_call(teardown, &[], "")? .try_as_basic_value() diff --git a/tket-qsystem/src/llvm/debug.rs b/tket-qsystem/src/llvm/debug.rs index 5cd992ba7..63618332f 100644 --- a/tket-qsystem/src/llvm/debug.rs +++ b/tket-qsystem/src/llvm/debug.rs @@ -8,6 +8,7 @@ use hugr::llvm::custom::CodegenExtension; use hugr::llvm::emit::{EmitFuncContext, EmitOpArgs}; use hugr::llvm::inkwell::AddressSpace; use hugr::llvm::inkwell::types::BasicType; +use hugr::llvm::inkwell::values::LLVMTailCallKind; use hugr::ops::ExtensionOp; use hugr::{HugrView, Node}; use tket::extension::debug::{DEBUG_EXTENSION_ID, STATE_RESULT_OP_ID, StateResult}; @@ -96,11 +97,12 @@ impl DebugCodegenExtension { void_t.fn_type(&[ptr_t.into(), i64_t.into(), ptr_t.into()], false), )?; - builder.build_call( + let call = builder.build_call( fn_state_result, &[tag_ptr.into(), tag_len.into(), qubits_ptr.into()], "print_state_result", )?; + call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); args.outputs.finish(builder, [qubits]) } } diff --git a/tket-qsystem/src/llvm/futures.rs b/tket-qsystem/src/llvm/futures.rs index 85cab3bd2..cef73f308 100644 --- a/tket-qsystem/src/llvm/futures.rs +++ b/tket-qsystem/src/llvm/futures.rs @@ -15,7 +15,7 @@ use hugr_llvm::emit::{EmitOpArgs, emit_value}; use inkwell::builder::Builder; use inkwell::context::Context; use inkwell::types::{BasicTypeEnum, IntType}; -use inkwell::values::FunctionValue; +use inkwell::values::{FunctionValue, LLVMTailCallKind}; use tket::hugr::{ self, llvm::{self as hugr_llvm, inkwell}, @@ -126,8 +126,10 @@ impl<'c, H: HugrView> FuturesEmitter<'c, '_, '_, H> { .try_into() .map_err(|_| anyhow!("Dup expects a single input"))?; let func = self.get_func_inc_refcount()?; - self.builder() + let call = self + .builder() .build_call(func, &[arg.into()], "inc_refcount")?; + call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); args.outputs.finish(self.builder(), [arg, arg]) } (FutureOpDef::Free, _) => { @@ -136,8 +138,10 @@ impl<'c, H: HugrView> FuturesEmitter<'c, '_, '_, H> { .try_into() .map_err(|_| anyhow!("Free expects a single input"))?; let func = self.get_func_dec_refcount()?; - self.builder() + let call = self + .builder() .build_call(func, &[arg.into()], "dec_refcount")?; + call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); args.outputs.finish(self.builder(), []) } (FutureOpDef::Read, ty) if *ty == bool_t() => { @@ -153,8 +157,10 @@ impl<'c, H: HugrView> FuturesEmitter<'c, '_, '_, H> { .unwrap_basic() .into_int_value(); let dec_refcount_func = self.get_func_dec_refcount()?; - self.builder() - .build_call(dec_refcount_func, &[arg.into()], "dec_refcount")?; + let call = + self.builder() + .build_call(dec_refcount_func, &[arg.into()], "dec_refcount")?; + call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); let true_val = emit_value(self.0, &Value::true_val())?; let false_val = emit_value(self.0, &Value::false_val())?; let result = self @@ -168,11 +174,11 @@ impl<'c, H: HugrView> FuturesEmitter<'c, '_, '_, H> { .try_into() .map_err(|_| anyhow!("Read expects a single input"))?; let read_func = self.get_func_read_uint()?; - let result = self + let call = self .builder() - .build_call(read_func, &[arg.into()], "read_uint")? - .try_as_basic_value() - .unwrap_basic(); + .build_call(read_func, &[arg.into()], "read_uint")?; + call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); + let result = call.try_as_basic_value().unwrap_basic(); let dec_refcount_func = self.get_func_dec_refcount()?; self.builder() .build_call(dec_refcount_func, &[arg.into()], "dec_refcount")?; diff --git a/tket-qsystem/src/llvm/prelude.rs b/tket-qsystem/src/llvm/prelude.rs index 379ecc93c..bc658e68e 100644 --- a/tket-qsystem/src/llvm/prelude.rs +++ b/tket-qsystem/src/llvm/prelude.rs @@ -11,7 +11,7 @@ use inkwell::AddressSpace; use inkwell::attributes::{Attribute, AttributeLoc}; use inkwell::module::Linkage; use inkwell::types::{BasicType, IntType}; -use inkwell::values::{BasicValue, BasicValueEnum, FunctionValue, StructValue}; +use inkwell::values::{BasicValue, BasicValueEnum, FunctionValue, LLVMTailCallKind, StructValue}; use tket::hugr::{HugrView, Node}; #[derive(Clone)] @@ -49,8 +49,10 @@ impl PreludeCodegen for QISPreludeCodegen { let msg = ctx.builder().build_extract_value(err, 1, "")?; let panic = Self::get_panic(ctx)?; - ctx.builder() + let call = ctx + .builder() .build_call(panic, &[return_code.into(), msg.into()], "")?; + call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); Ok(()) } @@ -67,8 +69,10 @@ impl PreludeCodegen for QISPreludeCodegen { // https://github.com/quantinuum-dev/eldarion/issues/287 let msg = ctx.builder().build_extract_value(err, 1, "")?; let panic = Self::get_panic(ctx)?; - ctx.builder() + let call = ctx + .builder() .build_call(panic, &[return_code.into(), msg.into()], "")?; + call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); Ok(()) } diff --git a/tket-qsystem/src/llvm/qsystem.rs b/tket-qsystem/src/llvm/qsystem.rs index 90a40df52..8809c2225 100644 --- a/tket-qsystem/src/llvm/qsystem.rs +++ b/tket-qsystem/src/llvm/qsystem.rs @@ -12,7 +12,7 @@ use hugr::llvm::custom::CodegenExtension; use hugr::llvm::emit::func::{EmitFuncContext, build_option}; use hugr::llvm::emit::{EmitOpArgs, emit_value}; use inkwell::types::BasicType; -use inkwell::values::{BasicValueEnum, FunctionValue, IntValue}; +use inkwell::values::{BasicValueEnum, FunctionValue, IntValue, LLVMTailCallKind}; use tket::hugr::llvm::CodegenExtsBuilder; use tket::hugr::ops::ExtensionOp; use tket::hugr::ops::constant::Value; @@ -138,9 +138,10 @@ impl QSystemCodegenExtension { .collect_vec(); let outputs = output_indices.iter().map(|&i| args.inputs[i]).collect_vec(); let func = self.runtime_func(context, runtime_func)?; - context + let call = context .builder() .build_call(func, &inputs, runtime_func.name())?; + call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); args.outputs.finish(context.builder(), outputs) } @@ -174,32 +175,32 @@ impl QSystemCodegenExtension { .inputs .try_into() .map_err(|_| anyhow!("Measure expects one input"))?; - let result_i1 = builder - .build_call( - self.runtime_func(context, RuntimeFunction::Measure)?, - &[qb.into()], - "measure_i1", - )? - .try_as_basic_value() - .unwrap_basic() - .into_int_value(); + let call = builder.build_call( + self.runtime_func(context, RuntimeFunction::Measure)?, + &[qb.into()], + "measure_i1", + )?; + call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); + let result_i1 = call.try_as_basic_value().unwrap_basic().into_int_value(); let result = builder.build_select(result_i1, true_val, false_val, "measure")?; if op == QSystemOp::Measure { // normal measure may put the qubit in invalid state, so assume // deallocation, don't return it - builder.build_call( + let call = builder.build_call( self.runtime_func(context, RuntimeFunction::QFree)?, &[qb.into()], "qfree", )?; + call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); args.outputs.finish(builder, [result]) } else { // MeasureReset will reset the qubit after measurement so safe to return - builder.build_call( + let call = builder.build_call( self.runtime_func(context, RuntimeFunction::Reset)?, &[qb.into()], "reset", )?; + call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); args.outputs.finish(builder, [qb, result]) } } @@ -210,19 +211,19 @@ impl QSystemCodegenExtension { .inputs .try_into() .map_err(|_| anyhow!("LazyMeasure expects one input"))?; - let result = builder - .build_call( - self.runtime_func(context, RuntimeFunction::LazyMeasure)?, - &[qb.into()], - "lazy_measure", - )? - .try_as_basic_value() - .unwrap_basic(); - builder.build_call( + let meas_call = builder.build_call( + self.runtime_func(context, RuntimeFunction::LazyMeasure)?, + &[qb.into()], + "lazy_measure", + )?; + meas_call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); + let result = meas_call.try_as_basic_value().unwrap_basic(); + let free_call = builder.build_call( self.runtime_func(context, RuntimeFunction::QFree)?, &[qb.into()], "qfree", )?; + free_call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); args.outputs.finish(builder, [result]) } // Measure qubit in Z basis or detect leakage, not forcing to a boolean @@ -232,19 +233,19 @@ impl QSystemCodegenExtension { .inputs .try_into() .map_err(|_| anyhow!("LazyMeasureLeaked expects one input"))?; - let result = builder - .build_call( - self.runtime_func(context, RuntimeFunction::LazyMeasureLeaked)?, - &[qb.into()], - "lazy_measure_leaked", - )? - .try_as_basic_value() - .unwrap_basic(); - builder.build_call( + let meas_call = builder.build_call( + self.runtime_func(context, RuntimeFunction::LazyMeasureLeaked)?, + &[qb.into()], + "lazy_measure_leaked", + )?; + meas_call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); + let result = meas_call.try_as_basic_value().unwrap_basic(); + let free_call = builder.build_call( self.runtime_func(context, RuntimeFunction::QFree)?, &[qb.into()], "qfree", )?; + free_call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); args.outputs.finish(builder, [result]) } QSystemOp::LazyMeasureReset => { @@ -253,19 +254,19 @@ impl QSystemCodegenExtension { .inputs .try_into() .map_err(|_| anyhow!("LazyMeasureReset expects one input"))?; - let result = builder - .build_call( - self.runtime_func(context, RuntimeFunction::LazyMeasure)?, - &[qb.into()], - "lazy_measure", - )? - .try_as_basic_value() - .unwrap_basic(); - builder.build_call( + let meas_call = builder.build_call( + self.runtime_func(context, RuntimeFunction::LazyMeasure)?, + &[qb.into()], + "lazy_measure", + )?; + meas_call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); + let result = meas_call.try_as_basic_value().unwrap_basic(); + let rst_call = builder.build_call( self.runtime_func(context, RuntimeFunction::Reset)?, &[qb.into()], "reset", )?; + rst_call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); args.outputs.finish(builder, [qb, result]) } // Reset a qubit @@ -275,15 +276,13 @@ impl QSystemCodegenExtension { .inputs .try_into() .map_err(|_| anyhow!("QAlloc expects no inputs"))?; - let qb = context - .builder() - .build_call( - self.runtime_func(context, RuntimeFunction::QAlloc)?, - &[], - "qalloc", - )? - .try_as_basic_value() - .unwrap_basic(); + let call = context.builder().build_call( + self.runtime_func(context, RuntimeFunction::QAlloc)?, + &[], + "qalloc", + )?; + call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); + let qb = call.try_as_basic_value().unwrap_basic(); let max_qb = self .0 @@ -324,11 +323,12 @@ impl QSystemCodegenExtension { let reset_bb = context.build_positioned_new_block("reset_bb", Some(id_bb), |context, bb| { - context.builder().build_call( + let call = context.builder().build_call( self.runtime_func(context, RuntimeFunction::Reset)?, &[qb.into()], "reset", )?; + call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); context.builder().build_unconditional_branch(id_bb)?; anyhow::Ok(bb) })?; diff --git a/tket-qsystem/src/llvm/random.rs b/tket-qsystem/src/llvm/random.rs index 10d976337..046dab07b 100644 --- a/tket-qsystem/src/llvm/random.rs +++ b/tket-qsystem/src/llvm/random.rs @@ -10,7 +10,7 @@ use hugr::llvm::emit::func::EmitFuncContext; use inkwell::builder::Builder; use inkwell::context::Context; use inkwell::types::{BasicTypeEnum, FloatType, IntType}; -use inkwell::values::{BasicValueEnum, FunctionValue}; +use inkwell::values::{BasicValueEnum, FunctionValue, LLVMTailCallKind}; use tket::hugr::ops::ExtensionOp; use tket::hugr::{HugrView, Node}; @@ -79,15 +79,13 @@ impl<'c, H: HugrView> RandomEmitter<'c, '_, '_, H> { input_indices: &[usize], ) -> Result<()> { let inputs: Vec<_> = input_indices.iter().map(|&i| args.inputs[i]).collect(); - let result = self - .builder() - .build_call( - func?, - &inputs.iter().map(|&v| v.into()).collect::>(), - name, - )? - .try_as_basic_value() - .unwrap_basic(); + let call = self.builder().build_call( + func?, + &inputs.iter().map(|&v| v.into()).collect::>(), + name, + )?; + call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); + let result = call.try_as_basic_value().unwrap_basic(); args.outputs .finish(self.builder(), [result, self.rng_context()]) } @@ -125,8 +123,10 @@ impl<'c, H: HugrView> RandomEmitter<'c, '_, '_, H> { .inputs .try_into() .map_err(|_| anyhow!("RandomAdvance expects a context and delta argument"))?; - self.builder() + let call = self + .builder() .build_call(fn_random_advance, &[delta.into()], "radv")?; + call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); args.outputs.finish(self.builder(), [ctx]) } RandomOp::NewRNGContext => { @@ -140,8 +140,10 @@ impl<'c, H: HugrView> RandomEmitter<'c, '_, '_, H> { .inputs .try_into() .map_err(|_| anyhow!("NewRNGContext expects a seed argument"))?; - self.builder() + let call = self + .builder() .build_call(fn_random_seed, &[seed.into()], "rseed")?; + call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); args.outputs.finish( self.builder(), [self.bool_type().const_int(1, false).into()], diff --git a/tket-qsystem/src/llvm/result.rs b/tket-qsystem/src/llvm/result.rs index 7727ad746..1d2d84918 100644 --- a/tket-qsystem/src/llvm/result.rs +++ b/tket-qsystem/src/llvm/result.rs @@ -13,7 +13,7 @@ use inkwell::AddressSpace; use inkwell::builder::Builder; use inkwell::context::Context; use inkwell::types::{BasicMetadataTypeEnum, FloatType, IntType, PointerType, VoidType}; -use inkwell::values::{BasicValueEnum, FunctionValue, IntValue}; +use inkwell::values::{BasicValueEnum, FunctionValue, IntValue, LLVMTailCallKind}; use tket::hugr::extension::simple_op::MakeExtensionOp; use tket::hugr::ops::ExtensionOp; use tket::hugr::{HugrView, Node}; @@ -179,12 +179,14 @@ impl<'c, H: HugrView, AL: ArrayLowering + Clone> ResultEmitter<'c, )?; let (array_ptr, _) = struct_1d_arr_alloc(self.iw_context(), self.builder(), length.try_into()?, array)?; - self.builder().build_call( - print_fn, - &[tag_ptr.into(), tag_len.into(), array_ptr.into()], - "", - )?; - Result::Ok(()) + self.builder() + .build_call( + print_fn, + &[tag_ptr.into(), tag_len.into(), array_ptr.into()], + "", + )? + .set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); + Ok(()) } /// Function to help lower the tket result extension. @@ -203,11 +205,13 @@ impl<'c, H: HugrView, AL: ArrayLowering + Clone> ResultEmitter<'c, .build_get_tag(self.builder())?; let b_type = self.bool_t(); let trunc_val = self.builder().build_int_truncate(val, b_type, "")?; - self.builder().build_call( - print_fn, - &[tag_ptr.into(), tag_len.into(), trunc_val.into()], - "print_bool", - )?; + self.builder() + .build_call( + print_fn, + &[tag_ptr.into(), tag_len.into(), trunc_val.into()], + "print_bool", + )? + .set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); } ResultOpDef::Int => { let (tag_ptr, tag_len) = self.generate_global_tag(&args, "INT:").unwrap(); @@ -215,11 +219,13 @@ impl<'c, H: HugrView, AL: ArrayLowering + Clone> ResultEmitter<'c, .inputs .try_into() .map_err(|_| anyhow!("result_int expects one input"))?; - self.builder().build_call( - print_fn, - &[tag_ptr.into(), tag_len.into(), val.into()], - "print_int", - )?; + self.builder() + .build_call( + print_fn, + &[tag_ptr.into(), tag_len.into(), val.into()], + "print_int", + )? + .set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); } ResultOpDef::UInt => { let (tag_ptr, tag_len) = self.generate_global_tag(&args, "INT:").unwrap(); @@ -227,11 +233,13 @@ impl<'c, H: HugrView, AL: ArrayLowering + Clone> ResultEmitter<'c, .inputs .try_into() .map_err(|_| anyhow!("result_uint expects one input"))?; - self.builder().build_call( - print_fn, - &[tag_ptr.into(), tag_len.into(), val.into()], - "print_uint", - )?; + self.builder() + .build_call( + print_fn, + &[tag_ptr.into(), tag_len.into(), val.into()], + "print_uint", + )? + .set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); } ResultOpDef::F64 => { let (tag_ptr, tag_len) = self.generate_global_tag(&args, "FLOAT:").unwrap(); @@ -239,11 +247,13 @@ impl<'c, H: HugrView, AL: ArrayLowering + Clone> ResultEmitter<'c, .inputs .try_into() .map_err(|_| anyhow!("result_float expects one input"))?; - self.builder().build_call( - print_fn, - &[tag_ptr.into(), tag_len.into(), val.into()], - "print_int", - )?; + self.builder() + .build_call( + print_fn, + &[tag_ptr.into(), tag_len.into(), val.into()], + "print_int", + )? + .set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); } ResultOpDef::ArrBool => { let (tag_ptr, tag_len) = self.generate_global_tag(&args, "BOOLARR:").unwrap(); @@ -277,7 +287,7 @@ impl<'c, H: HugrView, AL: ArrayLowering + Clone> ResultEmitter<'c, .map_err(|_| anyhow!("result_arr_float expects one input"))?; self.build_print_array_call(val, op, &ElemType::Float, tag_ptr, tag_len)?; } - } + }; args.outputs.finish(self.builder(), []) } } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@llvm21_2.snap index 7346e4787..2c3116eaf 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@llvm21_2.snap @@ -29,7 +29,7 @@ entry_block: ; preds = %alloca_block store ptr %1, ptr %arr_ptr, align 8, !dbg !11 store ptr %2, ptr %mask_ptr, align 8, !dbg !11 %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1, !dbg !11 - call void @print_state_result(ptr @res_test_state.900F7606.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 + notail call void @print_state_result(ptr @res_test_state.900F7606.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 ret { ptr, i64 } %0 } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@pre-mem2reg@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@pre-mem2reg@llvm21_2.snap index b05493169..f7cef3e33 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@pre-mem2reg@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@pre-mem2reg@llvm21_2.snap @@ -34,7 +34,7 @@ entry_block: ; preds = %alloca_block store ptr %1, ptr %arr_ptr, align 8, !dbg !11 store ptr %2, ptr %mask_ptr, align 8, !dbg !11 %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1, !dbg !11 - call void @print_state_result(ptr @res_test_state.900F7606.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 + notail call void @print_state_result(ptr @res_test_state.900F7606.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 store { ptr, i64 } %"2_01", ptr %"4_0", align 8, !dbg !11 %"4_03" = load { ptr, i64 }, ptr %"4_0", align 8 store { ptr, i64 } %"4_03", ptr %"0", align 8 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_1.snap index 7b458aa5f..12039bb53 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_1.snap @@ -11,7 +11,7 @@ alloca_block: entry_block: ; preds = %alloca_block %read_bool = call i1 @___read_future_bool(i64 %0), !dbg !9 - call void @___dec_future_refcount(i64 %0), !dbg !9 + notail call void @___dec_future_refcount(i64 %0), !dbg !9 %measure = select i1 %read_bool, i1 true, i1 false, !dbg !9 ret i1 %measure } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_2.snap index 18a720983..ee4084f79 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_2.snap @@ -10,7 +10,7 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - call void @___inc_future_refcount(i64 %0), !dbg !10 + notail call void @___inc_future_refcount(i64 %0), !dbg !10 %mrv = insertvalue { i64, i64 } poison, i64 %0, 0 %mrv6 = insertvalue { i64, i64 } %mrv, i64 %0, 1 ret { i64, i64 } %mrv6 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_3.snap index 6ab3a80cd..7a2857a72 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_3.snap @@ -10,7 +10,7 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - call void @___dec_future_refcount(i64 %0), !dbg !8 + notail call void @___dec_future_refcount(i64 %0), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_4.snap index fc6e4ec7a..6a38a44df 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_4.snap @@ -10,7 +10,7 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %read_uint = call i64 @___read_future_uint(i64 %0), !dbg !8 + %read_uint = notail call i64 @___read_future_uint(i64 %0), !dbg !8 call void @___dec_future_refcount(i64 %0), !dbg !8 ret i64 %read_uint } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_5.snap index 18a720983..ee4084f79 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_5.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_5.snap @@ -10,7 +10,7 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - call void @___inc_future_refcount(i64 %0), !dbg !10 + notail call void @___inc_future_refcount(i64 %0), !dbg !10 %mrv = insertvalue { i64, i64 } poison, i64 %0, 0 %mrv6 = insertvalue { i64, i64 } %mrv, i64 %0, 1 ret { i64, i64 } %mrv6 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_6.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_6.snap index 6ab3a80cd..7a2857a72 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_6.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_6.snap @@ -10,7 +10,7 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - call void @___dec_future_refcount(i64 %0), !dbg !8 + notail call void @___dec_future_refcount(i64 %0), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_1.snap index 4e60fbccf..1fe561752 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_1.snap @@ -16,7 +16,7 @@ entry_block: ; preds = %alloca_block store i64 %0, ptr %"2_0", align 4 %"2_01" = load i64, ptr %"2_0", align 4 %read_bool = call i1 @___read_future_bool(i64 %"2_01"), !dbg !9 - call void @___dec_future_refcount(i64 %"2_01"), !dbg !9 + notail call void @___dec_future_refcount(i64 %"2_01"), !dbg !9 %measure = select i1 %read_bool, i1 true, i1 false, !dbg !9 store i1 %measure, ptr %"4_0", align 1, !dbg !9 %"4_02" = load i1, ptr %"4_0", align 1 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_2.snap index 26fb8d770..bf5df59f5 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_2.snap @@ -17,7 +17,7 @@ alloca_block: entry_block: ; preds = %alloca_block store i64 %0, ptr %"2_0", align 4 %"2_01" = load i64, ptr %"2_0", align 4 - call void @___inc_future_refcount(i64 %"2_01"), !dbg !10 + notail call void @___inc_future_refcount(i64 %"2_01"), !dbg !10 store i64 %"2_01", ptr %"4_0", align 4, !dbg !10 store i64 %"2_01", ptr %"4_1", align 4, !dbg !10 %"4_02" = load i64, ptr %"4_0", align 4 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_3.snap index 7b0d3fa7e..167e07e49 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_3.snap @@ -13,7 +13,7 @@ alloca_block: entry_block: ; preds = %alloca_block store i64 %0, ptr %"2_0", align 4 %"2_01" = load i64, ptr %"2_0", align 4 - call void @___dec_future_refcount(i64 %"2_01"), !dbg !8 + notail call void @___dec_future_refcount(i64 %"2_01"), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_4.snap index c99874439..155c7b0c2 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_4.snap @@ -15,7 +15,7 @@ alloca_block: entry_block: ; preds = %alloca_block store i64 %0, ptr %"2_0", align 4 %"2_01" = load i64, ptr %"2_0", align 4 - %read_uint = call i64 @___read_future_uint(i64 %"2_01"), !dbg !8 + %read_uint = notail call i64 @___read_future_uint(i64 %"2_01"), !dbg !8 call void @___dec_future_refcount(i64 %"2_01"), !dbg !8 store i64 %read_uint, ptr %"4_0", align 4, !dbg !8 %"4_02" = load i64, ptr %"4_0", align 4 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_5.snap index 26fb8d770..bf5df59f5 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_5.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_5.snap @@ -17,7 +17,7 @@ alloca_block: entry_block: ; preds = %alloca_block store i64 %0, ptr %"2_0", align 4 %"2_01" = load i64, ptr %"2_0", align 4 - call void @___inc_future_refcount(i64 %"2_01"), !dbg !10 + notail call void @___inc_future_refcount(i64 %"2_01"), !dbg !10 store i64 %"2_01", ptr %"4_0", align 4, !dbg !10 store i64 %"2_01", ptr %"4_1", align 4, !dbg !10 %"4_02" = load i64, ptr %"4_0", align 4 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_6.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_6.snap index 7b0d3fa7e..167e07e49 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_6.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_6.snap @@ -13,7 +13,7 @@ alloca_block: entry_block: ; preds = %alloca_block store i64 %0, ptr %"2_0", align 4 %"2_01" = load i64, ptr %"2_0", align 4 - call void @___dec_future_refcount(i64 %"2_01"), !dbg !8 + notail call void @___dec_future_refcount(i64 %"2_01"), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@llvm21_0.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@llvm21_0.snap index f3cd4a3be..2c43af726 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@llvm21_0.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@llvm21_0.snap @@ -14,7 +14,7 @@ alloca_block: entry_block: ; preds = %alloca_block %2 = extractvalue { i32, ptr } { i32 42, ptr @e_EXIT.2B78BC40.0 }, 0, !dbg !10 %3 = extractvalue { i32, ptr } { i32 42, ptr @e_EXIT.2B78BC40.0 }, 1, !dbg !10 - call void @panic(i32 %2, ptr %3), !dbg !10 + notail call void @panic(i32 %2, ptr %3), !dbg !10 %mrv = insertvalue { i64, i64 } poison, i64 0, 0 %mrv8 = insertvalue { i64, i64 } %mrv, i64 0, 1 ret { i64, i64 } %mrv8 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@pre-mem2reg@llvm21_0.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@pre-mem2reg@llvm21_0.snap index f8402532e..9673c143a 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@pre-mem2reg@llvm21_0.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@pre-mem2reg@llvm21_0.snap @@ -27,7 +27,7 @@ entry_block: ; preds = %alloca_block %"2_13" = load i64, ptr %"2_1", align 4 %2 = extractvalue { i32, ptr } %"5_01", 0, !dbg !10 %3 = extractvalue { i32, ptr } %"5_01", 1, !dbg !10 - call void @panic(i32 %2, ptr %3), !dbg !10 + notail call void @panic(i32 %2, ptr %3), !dbg !10 store i64 0, ptr %"6_0", align 4, !dbg !10 store i64 0, ptr %"6_1", align 4, !dbg !10 %"6_04" = load i64, ptr %"6_0", align 4 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@llvm21_0.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@llvm21_0.snap index fc0f22bfc..64a69f31f 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@llvm21_0.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@llvm21_0.snap @@ -15,7 +15,7 @@ entry_block: ; preds = %alloca_block %2 = extractvalue { i32, ptr } { i32 42, ptr @e_PANIC.DF25FD88.0 }, 0, !dbg !10 %shift_code = add i32 %2, 1000, !dbg !10 %3 = extractvalue { i32, ptr } { i32 42, ptr @e_PANIC.DF25FD88.0 }, 1, !dbg !10 - call void @panic(i32 %shift_code, ptr %3), !dbg !10 + notail call void @panic(i32 %shift_code, ptr %3), !dbg !10 %mrv = insertvalue { i64, i64 } poison, i64 0, 0 %mrv8 = insertvalue { i64, i64 } %mrv, i64 0, 1 ret { i64, i64 } %mrv8 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@pre-mem2reg@llvm21_0.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@pre-mem2reg@llvm21_0.snap index 56260ebd8..003a3aea0 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@pre-mem2reg@llvm21_0.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@pre-mem2reg@llvm21_0.snap @@ -28,7 +28,7 @@ entry_block: ; preds = %alloca_block %2 = extractvalue { i32, ptr } %"5_01", 0, !dbg !10 %shift_code = add i32 %2, 1000, !dbg !10 %3 = extractvalue { i32, ptr } %"5_01", 1, !dbg !10 - call void @panic(i32 %shift_code, ptr %3), !dbg !10 + notail call void @panic(i32 %shift_code, ptr %3), !dbg !10 store i64 0, ptr %"6_0", align 4, !dbg !10 store i64 0, ptr %"6_1", align 4, !dbg !10 %"6_04" = load i64, ptr %"6_0", align 4 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_1.snap index ee7cf84ea..9e1a29399 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_1.snap @@ -10,7 +10,7 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - call void @___rz(i64 %0, double %1), !dbg !9 + notail call void @___rz(i64 %0, double %1), !dbg !9 ret i64 %0 } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_10.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_10.snap index 9465e5103..328cb9524 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_10.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_10.snap @@ -10,8 +10,8 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %lazy_measure_leaked = call i64 @___lazy_measure_leaked(i64 %0), !dbg !8 - call void @___qfree(i64 %0), !dbg !8 + %lazy_measure_leaked = notail call i64 @___lazy_measure_leaked(i64 %0), !dbg !8 + notail call void @___qfree(i64 %0), !dbg !8 ret i64 %lazy_measure_leaked } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_2.snap index 9dc97dbc1..5385e3051 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_2.snap @@ -10,7 +10,7 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - call void @___rzz(i64 %0, i64 %1, double %2), !dbg !11 + notail call void @___rzz(i64 %0, i64 %1, double %2), !dbg !11 %mrv = insertvalue { i64, i64 } poison, i64 %0, 0 %mrv8 = insertvalue { i64, i64 } %mrv, i64 %1, 1 ret { i64, i64 } %mrv8 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_3.snap index 5acc325f2..a243803f7 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_3.snap @@ -10,7 +10,7 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - call void @___rxy(i64 %0, double %1, double %2), !dbg !9 + notail call void @___rxy(i64 %0, double %1, double %2), !dbg !9 ret i64 %0 } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_4.snap index c983b5d66..7756cf311 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_4.snap @@ -10,8 +10,8 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %lazy_measure = call i64 @___lazy_measure(i64 %0), !dbg !11 - call void @___qfree(i64 %0), !dbg !11 + %lazy_measure = notail call i64 @___lazy_measure(i64 %0), !dbg !11 + notail call void @___qfree(i64 %0), !dbg !11 %1 = insertvalue { i1, i64, i1 } { i1 true, i64 poison, i1 poison }, i64 %lazy_measure, 1 ret { i1, i64, i1 } %1 } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_5.snap index 1050125e5..39147f5f2 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_5.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_5.snap @@ -10,8 +10,8 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %lazy_measure = call i64 @___lazy_measure(i64 %0), !dbg !8 - call void @___qfree(i64 %0), !dbg !8 + %lazy_measure = notail call i64 @___lazy_measure(i64 %0), !dbg !8 + notail call void @___qfree(i64 %0), !dbg !8 ret i64 %lazy_measure } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_6.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_6.snap index 74b7860b9..a50faf7b8 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_6.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_6.snap @@ -10,12 +10,12 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %qalloc = call i64 @___qalloc(), !dbg !11 + %qalloc = notail call i64 @___qalloc(), !dbg !11 %not_max = icmp ne i64 %qalloc, -1, !dbg !11 br i1 %not_max, label %reset_bb, label %id_bb, !dbg !11 reset_bb: ; preds = %entry_block - call void @___reset(i64 %qalloc), !dbg !11 + notail call void @___reset(i64 %qalloc), !dbg !11 br label %id_bb, !dbg !11 id_bb: ; preds = %entry_block, %reset_bb diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_7.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_7.snap index ca56683e1..4aef3ecaf 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_7.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_7.snap @@ -10,7 +10,7 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - call void @___qfree(i64 %0), !dbg !8 + notail call void @___qfree(i64 %0), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_8.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_8.snap index a1f01863d..c55b287de 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_8.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_8.snap @@ -10,7 +10,7 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - call void @___reset(i64 %0), !dbg !8 + notail call void @___reset(i64 %0), !dbg !8 ret i64 %0 } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_9.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_9.snap index 52beaf24e..2938ce2ef 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_9.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_9.snap @@ -10,8 +10,8 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %lazy_measure = call i64 @___lazy_measure(i64 %0), !dbg !13 - call void @___reset(i64 %0), !dbg !13 + %lazy_measure = notail call i64 @___lazy_measure(i64 %0), !dbg !13 + notail call void @___reset(i64 %0), !dbg !13 %1 = insertvalue { i1, i64, i1 } { i1 true, i64 poison, i1 poison }, i64 %lazy_measure, 1 %mrv = insertvalue { i64, { i1, i64, i1 } } poison, i64 %0, 0 %mrv10 = insertvalue { i64, { i1, i64, i1 } } %mrv, { i1, i64, i1 } %1, 1 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_1.snap index 8b518ff49..4d5739733 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_1.snap @@ -18,7 +18,7 @@ entry_block: ; preds = %alloca_block store double %1, ptr %"2_1", align 8 %"2_01" = load i64, ptr %"2_0", align 4 %"2_12" = load double, ptr %"2_1", align 8 - call void @___rz(i64 %"2_01", double %"2_12"), !dbg !9 + notail call void @___rz(i64 %"2_01", double %"2_12"), !dbg !9 store i64 %"2_01", ptr %"4_0", align 4, !dbg !9 %"4_03" = load i64, ptr %"4_0", align 4 store i64 %"4_03", ptr %"0", align 4 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_10.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_10.snap index e1e647188..7763e2ecb 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_10.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_10.snap @@ -15,8 +15,8 @@ alloca_block: entry_block: ; preds = %alloca_block store i64 %0, ptr %"2_0", align 4 %"2_01" = load i64, ptr %"2_0", align 4 - %lazy_measure_leaked = call i64 @___lazy_measure_leaked(i64 %"2_01"), !dbg !8 - call void @___qfree(i64 %"2_01"), !dbg !8 + %lazy_measure_leaked = notail call i64 @___lazy_measure_leaked(i64 %"2_01"), !dbg !8 + notail call void @___qfree(i64 %"2_01"), !dbg !8 store i64 %lazy_measure_leaked, ptr %"4_0", align 4, !dbg !8 %"4_02" = load i64, ptr %"4_0", align 4 store i64 %"4_02", ptr %"0", align 4 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_2.snap index 7930a7849..0dde7f356 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_2.snap @@ -23,7 +23,7 @@ entry_block: ; preds = %alloca_block %"2_01" = load i64, ptr %"2_0", align 4 %"2_12" = load i64, ptr %"2_1", align 4 %"2_23" = load double, ptr %"2_2", align 8 - call void @___rzz(i64 %"2_01", i64 %"2_12", double %"2_23"), !dbg !11 + notail call void @___rzz(i64 %"2_01", i64 %"2_12", double %"2_23"), !dbg !11 store i64 %"2_01", ptr %"4_0", align 4, !dbg !11 store i64 %"2_12", ptr %"4_1", align 4, !dbg !11 %"4_04" = load i64, ptr %"4_0", align 4 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_3.snap index 48bfb5edb..12e664e9e 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_3.snap @@ -21,7 +21,7 @@ entry_block: ; preds = %alloca_block %"2_01" = load i64, ptr %"2_0", align 4 %"2_12" = load double, ptr %"2_1", align 8 %"2_23" = load double, ptr %"2_2", align 8 - call void @___rxy(i64 %"2_01", double %"2_12", double %"2_23"), !dbg !9 + notail call void @___rxy(i64 %"2_01", double %"2_12", double %"2_23"), !dbg !9 store i64 %"2_01", ptr %"4_0", align 4, !dbg !9 %"4_04" = load i64, ptr %"4_0", align 4 store i64 %"4_04", ptr %"0", align 4 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_4.snap index 77e9e41c1..f123501be 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_4.snap @@ -20,8 +20,8 @@ entry_block: ; preds = %alloca_block %"2_01" = load i64, ptr %"2_0", align 4 store i64 %"2_01", ptr %"6_0", align 4 %"6_02" = load i64, ptr %"6_0", align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %"6_02"), !dbg !11 - call void @___qfree(i64 %"6_02"), !dbg !11 + %lazy_measure = notail call i64 @___lazy_measure(i64 %"6_02"), !dbg !11 + notail call void @___qfree(i64 %"6_02"), !dbg !11 store i64 %lazy_measure, ptr %"8_0", align 4, !dbg !11 %"8_03" = load i64, ptr %"8_0", align 4 %1 = insertvalue { i1, i64, i1 } { i1 true, i64 poison, i1 poison }, i64 %"8_03", 1 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_5.snap index 4dcd00614..8c22e828a 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_5.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_5.snap @@ -15,8 +15,8 @@ alloca_block: entry_block: ; preds = %alloca_block store i64 %0, ptr %"2_0", align 4 %"2_01" = load i64, ptr %"2_0", align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %"2_01"), !dbg !8 - call void @___qfree(i64 %"2_01"), !dbg !8 + %lazy_measure = notail call i64 @___lazy_measure(i64 %"2_01"), !dbg !8 + notail call void @___qfree(i64 %"2_01"), !dbg !8 store i64 %lazy_measure, ptr %"4_0", align 4, !dbg !8 %"4_02" = load i64, ptr %"4_0", align 4 store i64 %"4_02", ptr %"0", align 4 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_6.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_6.snap index c5f3d1d06..4f802d8e0 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_6.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_6.snap @@ -12,12 +12,12 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %qalloc = call i64 @___qalloc(), !dbg !11 + %qalloc = notail call i64 @___qalloc(), !dbg !11 %not_max = icmp ne i64 %qalloc, -1, !dbg !11 br i1 %not_max, label %reset_bb, label %id_bb, !dbg !11 reset_bb: ; preds = %entry_block - call void @___reset(i64 %qalloc), !dbg !11 + notail call void @___reset(i64 %qalloc), !dbg !11 br label %id_bb, !dbg !11 id_bb: ; preds = %entry_block, %reset_bb diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_7.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_7.snap index 094c4ec6b..90dfb6101 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_7.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_7.snap @@ -13,7 +13,7 @@ alloca_block: entry_block: ; preds = %alloca_block store i64 %0, ptr %"2_0", align 4 %"2_01" = load i64, ptr %"2_0", align 4 - call void @___qfree(i64 %"2_01"), !dbg !8 + notail call void @___qfree(i64 %"2_01"), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_8.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_8.snap index 73f258bf1..ea9b65dcb 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_8.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_8.snap @@ -15,7 +15,7 @@ alloca_block: entry_block: ; preds = %alloca_block store i64 %0, ptr %"2_0", align 4 %"2_01" = load i64, ptr %"2_0", align 4 - call void @___reset(i64 %"2_01"), !dbg !8 + notail call void @___reset(i64 %"2_01"), !dbg !8 store i64 %"2_01", ptr %"4_0", align 4, !dbg !8 %"4_02" = load i64, ptr %"4_0", align 4 store i64 %"4_02", ptr %"0", align 4 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_9.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_9.snap index 5534c4632..db967776a 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_9.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_9.snap @@ -23,8 +23,8 @@ entry_block: ; preds = %alloca_block %"2_01" = load i64, ptr %"2_0", align 4 store i64 %"2_01", ptr %"6_0", align 4 %"6_02" = load i64, ptr %"6_0", align 4 - %lazy_measure = call i64 @___lazy_measure(i64 %"6_02"), !dbg !13 - call void @___reset(i64 %"6_02"), !dbg !13 + %lazy_measure = notail call i64 @___lazy_measure(i64 %"6_02"), !dbg !13 + notail call void @___reset(i64 %"6_02"), !dbg !13 store i64 %"6_02", ptr %"8_0", align 4, !dbg !13 store i64 %lazy_measure, ptr %"8_1", align 4, !dbg !13 %"8_13" = load i64, ptr %"8_1", align 4 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21.snap index 856728ff4..bbd887f04 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21.snap @@ -10,7 +10,7 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - call void @random_advance(i64 %1), !dbg !10 + notail call void @random_advance(i64 %1), !dbg !10 ret {} %0 } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_1.snap index 0df5c38fc..31808042a 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_1.snap @@ -10,7 +10,7 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %rint = call i32 @random_int(), !dbg !12 + %rint = notail call i32 @random_int(), !dbg !12 %mrv = insertvalue { i32, {} } poison, i32 %rint, 0 %mrv6 = insertvalue { i32, {} } %mrv, {} zeroinitializer, 1 ret { i32, {} } %mrv6 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_2.snap index 2ab14e357..bcf2c9f75 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_2.snap @@ -10,7 +10,7 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %rfloat = call double @random_float(), !dbg !12 + %rfloat = notail call double @random_float(), !dbg !12 %mrv = insertvalue { double, {} } poison, double %rfloat, 0 %mrv6 = insertvalue { double, {} } %mrv, {} zeroinitializer, 1 ret { double, {} } %mrv6 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_3.snap index 9966edf6b..e88e3aa7b 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_3.snap @@ -10,7 +10,7 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %rintb = call i32 @random_rng(i32 %1), !dbg !12 + %rintb = notail call i32 @random_rng(i32 %1), !dbg !12 %mrv = insertvalue { i32, {} } poison, i32 %rintb, 0 %mrv7 = insertvalue { i32, {} } %mrv, {} zeroinitializer, 1 ret { i32, {} } %mrv7 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_4.snap index a1e8ab880..102a49383 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_4.snap @@ -10,7 +10,7 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - call void @random_seed(i64 %0), !dbg !9 + notail call void @random_seed(i64 %0), !dbg !9 ret i1 true } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21.snap index 5a2a4d785..4a1680fd8 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21.snap @@ -18,7 +18,7 @@ entry_block: ; preds = %alloca_block store i64 %1, ptr %"2_1", align 4 %"2_01" = load {}, ptr %"2_0", align 1 %"2_12" = load i64, ptr %"2_1", align 4 - call void @random_advance(i64 %"2_12"), !dbg !10 + notail call void @random_advance(i64 %"2_12"), !dbg !10 store {} %"2_01", ptr %"4_0", align 1, !dbg !10 %"4_03" = load {}, ptr %"4_0", align 1 store {} %"4_03", ptr %"0", align 1 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_1.snap index 8c2c35715..cc9a118e1 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_1.snap @@ -17,7 +17,7 @@ alloca_block: entry_block: ; preds = %alloca_block store {} %0, ptr %"2_0", align 1 %"2_01" = load {}, ptr %"2_0", align 1 - %rint = call i32 @random_int(), !dbg !12 + %rint = notail call i32 @random_int(), !dbg !12 store i32 %rint, ptr %"4_0", align 4, !dbg !12 store {} zeroinitializer, ptr %"4_1", align 1, !dbg !12 %"4_02" = load i32, ptr %"4_0", align 4 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_2.snap index 937c2d0b1..77bb17bd7 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_2.snap @@ -17,7 +17,7 @@ alloca_block: entry_block: ; preds = %alloca_block store {} %0, ptr %"2_0", align 1 %"2_01" = load {}, ptr %"2_0", align 1 - %rfloat = call double @random_float(), !dbg !12 + %rfloat = notail call double @random_float(), !dbg !12 store double %rfloat, ptr %"4_0", align 8, !dbg !12 store {} zeroinitializer, ptr %"4_1", align 1, !dbg !12 %"4_02" = load double, ptr %"4_0", align 8 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_3.snap index 7156bedd6..d178329e8 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_3.snap @@ -20,7 +20,7 @@ entry_block: ; preds = %alloca_block store i32 %1, ptr %"2_1", align 4 %"2_01" = load {}, ptr %"2_0", align 1 %"2_12" = load i32, ptr %"2_1", align 4 - %rintb = call i32 @random_rng(i32 %"2_12"), !dbg !12 + %rintb = notail call i32 @random_rng(i32 %"2_12"), !dbg !12 store i32 %rintb, ptr %"4_0", align 4, !dbg !12 store {} zeroinitializer, ptr %"4_1", align 1, !dbg !12 %"4_03" = load i32, ptr %"4_0", align 4 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_4.snap index 018ec07f6..4fbb9a99e 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_4.snap @@ -15,7 +15,7 @@ alloca_block: entry_block: ; preds = %alloca_block store i64 %0, ptr %"2_0", align 4 %"2_01" = load i64, ptr %"2_0", align 4 - call void @random_seed(i64 %"2_01"), !dbg !9 + notail call void @random_seed(i64 %"2_01"), !dbg !9 store i1 true, ptr %"4_0", align 1, !dbg !9 %"4_02" = load i1, ptr %"4_0", align 1 store i1 %"4_02", ptr %"0", align 1 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_1.snap index 475552f1f..2f05a98f8 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_1.snap @@ -14,7 +14,7 @@ alloca_block: entry_block: ; preds = %alloca_block %tag_len = load i8, ptr @res_test_bool.427F8271.0, align 1, !dbg !8 %tag_len2 = zext i8 %tag_len to i64, !dbg !8 - call void @print_bool(ptr @res_test_bool.427F8271.0, i64 %tag_len2, i1 %0), !dbg !8 + notail call void @print_bool(ptr @res_test_bool.427F8271.0, i64 %tag_len2, i1 %0), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_11.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_11.snap index f096b4034..6b9733a30 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_11.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_11.snap @@ -29,7 +29,7 @@ entry_block: ; preds = %alloca_block store ptr %1, ptr %arr_ptr, align 8, !dbg !11 store ptr %2, ptr %mask_ptr, align 8, !dbg !11 %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1, !dbg !11 - call void @print_float_arr(ptr @res_test_arr_f.038B27BE.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 + notail call void @print_float_arr(ptr @res_test_arr_f.038B27BE.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_12.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_12.snap index 31a2b180f..aaa9280f5 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_12.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_12.snap @@ -14,7 +14,7 @@ alloca_block: entry_block: ; preds = %alloca_block %tag_len = load i8, ptr @"res_\E6\B5\8B\E8\AF\95\E5\AD\97\E7\AC\A6\E4\B8\B2.935D2D1A.0", align 1, !dbg !8 %tag_len2 = zext i8 %tag_len to i64, !dbg !8 - call void @print_int(ptr @"res_\E6\B5\8B\E8\AF\95\E5\AD\97\E7\AC\A6\E4\B8\B2.935D2D1A.0", i64 %tag_len2, i64 %0), !dbg !8 + notail call void @print_int(ptr @"res_\E6\B5\8B\E8\AF\95\E5\AD\97\E7\AC\A6\E4\B8\B2.935D2D1A.0", i64 %tag_len2, i64 %0), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_13.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_13.snap index 039c8605a..522f1cb5c 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_13.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_13.snap @@ -14,7 +14,7 @@ alloca_block: entry_block: ; preds = %alloca_block %tag_len = load i8, ptr @"res_test!@#$%^.2547CEEA.0", align 1, !dbg !8 %tag_len2 = zext i8 %tag_len to i64, !dbg !8 - call void @print_uint(ptr @"res_test!@#$%^.2547CEEA.0", i64 %tag_len2, i64 %0), !dbg !8 + notail call void @print_uint(ptr @"res_test!@#$%^.2547CEEA.0", i64 %tag_len2, i64 %0), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_15.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_15.snap index acdca3bb3..bdbfec8ff 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_15.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_15.snap @@ -14,7 +14,7 @@ alloca_block: entry_block: ; preds = %alloca_block %tag_len = load i8, ptr @"res_ spaces .F46B5D1D.0", align 1, !dbg !8 %tag_len2 = zext i8 %tag_len to i64, !dbg !8 - call void @print_bool(ptr @"res_ spaces .F46B5D1D.0", i64 %tag_len2, i1 %0), !dbg !8 + notail call void @print_bool(ptr @"res_ spaces .F46B5D1D.0", i64 %tag_len2, i1 %0), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_16.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_16.snap index ef6fc9d52..17439cfd8 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_16.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_16.snap @@ -14,7 +14,7 @@ alloca_block: entry_block: ; preds = %alloca_block %tag_len = load i8, ptr @"res_\F0\9F\9A\80\F0\9F\91\A8\E2\80\8D\F0\9F\91\A9\E2\80\8D\F0\9F\91\A7\E2\80\8D\F0\9F\91\A6\F0\9F\8C\8D.F7EE3FAA.0", align 1, !dbg !8 %tag_len2 = zext i8 %tag_len to i64, !dbg !8 - call void @print_bool(ptr @"res_\F0\9F\9A\80\F0\9F\91\A8\E2\80\8D\F0\9F\91\A9\E2\80\8D\F0\9F\91\A7\E2\80\8D\F0\9F\91\A6\F0\9F\8C\8D.F7EE3FAA.0", i64 %tag_len2, i1 %0), !dbg !8 + notail call void @print_bool(ptr @"res_\F0\9F\9A\80\F0\9F\91\A8\E2\80\8D\F0\9F\91\A9\E2\80\8D\F0\9F\91\A7\E2\80\8D\F0\9F\91\A6\F0\9F\8C\8D.F7EE3FAA.0", i64 %tag_len2, i1 %0), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_2.snap index 95ab43fdc..aceafc43f 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_2.snap @@ -14,7 +14,7 @@ alloca_block: entry_block: ; preds = %alloca_block %tag_len = load i8, ptr @res_test_int.258C85C2.0, align 1, !dbg !8 %tag_len2 = zext i8 %tag_len to i64, !dbg !8 - call void @print_int(ptr @res_test_int.258C85C2.0, i64 %tag_len2, i64 %0), !dbg !8 + notail call void @print_int(ptr @res_test_int.258C85C2.0, i64 %tag_len2, i64 %0), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_3.snap index 327974f36..d075fb557 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_3.snap @@ -14,7 +14,7 @@ alloca_block: entry_block: ; preds = %alloca_block %tag_len = load i8, ptr @res_test_uint.DE04EADD.0, align 1, !dbg !8 %tag_len2 = zext i8 %tag_len to i64, !dbg !8 - call void @print_uint(ptr @res_test_uint.DE04EADD.0, i64 %tag_len2, i64 %0), !dbg !8 + notail call void @print_uint(ptr @res_test_uint.DE04EADD.0, i64 %tag_len2, i64 %0), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_4.snap index f621c3063..943d3d686 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_4.snap @@ -14,7 +14,7 @@ alloca_block: entry_block: ; preds = %alloca_block %tag_len = load i8, ptr @res_test_f64.A24BDAE1.0, align 1, !dbg !8 %tag_len2 = zext i8 %tag_len to i64, !dbg !8 - call void @print_float(ptr @res_test_f64.A24BDAE1.0, i64 %tag_len2, double %0), !dbg !8 + notail call void @print_float(ptr @res_test_f64.A24BDAE1.0, i64 %tag_len2, double %0), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_5.snap index 86092d382..62ec5e7c8 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_5.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_5.snap @@ -29,7 +29,7 @@ entry_block: ; preds = %alloca_block store ptr %1, ptr %arr_ptr, align 8, !dbg !11 store ptr %2, ptr %mask_ptr, align 8, !dbg !11 %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1, !dbg !11 - call void @print_bool_arr(ptr @res_test_arr_b.866EEC87.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 + notail call void @print_bool_arr(ptr @res_test_arr_b.866EEC87.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_7.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_7.snap index 11f55fa08..6738be3d7 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_7.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_7.snap @@ -29,7 +29,7 @@ entry_block: ; preds = %alloca_block store ptr %1, ptr %arr_ptr, align 8, !dbg !11 store ptr %2, ptr %mask_ptr, align 8, !dbg !11 %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1, !dbg !11 - call void @print_int_arr(ptr @res_test_arr_i.DFD30452.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 + notail call void @print_int_arr(ptr @res_test_arr_i.DFD30452.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_9.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_9.snap index 949a9f07d..17ca16472 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_9.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_9.snap @@ -29,7 +29,7 @@ entry_block: ; preds = %alloca_block store ptr %1, ptr %arr_ptr, align 8, !dbg !11 store ptr %2, ptr %mask_ptr, align 8, !dbg !11 %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1, !dbg !11 - call void @print_uint_arr(ptr @res_test_arr_u.3D1C515C.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 + notail call void @print_uint_arr(ptr @res_test_arr_u.3D1C515C.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_1.snap index 18c07a017..405c74c50 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_1.snap @@ -17,7 +17,7 @@ entry_block: ; preds = %alloca_block %"2_01" = load i1, ptr %"2_0", align 1 %tag_len = load i8, ptr @res_test_bool.427F8271.0, align 1, !dbg !8 %tag_len2 = zext i8 %tag_len to i64, !dbg !8 - call void @print_bool(ptr @res_test_bool.427F8271.0, i64 %tag_len2, i1 %"2_01"), !dbg !8 + notail call void @print_bool(ptr @res_test_bool.427F8271.0, i64 %tag_len2, i1 %"2_01"), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_11.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_11.snap index 5f043c576..d0525407f 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_11.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_11.snap @@ -32,7 +32,7 @@ entry_block: ; preds = %alloca_block store ptr %1, ptr %arr_ptr, align 8, !dbg !11 store ptr %2, ptr %mask_ptr, align 8, !dbg !11 %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1, !dbg !11 - call void @print_float_arr(ptr @res_test_arr_f.038B27BE.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 + notail call void @print_float_arr(ptr @res_test_arr_f.038B27BE.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_12.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_12.snap index fbeb0fbad..7025c2583 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_12.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_12.snap @@ -17,7 +17,7 @@ entry_block: ; preds = %alloca_block %"2_01" = load i64, ptr %"2_0", align 4 %tag_len = load i8, ptr @"res_\E6\B5\8B\E8\AF\95\E5\AD\97\E7\AC\A6\E4\B8\B2.935D2D1A.0", align 1, !dbg !8 %tag_len2 = zext i8 %tag_len to i64, !dbg !8 - call void @print_int(ptr @"res_\E6\B5\8B\E8\AF\95\E5\AD\97\E7\AC\A6\E4\B8\B2.935D2D1A.0", i64 %tag_len2, i64 %"2_01"), !dbg !8 + notail call void @print_int(ptr @"res_\E6\B5\8B\E8\AF\95\E5\AD\97\E7\AC\A6\E4\B8\B2.935D2D1A.0", i64 %tag_len2, i64 %"2_01"), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_13.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_13.snap index 539964e3e..2c9d5378a 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_13.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_13.snap @@ -17,7 +17,7 @@ entry_block: ; preds = %alloca_block %"2_01" = load i64, ptr %"2_0", align 4 %tag_len = load i8, ptr @"res_test!@#$%^.2547CEEA.0", align 1, !dbg !8 %tag_len2 = zext i8 %tag_len to i64, !dbg !8 - call void @print_uint(ptr @"res_test!@#$%^.2547CEEA.0", i64 %tag_len2, i64 %"2_01"), !dbg !8 + notail call void @print_uint(ptr @"res_test!@#$%^.2547CEEA.0", i64 %tag_len2, i64 %"2_01"), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_15.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_15.snap index 700dbb9fb..f2ebec41e 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_15.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_15.snap @@ -17,7 +17,7 @@ entry_block: ; preds = %alloca_block %"2_01" = load i1, ptr %"2_0", align 1 %tag_len = load i8, ptr @"res_ spaces .F46B5D1D.0", align 1, !dbg !8 %tag_len2 = zext i8 %tag_len to i64, !dbg !8 - call void @print_bool(ptr @"res_ spaces .F46B5D1D.0", i64 %tag_len2, i1 %"2_01"), !dbg !8 + notail call void @print_bool(ptr @"res_ spaces .F46B5D1D.0", i64 %tag_len2, i1 %"2_01"), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_16.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_16.snap index dd2762c04..486b722e3 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_16.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_16.snap @@ -17,7 +17,7 @@ entry_block: ; preds = %alloca_block %"2_01" = load i1, ptr %"2_0", align 1 %tag_len = load i8, ptr @"res_\F0\9F\9A\80\F0\9F\91\A8\E2\80\8D\F0\9F\91\A9\E2\80\8D\F0\9F\91\A7\E2\80\8D\F0\9F\91\A6\F0\9F\8C\8D.F7EE3FAA.0", align 1, !dbg !8 %tag_len2 = zext i8 %tag_len to i64, !dbg !8 - call void @print_bool(ptr @"res_\F0\9F\9A\80\F0\9F\91\A8\E2\80\8D\F0\9F\91\A9\E2\80\8D\F0\9F\91\A7\E2\80\8D\F0\9F\91\A6\F0\9F\8C\8D.F7EE3FAA.0", i64 %tag_len2, i1 %"2_01"), !dbg !8 + notail call void @print_bool(ptr @"res_\F0\9F\9A\80\F0\9F\91\A8\E2\80\8D\F0\9F\91\A9\E2\80\8D\F0\9F\91\A7\E2\80\8D\F0\9F\91\A6\F0\9F\8C\8D.F7EE3FAA.0", i64 %tag_len2, i1 %"2_01"), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_2.snap index db9aa8652..3ca232c37 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_2.snap @@ -17,7 +17,7 @@ entry_block: ; preds = %alloca_block %"2_01" = load i64, ptr %"2_0", align 4 %tag_len = load i8, ptr @res_test_int.258C85C2.0, align 1, !dbg !8 %tag_len2 = zext i8 %tag_len to i64, !dbg !8 - call void @print_int(ptr @res_test_int.258C85C2.0, i64 %tag_len2, i64 %"2_01"), !dbg !8 + notail call void @print_int(ptr @res_test_int.258C85C2.0, i64 %tag_len2, i64 %"2_01"), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_3.snap index b5a87bc1b..95757357c 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_3.snap @@ -17,7 +17,7 @@ entry_block: ; preds = %alloca_block %"2_01" = load i64, ptr %"2_0", align 4 %tag_len = load i8, ptr @res_test_uint.DE04EADD.0, align 1, !dbg !8 %tag_len2 = zext i8 %tag_len to i64, !dbg !8 - call void @print_uint(ptr @res_test_uint.DE04EADD.0, i64 %tag_len2, i64 %"2_01"), !dbg !8 + notail call void @print_uint(ptr @res_test_uint.DE04EADD.0, i64 %tag_len2, i64 %"2_01"), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_4.snap index 87aaa44d3..66a3b69ea 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_4.snap @@ -17,7 +17,7 @@ entry_block: ; preds = %alloca_block %"2_01" = load double, ptr %"2_0", align 8 %tag_len = load i8, ptr @res_test_f64.A24BDAE1.0, align 1, !dbg !8 %tag_len2 = zext i8 %tag_len to i64, !dbg !8 - call void @print_float(ptr @res_test_f64.A24BDAE1.0, i64 %tag_len2, double %"2_01"), !dbg !8 + notail call void @print_float(ptr @res_test_f64.A24BDAE1.0, i64 %tag_len2, double %"2_01"), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_5.snap index 3de6762f2..43cce6226 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_5.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_5.snap @@ -32,7 +32,7 @@ entry_block: ; preds = %alloca_block store ptr %1, ptr %arr_ptr, align 8, !dbg !11 store ptr %2, ptr %mask_ptr, align 8, !dbg !11 %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1, !dbg !11 - call void @print_bool_arr(ptr @res_test_arr_b.866EEC87.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 + notail call void @print_bool_arr(ptr @res_test_arr_b.866EEC87.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_7.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_7.snap index 73ea632e8..d104b170f 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_7.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_7.snap @@ -32,7 +32,7 @@ entry_block: ; preds = %alloca_block store ptr %1, ptr %arr_ptr, align 8, !dbg !11 store ptr %2, ptr %mask_ptr, align 8, !dbg !11 %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1, !dbg !11 - call void @print_int_arr(ptr @res_test_arr_i.DFD30452.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 + notail call void @print_int_arr(ptr @res_test_arr_i.DFD30452.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_9.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_9.snap index 3ad711ffd..ad45416e1 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_9.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_9.snap @@ -32,7 +32,7 @@ entry_block: ; preds = %alloca_block store ptr %1, ptr %arr_ptr, align 8, !dbg !11 store ptr %2, ptr %mask_ptr, align 8, !dbg !11 %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1, !dbg !11 - call void @print_uint_arr(ptr @res_test_arr_u.3D1C515C.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 + notail call void @print_uint_arr(ptr @res_test_arr_u.3D1C515C.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@llvm21_1.snap index aa20e70d5..3439f922a 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@llvm21_1.snap @@ -10,7 +10,7 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %shot = call i64 @get_current_shot(), !dbg !8 + %shot = notail call i64 @get_current_shot(), !dbg !8 ret i64 %shot } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@pre-mem2reg@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@pre-mem2reg@llvm21_1.snap index 3406ddd07..d3c11e58e 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@pre-mem2reg@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@pre-mem2reg@llvm21_1.snap @@ -12,7 +12,7 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %shot = call i64 @get_current_shot(), !dbg !8 + %shot = notail call i64 @get_current_shot(), !dbg !8 store i64 %shot, ptr %"4_0", align 4, !dbg !8 %"4_01" = load i64, ptr %"4_0", align 4 store i64 %"4_01", ptr %"0", align 4 diff --git a/tket-qsystem/src/llvm/utils.rs b/tket-qsystem/src/llvm/utils.rs index 79029147b..659c5bc60 100644 --- a/tket-qsystem/src/llvm/utils.rs +++ b/tket-qsystem/src/llvm/utils.rs @@ -6,6 +6,7 @@ use anyhow::Result; use hugr::llvm::custom::CodegenExtension; use hugr::llvm::emit::EmitOpArgs; use hugr::llvm::emit::func::EmitFuncContext; +use hugr::llvm::inkwell::values::LLVMTailCallKind; use tket::hugr::ops::ExtensionOp; use tket::hugr::{HugrView, Node}; @@ -40,12 +41,10 @@ fn emit_utils_op>( .i64_type() .fn_type(&[], false), )?; - let result = ctx - .builder() - .build_call(fn_get_cur_shot, &[], "shot")? - .try_as_basic_value() - .unwrap_basic(); - args.outputs.finish(ctx.builder(), [result]) + let call = ctx.builder().build_call(fn_get_cur_shot, &[], "shot")?; + call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); + args.outputs + .finish(ctx.builder(), [call.try_as_basic_value().unwrap_basic()]) } } } From a9ece1744ac5c798a68848bd0d3693e9de252e43 Mon Sep 17 00:00:00 2001 From: George Hodgkins Date: Wed, 22 Apr 2026 15:05:16 -0600 Subject: [PATCH 11/11] Revert "Add 'notail' to QIS calls" This reverts commit 25c18b9f24a2e91d2c37df1f141f4f80f2423f2d. --- Cargo.lock | 12 +-- .../discard_qb_array_aarch64-apple-darwin | 68 ++++++------ .../flip_some_aarch64-apple-darwin | 64 +++++------ .../measure_qb_array_aarch64-apple-darwin | 84 +++++++-------- .../no_results_aarch64-apple-darwin | 18 ++-- .../postselect_exit_aarch64-apple-darwin | 26 ++--- .../postselect_panic_aarch64-apple-darwin | 26 ++--- .../print_current_shot_aarch64-apple-darwin | 8 +- .../rng_aarch64-apple-darwin | 34 +++--- .../rus_aarch64-apple-darwin | 84 +++++++-------- .../discard_qb_array_x86_64-apple-darwin | 68 ++++++------ .../flip_some_x86_64-apple-darwin | 64 +++++------ .../measure_qb_array_x86_64-apple-darwin | 102 +++++++++--------- .../no_results_x86_64-apple-darwin | 18 ++-- .../postselect_exit_x86_64-apple-darwin | 26 ++--- .../postselect_panic_x86_64-apple-darwin | 26 ++--- .../print_current_shot_x86_64-apple-darwin | 8 +- .../rng_x86_64-apple-darwin | 34 +++--- .../rus_x86_64-apple-darwin | 84 +++++++-------- .../discard_qb_array_x86_64-unknown-linux-gnu | 68 ++++++------ .../flip_some_x86_64-unknown-linux-gnu | 64 +++++------ .../measure_qb_array_x86_64-unknown-linux-gnu | 102 +++++++++--------- .../no_results_x86_64-unknown-linux-gnu | 18 ++-- .../postselect_exit_x86_64-unknown-linux-gnu | 26 ++--- .../postselect_panic_x86_64-unknown-linux-gnu | 26 ++--- ...rint_current_shot_x86_64-unknown-linux-gnu | 8 +- .../rng_x86_64-unknown-linux-gnu | 34 +++--- .../rus_x86_64-unknown-linux-gnu | 84 +++++++-------- .../discard_qb_array_x86_64-windows-msvc | 68 ++++++------ .../flip_some_x86_64-windows-msvc | 64 +++++------ .../measure_qb_array_x86_64-windows-msvc | 102 +++++++++--------- .../no_results_x86_64-windows-msvc | 18 ++-- .../postselect_exit_x86_64-windows-msvc | 26 ++--- .../postselect_panic_x86_64-windows-msvc | 26 ++--- .../print_current_shot_x86_64-windows-msvc | 8 +- .../rng_x86_64-windows-msvc | 34 +++--- .../rus_x86_64-windows-msvc | 84 +++++++-------- qis-compiler/rust/lib.rs | 4 +- tket-qsystem/src/llvm/debug.rs | 4 +- tket-qsystem/src/llvm/futures.rs | 24 ++--- tket-qsystem/src/llvm/prelude.rs | 10 +- tket-qsystem/src/llvm/qsystem.rs | 100 ++++++++--------- tket-qsystem/src/llvm/random.rs | 26 +++-- tket-qsystem/src/llvm/result.rs | 66 +++++------- ...ug__test__emit_debug_codegen@llvm21_2.snap | 2 +- ...it_debug_codegen@pre-mem2reg@llvm21_2.snap | 2 +- ...__test__emit_futures_codegen@llvm21_1.snap | 2 +- ...__test__emit_futures_codegen@llvm21_2.snap | 2 +- ...__test__emit_futures_codegen@llvm21_3.snap | 2 +- ...__test__emit_futures_codegen@llvm21_4.snap | 2 +- ...__test__emit_futures_codegen@llvm21_5.snap | 2 +- ...__test__emit_futures_codegen@llvm21_6.snap | 2 +- ..._futures_codegen@pre-mem2reg@llvm21_1.snap | 2 +- ..._futures_codegen@pre-mem2reg@llvm21_2.snap | 2 +- ..._futures_codegen@pre-mem2reg@llvm21_3.snap | 2 +- ..._futures_codegen@pre-mem2reg@llvm21_4.snap | 2 +- ..._futures_codegen@pre-mem2reg@llvm21_5.snap | 2 +- ..._futures_codegen@pre-mem2reg@llvm21_6.snap | 2 +- ...vm__prelude__test__exit_emit@llvm21_0.snap | 2 +- ..._test__exit_emit@pre-mem2reg@llvm21_0.snap | 2 +- ...m__prelude__test__panic_emit@llvm21_0.snap | 2 +- ...test__panic_emit@pre-mem2reg@llvm21_0.snap | 2 +- ...__test__emit_qsystem_codegen@llvm21_1.snap | 2 +- ..._test__emit_qsystem_codegen@llvm21_10.snap | 4 +- ...__test__emit_qsystem_codegen@llvm21_2.snap | 2 +- ...__test__emit_qsystem_codegen@llvm21_3.snap | 2 +- ...__test__emit_qsystem_codegen@llvm21_4.snap | 4 +- ...__test__emit_qsystem_codegen@llvm21_5.snap | 4 +- ...__test__emit_qsystem_codegen@llvm21_6.snap | 4 +- ...__test__emit_qsystem_codegen@llvm21_7.snap | 2 +- ...__test__emit_qsystem_codegen@llvm21_8.snap | 2 +- ...__test__emit_qsystem_codegen@llvm21_9.snap | 4 +- ..._qsystem_codegen@pre-mem2reg@llvm21_1.snap | 2 +- ...qsystem_codegen@pre-mem2reg@llvm21_10.snap | 4 +- ..._qsystem_codegen@pre-mem2reg@llvm21_2.snap | 2 +- ..._qsystem_codegen@pre-mem2reg@llvm21_3.snap | 2 +- ..._qsystem_codegen@pre-mem2reg@llvm21_4.snap | 4 +- ..._qsystem_codegen@pre-mem2reg@llvm21_5.snap | 4 +- ..._qsystem_codegen@pre-mem2reg@llvm21_6.snap | 4 +- ..._qsystem_codegen@pre-mem2reg@llvm21_7.snap | 2 +- ..._qsystem_codegen@pre-mem2reg@llvm21_8.snap | 2 +- ..._qsystem_codegen@pre-mem2reg@llvm21_9.snap | 4 +- ...dom__test__emit_random_codegen@llvm21.snap | 2 +- ...m__test__emit_random_codegen@llvm21_1.snap | 2 +- ...m__test__emit_random_codegen@llvm21_2.snap | 2 +- ...m__test__emit_random_codegen@llvm21_3.snap | 2 +- ...m__test__emit_random_codegen@llvm21_4.snap | 2 +- ...mit_random_codegen@pre-mem2reg@llvm21.snap | 2 +- ...t_random_codegen@pre-mem2reg@llvm21_1.snap | 2 +- ...t_random_codegen@pre-mem2reg@llvm21_2.snap | 2 +- ...t_random_codegen@pre-mem2reg@llvm21_3.snap | 2 +- ...t_random_codegen@pre-mem2reg@llvm21_4.snap | 2 +- ...t__test__emit_result_codegen@llvm21_1.snap | 2 +- ...__test__emit_result_codegen@llvm21_11.snap | 2 +- ...__test__emit_result_codegen@llvm21_12.snap | 2 +- ...__test__emit_result_codegen@llvm21_13.snap | 2 +- ...__test__emit_result_codegen@llvm21_15.snap | 2 +- ...__test__emit_result_codegen@llvm21_16.snap | 2 +- ...t__test__emit_result_codegen@llvm21_2.snap | 2 +- ...t__test__emit_result_codegen@llvm21_3.snap | 2 +- ...t__test__emit_result_codegen@llvm21_4.snap | 2 +- ...t__test__emit_result_codegen@llvm21_5.snap | 2 +- ...t__test__emit_result_codegen@llvm21_7.snap | 2 +- ...t__test__emit_result_codegen@llvm21_9.snap | 2 +- ...t_result_codegen@pre-mem2reg@llvm21_1.snap | 2 +- ..._result_codegen@pre-mem2reg@llvm21_11.snap | 2 +- ..._result_codegen@pre-mem2reg@llvm21_12.snap | 2 +- ..._result_codegen@pre-mem2reg@llvm21_13.snap | 2 +- ..._result_codegen@pre-mem2reg@llvm21_15.snap | 2 +- ..._result_codegen@pre-mem2reg@llvm21_16.snap | 2 +- ...t_result_codegen@pre-mem2reg@llvm21_2.snap | 2 +- ...t_result_codegen@pre-mem2reg@llvm21_3.snap | 2 +- ...t_result_codegen@pre-mem2reg@llvm21_4.snap | 2 +- ...t_result_codegen@pre-mem2reg@llvm21_5.snap | 2 +- ...t_result_codegen@pre-mem2reg@llvm21_7.snap | 2 +- ...t_result_codegen@pre-mem2reg@llvm21_9.snap | 2 +- ...ls__test__emit_utils_codegen@llvm21_1.snap | 2 +- ...it_utils_codegen@pre-mem2reg@llvm21_1.snap | 2 +- tket-qsystem/src/llvm/utils.rs | 11 +- 119 files changed, 1051 insertions(+), 1076 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0d1aa6857..885becb2a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1150,7 +1150,7 @@ dependencies = [ [[package]] name = "hugr" version = "0.27.0" -source = "git+https://github.com/quantinuum/hugr?branch=george%2Fdebuginfo#3bd16c604b8d7bb66a19ad739642a44b30e1cd5a" +source = "git+https://github.com/quantinuum/hugr?branch=george%2Fdebuginfo#4ebb9b8e2e4cdbc62117c65f86ca26bbc145350e" dependencies = [ "hugr-core", "hugr-llvm", @@ -1160,7 +1160,7 @@ dependencies = [ [[package]] name = "hugr-cli" version = "0.27.0" -source = "git+https://github.com/quantinuum/hugr?branch=george%2Fdebuginfo#3bd16c604b8d7bb66a19ad739642a44b30e1cd5a" +source = "git+https://github.com/quantinuum/hugr?branch=george%2Fdebuginfo#4ebb9b8e2e4cdbc62117c65f86ca26bbc145350e" dependencies = [ "anyhow", "clap", @@ -1180,7 +1180,7 @@ dependencies = [ [[package]] name = "hugr-core" version = "0.27.0" -source = "git+https://github.com/quantinuum/hugr?branch=george%2Fdebuginfo#3bd16c604b8d7bb66a19ad739642a44b30e1cd5a" +source = "git+https://github.com/quantinuum/hugr?branch=george%2Fdebuginfo#4ebb9b8e2e4cdbc62117c65f86ca26bbc145350e" dependencies = [ "base64", "cgmath", @@ -1217,7 +1217,7 @@ dependencies = [ [[package]] name = "hugr-llvm" version = "0.27.0" -source = "git+https://github.com/quantinuum/hugr?branch=george%2Fdebuginfo#3bd16c604b8d7bb66a19ad739642a44b30e1cd5a" +source = "git+https://github.com/quantinuum/hugr?branch=george%2Fdebuginfo#4ebb9b8e2e4cdbc62117c65f86ca26bbc145350e" dependencies = [ "anyhow", "cc", @@ -1237,7 +1237,7 @@ dependencies = [ [[package]] name = "hugr-model" version = "0.27.0" -source = "git+https://github.com/quantinuum/hugr?branch=george%2Fdebuginfo#3bd16c604b8d7bb66a19ad739642a44b30e1cd5a" +source = "git+https://github.com/quantinuum/hugr?branch=george%2Fdebuginfo#4ebb9b8e2e4cdbc62117c65f86ca26bbc145350e" dependencies = [ "base64", "bumpalo", @@ -2247,7 +2247,7 @@ dependencies = [ "derive_more 0.99.20", "fxhash", "itertools 0.13.0", - "petgraph 0.8.3", + "petgraph 0.6.5", "serde", "slotmap_fork_lmondada", "thiserror 1.0.69", diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-discard_qb_array/discard_qb_array_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-discard_qb_array/discard_qb_array_aarch64-apple-darwin index ae11696eb..cf39d3ddb 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-discard_qb_array/discard_qb_array_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-discard_qb_array/discard_qb_array_aarch64-apple-darwin @@ -12,34 +12,34 @@ alloca_block: %0 = tail call ptr @heap_alloc(i64 80), !dbg !8 %1 = tail call ptr @heap_alloc(i64 8), !dbg !8 store i64 -1, ptr %1, align 1, !dbg !8 - %qalloc.i = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !9 br i1 %not_max.not.not.i, label %cond_233_case_0.i, label %__hugr__.__tk2_qalloc.229.exit, !dbg !9 cond_233_case_0.i: ; preds = %cond_exit_20.8, %cond_exit_20.7, %cond_exit_20.6, %cond_exit_20.5, %cond_exit_20.4, %cond_exit_20.3, %cond_exit_20.2, %cond_exit_20.1, %cond_exit_20, %alloca_block - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 unreachable, !dbg !9 __hugr__.__tk2_qalloc.229.exit: ; preds = %alloca_block - notail call void @___reset(i64 %qalloc.i), !dbg !9 + tail call void @___reset(i64 %qalloc.i), !dbg !9 %2 = load i64, ptr %1, align 4 %3 = trunc i64 %2 to i1 br i1 %3, label %cond_exit_20, label %panic.i panic.i: ; preds = %__barray_check_bounds.exit.9, %__hugr__.__tk2_qalloc.229.exit.8, %__hugr__.__tk2_qalloc.229.exit.7, %__hugr__.__tk2_qalloc.229.exit.6, %__hugr__.__tk2_qalloc.229.exit.5, %__hugr__.__tk2_qalloc.229.exit.4, %__hugr__.__tk2_qalloc.229.exit.3, %__hugr__.__tk2_qalloc.229.exit.2, %__hugr__.__tk2_qalloc.229.exit.1, %__hugr__.__tk2_qalloc.229.exit - notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable cond_exit_20: ; preds = %__hugr__.__tk2_qalloc.229.exit %4 = and i64 %2, -2 store i64 %4, ptr %1, align 4 store i64 %qalloc.i, ptr %0, align 4 - %qalloc.i.1 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.1 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1, !dbg !9 br i1 %not_max.not.not.i.1, label %cond_233_case_0.i, label %__hugr__.__tk2_qalloc.229.exit.1, !dbg !9 __hugr__.__tk2_qalloc.229.exit.1: ; preds = %cond_exit_20 - notail call void @___reset(i64 %qalloc.i.1), !dbg !9 + tail call void @___reset(i64 %qalloc.i.1), !dbg !9 %5 = load i64, ptr %1, align 4 %6 = and i64 %5, 2 %.not = icmp eq i64 %6, 0 @@ -50,12 +50,12 @@ cond_exit_20.1: ; preds = %__hugr__.__tk2_qall store i64 %7, ptr %1, align 4 %8 = getelementptr inbounds nuw i8, ptr %0, i64 8 store i64 %qalloc.i.1, ptr %8, align 4 - %qalloc.i.2 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.2 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1, !dbg !9 br i1 %not_max.not.not.i.2, label %cond_233_case_0.i, label %__hugr__.__tk2_qalloc.229.exit.2, !dbg !9 __hugr__.__tk2_qalloc.229.exit.2: ; preds = %cond_exit_20.1 - notail call void @___reset(i64 %qalloc.i.2), !dbg !9 + tail call void @___reset(i64 %qalloc.i.2), !dbg !9 %9 = load i64, ptr %1, align 4 %10 = and i64 %9, 4 %.not108 = icmp eq i64 %10, 0 @@ -66,12 +66,12 @@ cond_exit_20.2: ; preds = %__hugr__.__tk2_qall store i64 %11, ptr %1, align 4 %12 = getelementptr inbounds nuw i8, ptr %0, i64 16 store i64 %qalloc.i.2, ptr %12, align 4 - %qalloc.i.3 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.3 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1, !dbg !9 br i1 %not_max.not.not.i.3, label %cond_233_case_0.i, label %__hugr__.__tk2_qalloc.229.exit.3, !dbg !9 __hugr__.__tk2_qalloc.229.exit.3: ; preds = %cond_exit_20.2 - notail call void @___reset(i64 %qalloc.i.3), !dbg !9 + tail call void @___reset(i64 %qalloc.i.3), !dbg !9 %13 = load i64, ptr %1, align 4 %14 = and i64 %13, 8 %.not109 = icmp eq i64 %14, 0 @@ -82,12 +82,12 @@ cond_exit_20.3: ; preds = %__hugr__.__tk2_qall store i64 %15, ptr %1, align 4 %16 = getelementptr inbounds nuw i8, ptr %0, i64 24 store i64 %qalloc.i.3, ptr %16, align 4 - %qalloc.i.4 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.4 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1, !dbg !9 br i1 %not_max.not.not.i.4, label %cond_233_case_0.i, label %__hugr__.__tk2_qalloc.229.exit.4, !dbg !9 __hugr__.__tk2_qalloc.229.exit.4: ; preds = %cond_exit_20.3 - notail call void @___reset(i64 %qalloc.i.4), !dbg !9 + tail call void @___reset(i64 %qalloc.i.4), !dbg !9 %17 = load i64, ptr %1, align 4 %18 = and i64 %17, 16 %.not110 = icmp eq i64 %18, 0 @@ -98,12 +98,12 @@ cond_exit_20.4: ; preds = %__hugr__.__tk2_qall store i64 %19, ptr %1, align 4 %20 = getelementptr inbounds nuw i8, ptr %0, i64 32 store i64 %qalloc.i.4, ptr %20, align 4 - %qalloc.i.5 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.5 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.5 = icmp eq i64 %qalloc.i.5, -1, !dbg !9 br i1 %not_max.not.not.i.5, label %cond_233_case_0.i, label %__hugr__.__tk2_qalloc.229.exit.5, !dbg !9 __hugr__.__tk2_qalloc.229.exit.5: ; preds = %cond_exit_20.4 - notail call void @___reset(i64 %qalloc.i.5), !dbg !9 + tail call void @___reset(i64 %qalloc.i.5), !dbg !9 %21 = load i64, ptr %1, align 4 %22 = and i64 %21, 32 %.not111 = icmp eq i64 %22, 0 @@ -114,12 +114,12 @@ cond_exit_20.5: ; preds = %__hugr__.__tk2_qall store i64 %23, ptr %1, align 4 %24 = getelementptr inbounds nuw i8, ptr %0, i64 40 store i64 %qalloc.i.5, ptr %24, align 4 - %qalloc.i.6 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.6 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.6 = icmp eq i64 %qalloc.i.6, -1, !dbg !9 br i1 %not_max.not.not.i.6, label %cond_233_case_0.i, label %__hugr__.__tk2_qalloc.229.exit.6, !dbg !9 __hugr__.__tk2_qalloc.229.exit.6: ; preds = %cond_exit_20.5 - notail call void @___reset(i64 %qalloc.i.6), !dbg !9 + tail call void @___reset(i64 %qalloc.i.6), !dbg !9 %25 = load i64, ptr %1, align 4 %26 = and i64 %25, 64 %.not112 = icmp eq i64 %26, 0 @@ -130,12 +130,12 @@ cond_exit_20.6: ; preds = %__hugr__.__tk2_qall store i64 %27, ptr %1, align 4 %28 = getelementptr inbounds nuw i8, ptr %0, i64 48 store i64 %qalloc.i.6, ptr %28, align 4 - %qalloc.i.7 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.7 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.7 = icmp eq i64 %qalloc.i.7, -1, !dbg !9 br i1 %not_max.not.not.i.7, label %cond_233_case_0.i, label %__hugr__.__tk2_qalloc.229.exit.7, !dbg !9 __hugr__.__tk2_qalloc.229.exit.7: ; preds = %cond_exit_20.6 - notail call void @___reset(i64 %qalloc.i.7), !dbg !9 + tail call void @___reset(i64 %qalloc.i.7), !dbg !9 %29 = load i64, ptr %1, align 4 %30 = and i64 %29, 128 %.not113 = icmp eq i64 %30, 0 @@ -146,12 +146,12 @@ cond_exit_20.7: ; preds = %__hugr__.__tk2_qall store i64 %31, ptr %1, align 4 %32 = getelementptr inbounds nuw i8, ptr %0, i64 56 store i64 %qalloc.i.7, ptr %32, align 4 - %qalloc.i.8 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.8 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.8 = icmp eq i64 %qalloc.i.8, -1, !dbg !9 br i1 %not_max.not.not.i.8, label %cond_233_case_0.i, label %__hugr__.__tk2_qalloc.229.exit.8, !dbg !9 __hugr__.__tk2_qalloc.229.exit.8: ; preds = %cond_exit_20.7 - notail call void @___reset(i64 %qalloc.i.8), !dbg !9 + tail call void @___reset(i64 %qalloc.i.8), !dbg !9 %33 = load i64, ptr %1, align 4 %34 = and i64 %33, 256 %.not114 = icmp eq i64 %34, 0 @@ -162,12 +162,12 @@ cond_exit_20.8: ; preds = %__hugr__.__tk2_qall store i64 %35, ptr %1, align 4 %36 = getelementptr inbounds nuw i8, ptr %0, i64 64 store i64 %qalloc.i.8, ptr %36, align 4 - %qalloc.i.9 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.9 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.9 = icmp eq i64 %qalloc.i.9, -1, !dbg !9 br i1 %not_max.not.not.i.9, label %cond_233_case_0.i, label %__barray_check_bounds.exit.9, !dbg !9 __barray_check_bounds.exit.9: ; preds = %cond_exit_20.8 - notail call void @___reset(i64 %qalloc.i.9), !dbg !9 + tail call void @___reset(i64 %qalloc.i.9), !dbg !9 %37 = load i64, ptr %1, align 4 %38 = and i64 %37, 512 %.not115 = icmp eq i64 %38, 0 @@ -192,7 +192,7 @@ __barray_mask_borrow.exit.1.i: ; preds = %cond_171_case_1.1.i %45 = or disjoint i64 %43, 2, !dbg !21 store i64 %45, ptr %1, align 4, !dbg !21 %46 = load i64, ptr %8, align 4, !dbg !23 - notail call void @___qfree(i64 %46), !dbg !24 + tail call void @___qfree(i64 %46), !dbg !24 %.pre337.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.2.i @@ -206,7 +206,7 @@ __barray_mask_borrow.exit.2.i: ; preds = %cond_171_case_1.2.i %49 = or disjoint i64 %47, 4, !dbg !21 store i64 %49, ptr %1, align 4, !dbg !21 %50 = load i64, ptr %12, align 4, !dbg !23 - notail call void @___qfree(i64 %50), !dbg !24 + tail call void @___qfree(i64 %50), !dbg !24 %.pre338.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.3.i @@ -220,7 +220,7 @@ __barray_mask_borrow.exit.3.i: ; preds = %cond_171_case_1.3.i %53 = or disjoint i64 %51, 8, !dbg !21 store i64 %53, ptr %1, align 4, !dbg !21 %54 = load i64, ptr %16, align 4, !dbg !23 - notail call void @___qfree(i64 %54), !dbg !24 + tail call void @___qfree(i64 %54), !dbg !24 %.pre339.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.4.i @@ -234,7 +234,7 @@ __barray_mask_borrow.exit.4.i: ; preds = %cond_171_case_1.4.i %57 = or disjoint i64 %55, 16, !dbg !21 store i64 %57, ptr %1, align 4, !dbg !21 %58 = load i64, ptr %20, align 4, !dbg !23 - notail call void @___qfree(i64 %58), !dbg !24 + tail call void @___qfree(i64 %58), !dbg !24 %.pre340.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.5.i @@ -248,7 +248,7 @@ __barray_mask_borrow.exit.5.i: ; preds = %cond_171_case_1.5.i %61 = or disjoint i64 %59, 32, !dbg !21 store i64 %61, ptr %1, align 4, !dbg !21 %62 = load i64, ptr %24, align 4, !dbg !23 - notail call void @___qfree(i64 %62), !dbg !24 + tail call void @___qfree(i64 %62), !dbg !24 %.pre341.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.6.i @@ -262,7 +262,7 @@ __barray_mask_borrow.exit.6.i: ; preds = %cond_171_case_1.6.i %65 = or disjoint i64 %63, 64, !dbg !21 store i64 %65, ptr %1, align 4, !dbg !21 %66 = load i64, ptr %28, align 4, !dbg !23 - notail call void @___qfree(i64 %66), !dbg !24 + tail call void @___qfree(i64 %66), !dbg !24 %.pre342.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.7.i @@ -276,7 +276,7 @@ __barray_mask_borrow.exit.7.i: ; preds = %cond_171_case_1.7.i %69 = or disjoint i64 %67, 128, !dbg !21 store i64 %69, ptr %1, align 4, !dbg !21 %70 = load i64, ptr %32, align 4, !dbg !23 - notail call void @___qfree(i64 %70), !dbg !24 + tail call void @___qfree(i64 %70), !dbg !24 %.pre343.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.8.i @@ -290,7 +290,7 @@ __barray_mask_borrow.exit.8.i: ; preds = %cond_171_case_1.8.i %73 = or disjoint i64 %71, 256, !dbg !21 store i64 %73, ptr %1, align 4, !dbg !21 %74 = load i64, ptr %36, align 4, !dbg !23 - notail call void @___qfree(i64 %74), !dbg !24 + tail call void @___qfree(i64 %74), !dbg !24 %.pre = load i64, ptr %1, align 4, !dbg !10 br label %__barray_check_bounds.exit.9.i @@ -304,7 +304,7 @@ __barray_mask_borrow.exit.9.i: ; preds = %__barray_check_boun %77 = or disjoint i64 %75, 512, !dbg !21 store i64 %77, ptr %1, align 4, !dbg !21 %78 = load i64, ptr %40, align 4, !dbg !23 - notail call void @___qfree(i64 %78), !dbg !24 + tail call void @___qfree(i64 %78), !dbg !24 %.pre344.i = load i64, ptr %1, align 4, !dbg !25 br label %cond_exit_156.i @@ -316,14 +316,14 @@ cond_exit_156.i: ; preds = %__barray_mask_borro br i1 %81, label %"__hugr__.guppylang.std.quantum.discard_array$10.113.exit", label %mask_block_err.i.i, !dbg !25 mask_block_err.i.i: ; preds = %cond_exit_156.i - notail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0"), !dbg !25 + tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0"), !dbg !25 unreachable, !dbg !25 __barray_mask_borrow.exit.i: ; preds = %cond_exit_20.9 %82 = or disjoint i64 %41, 1, !dbg !21 store i64 %82, ptr %1, align 4, !dbg !21 %83 = load i64, ptr %0, align 4, !dbg !23 - notail call void @___qfree(i64 %83), !dbg !24 + tail call void @___qfree(i64 %83), !dbg !24 %.pre.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.1.i @@ -349,7 +349,7 @@ declare void @___reset(i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !28 { entry: tail call void @setup(i64 %0), !dbg !32 - notail call void @"__hugr__.__main__.discard_qb_array..main.1"(), !dbg !32 + tail call void @"__hugr__.__main__.discard_qb_array..main.1"(), !dbg !32 %1 = tail call i64 @teardown(), !dbg !32 ret i64 %1, !dbg !32 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-flip_some/flip_some_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-flip_some/flip_some_aarch64-apple-darwin index 696312fd4..2f6c7ab3e 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-flip_some/flip_some_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-flip_some/flip_some_aarch64-apple-darwin @@ -11,69 +11,69 @@ target triple = "aarch64-apple-darwin" define void @"__hugr__.__main__.flip_some..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - %qalloc.i = notail call i64 @___qalloc(), !dbg !8 + %qalloc.i = tail call i64 @___qalloc(), !dbg !8 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 br i1 %not_max.not.not.i, label %cond_40_case_0.i, label %__hugr__.__tk2_qalloc.36.exit, !dbg !8 cond_40_case_0.i: ; preds = %alloca_block - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 unreachable, !dbg !8 __hugr__.__tk2_qalloc.36.exit: ; preds = %alloca_block - notail call void @___reset(i64 %qalloc.i), !dbg !8 - notail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00), !dbg !9 - %qalloc.i101 = notail call i64 @___qalloc(), !dbg !10 + tail call void @___reset(i64 %qalloc.i), !dbg !8 + tail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00), !dbg !9 + %qalloc.i101 = tail call i64 @___qalloc(), !dbg !10 %not_max.not.not.i102 = icmp eq i64 %qalloc.i101, -1, !dbg !10 br i1 %not_max.not.not.i102, label %cond_54_case_0.i, label %__hugr__.__tk2_qalloc.50.exit, !dbg !10 cond_54_case_0.i: ; preds = %__hugr__.__tk2_qalloc.36.exit - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !10 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !10 unreachable, !dbg !10 __hugr__.__tk2_qalloc.50.exit: ; preds = %__hugr__.__tk2_qalloc.36.exit - notail call void @___reset(i64 %qalloc.i101), !dbg !10 - %qalloc.i103 = notail call i64 @___qalloc(), !dbg !11 + tail call void @___reset(i64 %qalloc.i101), !dbg !10 + %qalloc.i103 = tail call i64 @___qalloc(), !dbg !11 %not_max.not.not.i104 = icmp eq i64 %qalloc.i103, -1, !dbg !11 br i1 %not_max.not.not.i104, label %cond_68_case_0.i, label %__hugr__.__tk2_qalloc.64.exit, !dbg !11 cond_68_case_0.i: ; preds = %__hugr__.__tk2_qalloc.50.exit - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !11 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !11 unreachable, !dbg !11 __hugr__.__tk2_qalloc.64.exit: ; preds = %__hugr__.__tk2_qalloc.50.exit - notail call void @___reset(i64 %qalloc.i103), !dbg !11 - notail call void @___rxy(i64 %qalloc.i103, double 0x400921FB54442D18, double 0.000000e+00), !dbg !12 - %qalloc.i105 = notail call i64 @___qalloc(), !dbg !13 + tail call void @___reset(i64 %qalloc.i103), !dbg !11 + tail call void @___rxy(i64 %qalloc.i103, double 0x400921FB54442D18, double 0.000000e+00), !dbg !12 + %qalloc.i105 = tail call i64 @___qalloc(), !dbg !13 %not_max.not.not.i106 = icmp eq i64 %qalloc.i105, -1, !dbg !13 br i1 %not_max.not.not.i106, label %cond_82_case_0.i, label %__hugr__.__tk2_qalloc.78.exit, !dbg !13 cond_82_case_0.i: ; preds = %__hugr__.__tk2_qalloc.64.exit - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !13 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !13 unreachable, !dbg !13 __hugr__.__tk2_qalloc.78.exit: ; preds = %__hugr__.__tk2_qalloc.64.exit - notail call void @___reset(i64 %qalloc.i105), !dbg !13 - %lazy_measure = notail call i64 @___lazy_measure(i64 %qalloc.i) - notail call void @___qfree(i64 %qalloc.i) + tail call void @___reset(i64 %qalloc.i105), !dbg !13 + %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) - notail call void @___dec_future_refcount(i64 %lazy_measure) - notail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool), !dbg !14 - %lazy_measure22 = notail call i64 @___lazy_measure(i64 %qalloc.i101) - notail call void @___qfree(i64 %qalloc.i101) + 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), !dbg !14 + %lazy_measure22 = tail call i64 @___lazy_measure(i64 %qalloc.i101) + tail call void @___qfree(i64 %qalloc.i101) %read_bool35 = tail call i1 @___read_future_bool(i64 %lazy_measure22) - notail call void @___dec_future_refcount(i64 %lazy_measure22) - notail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool35), !dbg !15 - %lazy_measure44 = notail call i64 @___lazy_measure(i64 %qalloc.i103) - notail call void @___qfree(i64 %qalloc.i103) + tail call void @___dec_future_refcount(i64 %lazy_measure22) + tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool35), !dbg !15 + %lazy_measure44 = tail call i64 @___lazy_measure(i64 %qalloc.i103) + tail call void @___qfree(i64 %qalloc.i103) %read_bool57 = tail call i1 @___read_future_bool(i64 %lazy_measure44) - notail call void @___dec_future_refcount(i64 %lazy_measure44) - notail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool57), !dbg !16 - notail call void @___rxy(i64 %qalloc.i105, double 0x400921FB54442D18, double 0.000000e+00), !dbg !17 - %lazy_measure67 = notail call i64 @___lazy_measure(i64 %qalloc.i105) - notail call void @___qfree(i64 %qalloc.i105) + tail call void @___dec_future_refcount(i64 %lazy_measure44) + tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool57), !dbg !16 + tail call void @___rxy(i64 %qalloc.i105, double 0x400921FB54442D18, double 0.000000e+00), !dbg !17 + %lazy_measure67 = tail call i64 @___lazy_measure(i64 %qalloc.i105) + tail call void @___qfree(i64 %qalloc.i105) %read_bool80 = tail call i1 @___read_future_bool(i64 %lazy_measure67) - notail call void @___dec_future_refcount(i64 %lazy_measure67) - notail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool80), !dbg !18 + tail call void @___dec_future_refcount(i64 %lazy_measure67) + tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool80), !dbg !18 ret void } @@ -99,7 +99,7 @@ declare void @___rxy(i64, double, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !19 { entry: tail call void @setup(i64 %0), !dbg !24 - notail call void @"__hugr__.__main__.flip_some..main.1"(), !dbg !24 + tail call void @"__hugr__.__main__.flip_some..main.1"(), !dbg !24 %1 = tail call i64 @teardown(), !dbg !24 ret i64 %1, !dbg !24 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-measure_qb_array/measure_qb_array_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-measure_qb_array/measure_qb_array_aarch64-apple-darwin index 78510a72b..cbc2ada33 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-measure_qb_array/measure_qb_array_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-measure_qb_array/measure_qb_array_aarch64-apple-darwin @@ -13,34 +13,34 @@ alloca_block: %0 = tail call ptr @heap_alloc(i64 80), !dbg !8 %1 = tail call ptr @heap_alloc(i64 8), !dbg !8 store i64 -1, ptr %1, align 1, !dbg !8 - %qalloc.i = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !9 br i1 %not_max.not.not.i, label %cond_299_case_0.i, label %__hugr__.__tk2_qalloc.295.exit, !dbg !9 cond_299_case_0.i: ; preds = %cond_exit_20.8, %cond_exit_20.7, %cond_exit_20.6, %cond_exit_20.5, %cond_exit_20.4, %cond_exit_20.3, %cond_exit_20.2, %cond_exit_20.1, %cond_exit_20, %alloca_block - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 unreachable, !dbg !9 __hugr__.__tk2_qalloc.295.exit: ; preds = %alloca_block - notail call void @___reset(i64 %qalloc.i), !dbg !9 + tail call void @___reset(i64 %qalloc.i), !dbg !9 %2 = load i64, ptr %1, align 4 %3 = trunc i64 %2 to i1 br i1 %3, label %cond_exit_20, label %panic.i panic.i: ; preds = %__barray_check_bounds.exit.9, %__hugr__.__tk2_qalloc.295.exit.8, %__hugr__.__tk2_qalloc.295.exit.7, %__hugr__.__tk2_qalloc.295.exit.6, %__hugr__.__tk2_qalloc.295.exit.5, %__hugr__.__tk2_qalloc.295.exit.4, %__hugr__.__tk2_qalloc.295.exit.3, %__hugr__.__tk2_qalloc.295.exit.2, %__hugr__.__tk2_qalloc.295.exit.1, %__hugr__.__tk2_qalloc.295.exit - notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable cond_exit_20: ; preds = %__hugr__.__tk2_qalloc.295.exit %4 = and i64 %2, -2 store i64 %4, ptr %1, align 4 store i64 %qalloc.i, ptr %0, align 4 - %qalloc.i.1 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.1 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1, !dbg !9 br i1 %not_max.not.not.i.1, label %cond_299_case_0.i, label %__hugr__.__tk2_qalloc.295.exit.1, !dbg !9 __hugr__.__tk2_qalloc.295.exit.1: ; preds = %cond_exit_20 - notail call void @___reset(i64 %qalloc.i.1), !dbg !9 + tail call void @___reset(i64 %qalloc.i.1), !dbg !9 %5 = load i64, ptr %1, align 4 %6 = and i64 %5, 2 %.not280 = icmp eq i64 %6, 0 @@ -51,12 +51,12 @@ cond_exit_20.1: ; preds = %__hugr__.__tk2_qall store i64 %7, ptr %1, align 4 %8 = getelementptr inbounds nuw i8, ptr %0, i64 8 store i64 %qalloc.i.1, ptr %8, align 4 - %qalloc.i.2 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.2 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1, !dbg !9 br i1 %not_max.not.not.i.2, label %cond_299_case_0.i, label %__hugr__.__tk2_qalloc.295.exit.2, !dbg !9 __hugr__.__tk2_qalloc.295.exit.2: ; preds = %cond_exit_20.1 - notail call void @___reset(i64 %qalloc.i.2), !dbg !9 + tail call void @___reset(i64 %qalloc.i.2), !dbg !9 %9 = load i64, ptr %1, align 4 %10 = and i64 %9, 4 %.not281 = icmp eq i64 %10, 0 @@ -67,12 +67,12 @@ cond_exit_20.2: ; preds = %__hugr__.__tk2_qall store i64 %11, ptr %1, align 4 %12 = getelementptr inbounds nuw i8, ptr %0, i64 16 store i64 %qalloc.i.2, ptr %12, align 4 - %qalloc.i.3 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.3 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1, !dbg !9 br i1 %not_max.not.not.i.3, label %cond_299_case_0.i, label %__hugr__.__tk2_qalloc.295.exit.3, !dbg !9 __hugr__.__tk2_qalloc.295.exit.3: ; preds = %cond_exit_20.2 - notail call void @___reset(i64 %qalloc.i.3), !dbg !9 + tail call void @___reset(i64 %qalloc.i.3), !dbg !9 %13 = load i64, ptr %1, align 4 %14 = and i64 %13, 8 %.not282 = icmp eq i64 %14, 0 @@ -83,12 +83,12 @@ cond_exit_20.3: ; preds = %__hugr__.__tk2_qall store i64 %15, ptr %1, align 4 %16 = getelementptr inbounds nuw i8, ptr %0, i64 24 store i64 %qalloc.i.3, ptr %16, align 4 - %qalloc.i.4 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.4 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1, !dbg !9 br i1 %not_max.not.not.i.4, label %cond_299_case_0.i, label %__hugr__.__tk2_qalloc.295.exit.4, !dbg !9 __hugr__.__tk2_qalloc.295.exit.4: ; preds = %cond_exit_20.3 - notail call void @___reset(i64 %qalloc.i.4), !dbg !9 + tail call void @___reset(i64 %qalloc.i.4), !dbg !9 %17 = load i64, ptr %1, align 4 %18 = and i64 %17, 16 %.not283 = icmp eq i64 %18, 0 @@ -99,12 +99,12 @@ cond_exit_20.4: ; preds = %__hugr__.__tk2_qall store i64 %19, ptr %1, align 4 %20 = getelementptr inbounds nuw i8, ptr %0, i64 32 store i64 %qalloc.i.4, ptr %20, align 4 - %qalloc.i.5 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.5 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.5 = icmp eq i64 %qalloc.i.5, -1, !dbg !9 br i1 %not_max.not.not.i.5, label %cond_299_case_0.i, label %__hugr__.__tk2_qalloc.295.exit.5, !dbg !9 __hugr__.__tk2_qalloc.295.exit.5: ; preds = %cond_exit_20.4 - notail call void @___reset(i64 %qalloc.i.5), !dbg !9 + tail call void @___reset(i64 %qalloc.i.5), !dbg !9 %21 = load i64, ptr %1, align 4 %22 = and i64 %21, 32 %.not284 = icmp eq i64 %22, 0 @@ -115,12 +115,12 @@ cond_exit_20.5: ; preds = %__hugr__.__tk2_qall store i64 %23, ptr %1, align 4 %24 = getelementptr inbounds nuw i8, ptr %0, i64 40 store i64 %qalloc.i.5, ptr %24, align 4 - %qalloc.i.6 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.6 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.6 = icmp eq i64 %qalloc.i.6, -1, !dbg !9 br i1 %not_max.not.not.i.6, label %cond_299_case_0.i, label %__hugr__.__tk2_qalloc.295.exit.6, !dbg !9 __hugr__.__tk2_qalloc.295.exit.6: ; preds = %cond_exit_20.5 - notail call void @___reset(i64 %qalloc.i.6), !dbg !9 + tail call void @___reset(i64 %qalloc.i.6), !dbg !9 %25 = load i64, ptr %1, align 4 %26 = and i64 %25, 64 %.not285 = icmp eq i64 %26, 0 @@ -131,12 +131,12 @@ cond_exit_20.6: ; preds = %__hugr__.__tk2_qall store i64 %27, ptr %1, align 4 %28 = getelementptr inbounds nuw i8, ptr %0, i64 48 store i64 %qalloc.i.6, ptr %28, align 4 - %qalloc.i.7 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.7 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.7 = icmp eq i64 %qalloc.i.7, -1, !dbg !9 br i1 %not_max.not.not.i.7, label %cond_299_case_0.i, label %__hugr__.__tk2_qalloc.295.exit.7, !dbg !9 __hugr__.__tk2_qalloc.295.exit.7: ; preds = %cond_exit_20.6 - notail call void @___reset(i64 %qalloc.i.7), !dbg !9 + tail call void @___reset(i64 %qalloc.i.7), !dbg !9 %29 = load i64, ptr %1, align 4 %30 = and i64 %29, 128 %.not286 = icmp eq i64 %30, 0 @@ -147,12 +147,12 @@ cond_exit_20.7: ; preds = %__hugr__.__tk2_qall store i64 %31, ptr %1, align 4 %32 = getelementptr inbounds nuw i8, ptr %0, i64 56 store i64 %qalloc.i.7, ptr %32, align 4 - %qalloc.i.8 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.8 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.8 = icmp eq i64 %qalloc.i.8, -1, !dbg !9 br i1 %not_max.not.not.i.8, label %cond_299_case_0.i, label %__hugr__.__tk2_qalloc.295.exit.8, !dbg !9 __hugr__.__tk2_qalloc.295.exit.8: ; preds = %cond_exit_20.7 - notail call void @___reset(i64 %qalloc.i.8), !dbg !9 + tail call void @___reset(i64 %qalloc.i.8), !dbg !9 %33 = load i64, ptr %1, align 4 %34 = and i64 %33, 256 %.not287 = icmp eq i64 %34, 0 @@ -163,12 +163,12 @@ cond_exit_20.8: ; preds = %__hugr__.__tk2_qall store i64 %35, ptr %1, align 4 %36 = getelementptr inbounds nuw i8, ptr %0, i64 64 store i64 %qalloc.i.8, ptr %36, align 4 - %qalloc.i.9 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.9 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.9 = icmp eq i64 %qalloc.i.9, -1, !dbg !9 br i1 %not_max.not.not.i.9, label %cond_299_case_0.i, label %__barray_check_bounds.exit.9, !dbg !9 __barray_check_bounds.exit.9: ; preds = %cond_exit_20.8 - notail call void @___reset(i64 %qalloc.i.9), !dbg !9 + tail call void @___reset(i64 %qalloc.i.9), !dbg !9 %37 = load i64, ptr %1, align 4 %38 = and i64 %37, 512 %.not288 = icmp eq i64 %38, 0 @@ -187,20 +187,20 @@ cond_exit_20.9: ; preds = %__barray_check_boun br i1 %42, label %panic.i238, label %__barray_mask_borrow.exit, !dbg !10 panic.i238: ; preds = %cond_exit_20.9 - notail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !10 + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !10 unreachable, !dbg !10 __barray_mask_borrow.exit: ; preds = %cond_exit_20.9 %43 = or disjoint i64 %41, 1, !dbg !10 store i64 %43, ptr %1, align 4, !dbg !10 %44 = load i64, ptr %0, align 4, !dbg !12 - notail call void @___rxy(i64 %44, double 0x400921FB54442D18, double 0.000000e+00), !dbg !13 + tail call void @___rxy(i64 %44, double 0x400921FB54442D18, double 0.000000e+00), !dbg !13 %45 = load i64, ptr %1, align 4, !dbg !12 %46 = trunc i64 %45 to i1, !dbg !12 br i1 %46, label %__barray_mask_return.exit240, label %panic.i239, !dbg !12 panic.i239: ; preds = %__barray_mask_borrow.exit - notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !12 + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !12 unreachable, !dbg !12 __barray_mask_return.exit240: ; preds = %__barray_mask_borrow.exit @@ -213,21 +213,21 @@ __barray_mask_return.exit240: ; preds = %__barray_mask_borro br i1 %.not, label %__barray_mask_borrow.exit242, label %panic.i241, !dbg !14 panic.i241: ; preds = %__barray_mask_return.exit240 - notail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !14 + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !14 unreachable, !dbg !14 __barray_mask_borrow.exit242: ; preds = %__barray_mask_return.exit240 %50 = or disjoint i64 %48, 4, !dbg !14 store i64 %50, ptr %1, align 4, !dbg !14 %51 = load i64, ptr %12, align 4, !dbg !16 - notail call void @___rxy(i64 %51, double 0x400921FB54442D18, double 0.000000e+00), !dbg !17 + tail call void @___rxy(i64 %51, double 0x400921FB54442D18, double 0.000000e+00), !dbg !17 %52 = load i64, ptr %1, align 4, !dbg !16 %53 = and i64 %52, 4, !dbg !16 %.not268 = icmp eq i64 %53, 0, !dbg !16 br i1 %.not268, label %panic.i243, label %__barray_mask_return.exit244, !dbg !16 panic.i243: ; preds = %__barray_mask_borrow.exit242 - notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !16 + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !16 unreachable, !dbg !16 __barray_mask_return.exit244: ; preds = %__barray_mask_borrow.exit242 @@ -240,21 +240,21 @@ __barray_mask_return.exit244: ; preds = %__barray_mask_borro br i1 %.not269, label %__barray_mask_borrow.exit246, label %panic.i245, !dbg !18 panic.i245: ; preds = %__barray_mask_return.exit244 - notail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !18 + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !18 unreachable, !dbg !18 __barray_mask_borrow.exit246: ; preds = %__barray_mask_return.exit244 %57 = or disjoint i64 %55, 8, !dbg !18 store i64 %57, ptr %1, align 4, !dbg !18 %58 = load i64, ptr %16, align 4, !dbg !20 - notail call void @___rxy(i64 %58, double 0x400921FB54442D18, double 0.000000e+00), !dbg !21 + tail call void @___rxy(i64 %58, double 0x400921FB54442D18, double 0.000000e+00), !dbg !21 %59 = load i64, ptr %1, align 4, !dbg !20 %60 = and i64 %59, 8, !dbg !20 %.not270 = icmp eq i64 %60, 0, !dbg !20 br i1 %.not270, label %panic.i247, label %__barray_mask_return.exit248, !dbg !20 panic.i247: ; preds = %__barray_mask_borrow.exit246 - notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !20 + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !20 unreachable, !dbg !20 __barray_mask_return.exit248: ; preds = %__barray_mask_borrow.exit246 @@ -267,21 +267,21 @@ __barray_mask_return.exit248: ; preds = %__barray_mask_borro br i1 %.not271, label %__barray_mask_borrow.exit250, label %panic.i249, !dbg !22 panic.i249: ; preds = %__barray_mask_return.exit248 - notail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !22 + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !22 unreachable, !dbg !22 __barray_mask_borrow.exit250: ; preds = %__barray_mask_return.exit248 %64 = or disjoint i64 %62, 512, !dbg !22 store i64 %64, ptr %1, align 4, !dbg !22 %65 = load i64, ptr %40, align 4, !dbg !24 - notail call void @___rxy(i64 %65, double 0x400921FB54442D18, double 0.000000e+00), !dbg !25 + tail call void @___rxy(i64 %65, double 0x400921FB54442D18, double 0.000000e+00), !dbg !25 %66 = load i64, ptr %1, align 4, !dbg !24 %67 = and i64 %66, 512, !dbg !24 %.not272 = icmp eq i64 %67, 0, !dbg !24 br i1 %.not272, label %panic.i251, label %__barray_mask_return.exit252, !dbg !24 panic.i251: ; preds = %__barray_mask_borrow.exit250 - notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !24 + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !24 unreachable, !dbg !24 __barray_mask_return.exit252: ; preds = %__barray_mask_borrow.exit250 @@ -332,7 +332,7 @@ mask_block_ok.i.i.i: ; preds = %72, %90 br i1 %93, label %90, label %mask_block_err.i.i.i, !dbg !44 mask_block_err.i.i.i: ; preds = %mask_block_ok.i.i.i - notail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0"), !dbg !44 + tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0"), !dbg !44 unreachable, !dbg !44 __barray_check_bounds.exit.i.i: ; preds = %loop_body.i, %__barray_mask_return.exit252 @@ -352,7 +352,7 @@ __barray_check_bounds.exit.i.i: ; preds = %loop_body.i, %__bar br i1 %101, label %panic.i.i.i, label %__barray_check_bounds.exit.i, !dbg !56 panic.i.i.i: ; preds = %__barray_check_bounds.exit.i.i - notail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !56 + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !56 unreachable, !dbg !56 __barray_check_bounds.exit.i: ; preds = %__barray_check_bounds.exit.i.i @@ -361,15 +361,15 @@ __barray_check_bounds.exit.i: ; preds = %__barray_check_boun store i64 %103, ptr %97, align 4, !dbg !56 %104 = getelementptr inbounds i64, ptr %.fca.0.extract80.i185.i, i64 %95, !dbg !55 %105 = load i64, ptr %104, align 4, !dbg !55 - %lazy_measure.i = notail call i64 @___lazy_measure(i64 %105) - notail call void @___qfree(i64 %105) + %lazy_measure.i = tail call i64 @___lazy_measure(i64 %105) + tail call void @___qfree(i64 %105) %106 = load i64, ptr %71, align 4 %107 = lshr i64 %106, %"163_0.sroa.15.0184.i" %108 = trunc i64 %107 to i1 br i1 %108, label %loop_body.i, label %panic.i.i panic.i.i: ; preds = %__barray_check_bounds.exit.i - notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable loop_body.i: ; preds = %__barray_check_bounds.exit.i @@ -406,7 +406,7 @@ cond_exit_369: ; preds = %cond_369_case_0 ret void mask_block_err.i: ; preds = %cond_369_case_0 - notail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") + tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable __barray_check_bounds.exit255: ; preds = %"__hugr__.guppylang.std.quantum.measure_array$10.149.exit", %cond_exit_369.thread @@ -432,7 +432,7 @@ cond_exit_369.thread: ; preds = %cond_392_case_1, %_ cond_392_case_1: ; preds = %__barray_mask_borrow.exit259 %.fca.1.extract = extractvalue { i1, i64, i1 } %124, 1 - notail call void @___dec_future_refcount(i64 %.fca.1.extract) + tail call void @___dec_future_refcount(i64 %.fca.1.extract) br label %cond_exit_369.thread } @@ -458,7 +458,7 @@ declare void @___reset(i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !59 { entry: tail call void @setup(i64 %0), !dbg !63 - notail call void @"__hugr__.__main__.measure_qb_array..main.1"(), !dbg !63 + tail call void @"__hugr__.__main__.measure_qb_array..main.1"(), !dbg !63 %1 = tail call i64 @teardown(), !dbg !63 ret i64 %1, !dbg !63 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-no_results/no_results_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-no_results/no_results_aarch64-apple-darwin index 59763e774..df22866bb 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-no_results/no_results_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-no_results/no_results_aarch64-apple-darwin @@ -7,21 +7,21 @@ target triple = "aarch64-apple-darwin" define void @"__hugr__.__main__.no_results..bar.1"() local_unnamed_addr !dbg !4 { alloca_block: - %qalloc.i = notail call i64 @___qalloc(), !dbg !8 + %qalloc.i = tail call i64 @___qalloc(), !dbg !8 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 br i1 %not_max.not.not.i, label %cond_18_case_0.i, label %__hugr__.__tk2_qalloc.14.exit, !dbg !8 cond_18_case_0.i: ; preds = %alloca_block - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 unreachable, !dbg !8 __hugr__.__tk2_qalloc.14.exit: ; preds = %alloca_block - notail call void @___reset(i64 %qalloc.i), !dbg !8 - notail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 - notail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 - %lazy_measure = notail call i64 @___lazy_measure(i64 %qalloc.i) - notail call void @___qfree(i64 %qalloc.i) - notail call void @___dec_future_refcount(i64 %lazy_measure) + tail call void @___reset(i64 %qalloc.i), !dbg !8 + tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 + tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 + %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) ret void } @@ -45,7 +45,7 @@ declare void @___rz(i64, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !10 { entry: tail call void @setup(i64 %0), !dbg !15 - notail call void @"__hugr__.__main__.no_results..bar.1"(), !dbg !15 + tail call void @"__hugr__.__main__.no_results..bar.1"(), !dbg !15 %1 = tail call i64 @teardown(), !dbg !15 ret i64 %1, !dbg !15 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-postselect_exit/postselect_exit_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-postselect_exit/postselect_exit_aarch64-apple-darwin index 085e5cb52..358d4805b 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-postselect_exit/postselect_exit_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-postselect_exit/postselect_exit_aarch64-apple-darwin @@ -9,33 +9,33 @@ target triple = "aarch64-apple-darwin" define void @"__hugr__.__main__.postselect_exit..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - %qalloc.i = notail call i64 @___qalloc(), !dbg !8 + %qalloc.i = tail call i64 @___qalloc(), !dbg !8 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 br i1 %not_max.not.not.i, label %cond_45_case_0.i, label %__hugr__.__tk2_qalloc.41.exit, !dbg !8 cond_45_case_0.i: ; preds = %alloca_block - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 unreachable, !dbg !8 __hugr__.__tk2_qalloc.41.exit: ; preds = %alloca_block - notail call void @___reset(i64 %qalloc.i), !dbg !8 - notail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 - notail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 - %lazy_measure = notail call i64 @___lazy_measure(i64 %qalloc.i) - notail call void @___qfree(i64 %qalloc.i) - notail call void @___inc_future_refcount(i64 %lazy_measure) + tail call void @___reset(i64 %qalloc.i), !dbg !8 + tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 + tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 + %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + tail call void @___qfree(i64 %qalloc.i) + tail call void @___inc_future_refcount(i64 %lazy_measure) %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - notail call void @___dec_future_refcount(i64 %lazy_measure) + tail call void @___dec_future_refcount(i64 %lazy_measure) br i1 %read_bool, label %0, label %cond_98_case_1 cond_98_case_1: ; preds = %__hugr__.__tk2_qalloc.41.exit %read_bool66 = tail call i1 @___read_future_bool(i64 %lazy_measure) - notail call void @___dec_future_refcount(i64 %lazy_measure) - notail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool66), !dbg !10 + tail call void @___dec_future_refcount(i64 %lazy_measure) + tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool66), !dbg !10 ret void 0: ; preds = %__hugr__.__tk2_qalloc.41.exit - notail call void @panic(i32 42, ptr nonnull @s_Postselect.13DF1CD0.0), !dbg !11 + tail call void @panic(i32 42, ptr nonnull @s_Postselect.13DF1CD0.0), !dbg !11 unreachable } @@ -65,7 +65,7 @@ declare void @___rz(i64, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !12 { entry: tail call void @setup(i64 %0), !dbg !17 - notail call void @"__hugr__.__main__.postselect_exit..main.1"(), !dbg !17 + tail call void @"__hugr__.__main__.postselect_exit..main.1"(), !dbg !17 %1 = tail call i64 @teardown(), !dbg !17 ret i64 %1, !dbg !17 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-postselect_panic/postselect_panic_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-postselect_panic/postselect_panic_aarch64-apple-darwin index 23f6578fe..7d1a561f7 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-postselect_panic/postselect_panic_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-postselect_panic/postselect_panic_aarch64-apple-darwin @@ -9,33 +9,33 @@ target triple = "aarch64-apple-darwin" define void @"__hugr__.__main__.postselect_panic..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - %qalloc.i = notail call i64 @___qalloc(), !dbg !8 + %qalloc.i = tail call i64 @___qalloc(), !dbg !8 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 br i1 %not_max.not.not.i, label %cond_43_case_0.i, label %__hugr__.__tk2_qalloc.39.exit, !dbg !8 cond_43_case_0.i: ; preds = %alloca_block - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 unreachable, !dbg !8 __hugr__.__tk2_qalloc.39.exit: ; preds = %alloca_block - notail call void @___reset(i64 %qalloc.i), !dbg !8 - notail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 - notail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 - %lazy_measure = notail call i64 @___lazy_measure(i64 %qalloc.i) - notail call void @___qfree(i64 %qalloc.i) - notail call void @___inc_future_refcount(i64 %lazy_measure) + tail call void @___reset(i64 %qalloc.i), !dbg !8 + tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 + tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 + %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + tail call void @___qfree(i64 %qalloc.i) + tail call void @___inc_future_refcount(i64 %lazy_measure) %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - notail call void @___dec_future_refcount(i64 %lazy_measure) + tail call void @___dec_future_refcount(i64 %lazy_measure) br i1 %read_bool, label %0, label %cond_96_case_1 cond_96_case_1: ; preds = %__hugr__.__tk2_qalloc.39.exit %read_bool65 = tail call i1 @___read_future_bool(i64 %lazy_measure) - notail call void @___dec_future_refcount(i64 %lazy_measure) - notail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool65), !dbg !10 + tail call void @___dec_future_refcount(i64 %lazy_measure) + tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool65), !dbg !10 ret void 0: ; preds = %__hugr__.__tk2_qalloc.39.exit - notail call void @panic(i32 1001, ptr nonnull @s_Postselect.13DF1CD0.0), !dbg !11 + tail call void @panic(i32 1001, ptr nonnull @s_Postselect.13DF1CD0.0), !dbg !11 unreachable } @@ -65,7 +65,7 @@ declare void @___rz(i64, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !12 { entry: tail call void @setup(i64 %0), !dbg !17 - notail call void @"__hugr__.__main__.postselect_panic..main.1"(), !dbg !17 + tail call void @"__hugr__.__main__.postselect_panic..main.1"(), !dbg !17 %1 = tail call i64 @teardown(), !dbg !17 ret i64 %1, !dbg !17 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-print_current_shot/print_current_shot_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-print_current_shot/print_current_shot_aarch64-apple-darwin index fc9c34d3d..ed52d3abc 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-print_current_shot/print_current_shot_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-print_current_shot/print_current_shot_aarch64-apple-darwin @@ -7,8 +7,8 @@ target triple = "aarch64-apple-darwin" define void @"__hugr__.__main__.print_current_shot..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - %shot = notail call i64 @get_current_shot(), !dbg !8 - notail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot), !dbg !9 + %shot = tail call i64 @get_current_shot(), !dbg !8 + tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot), !dbg !9 ret void } @@ -19,8 +19,8 @@ declare void @print_int(ptr, i64, i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !10 { entry: tail call void @setup(i64 %0), !dbg !15 - %shot.i = notail call i64 @get_current_shot(), !dbg !16 - notail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot.i), !dbg !18 + %shot.i = tail call i64 @get_current_shot(), !dbg !16 + tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot.i), !dbg !18 %1 = tail call i64 @teardown(), !dbg !15 ret i64 %1, !dbg !15 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-rng/rng_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-rng/rng_aarch64-apple-darwin index 65ff69a84..02d59c7f9 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-rng/rng_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-rng/rng_aarch64-apple-darwin @@ -13,27 +13,27 @@ target triple = "aarch64-apple-darwin" define void @"__hugr__.__main__.rng..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - notail call void @random_seed(i64 42), !dbg !8 - %rint = notail call i32 @random_int(), !dbg !17 - %rint14 = notail call i32 @random_int(), !dbg !18 - %rfloat = notail call double @random_float(), !dbg !19 - %rintb = notail call i32 @random_rng(i32 100), !dbg !20 + tail call void @random_seed(i64 42), !dbg !8 + %rint = tail call i32 @random_int(), !dbg !17 + %rint14 = tail call i32 @random_int(), !dbg !18 + %rfloat = tail call double @random_float(), !dbg !19 + %rintb = tail call i32 @random_rng(i32 100), !dbg !20 %0 = sext i32 %rintb to i64, !dbg !20 %1 = sext i32 %rint14 to i64, !dbg !18 %2 = sext i32 %rint to i64, !dbg !17 - notail call void @print_int(ptr nonnull @res_rint.B928E41E.0, i64 13, i64 %2), !dbg !21 - notail call void @print_int(ptr nonnull @res_rint1.0884EC03.0, i64 14, i64 %1), !dbg !22 - notail call void @print_float(ptr nonnull @res_rfloat.F0E4DD2C.0, i64 17, double %rfloat), !dbg !23 - notail call void @print_int(ptr nonnull @res_rint_bnd.CB1E6B0D.0, i64 17, i64 %0), !dbg !24 - notail call void @random_seed(i64 84), !dbg !25 - %rint47 = notail call i32 @random_int(), !dbg !27 - %rfloat49 = notail call double @random_float(), !dbg !28 - %rintb52 = notail call i32 @random_rng(i32 200), !dbg !29 + tail call void @print_int(ptr nonnull @res_rint.B928E41E.0, i64 13, i64 %2), !dbg !21 + tail call void @print_int(ptr nonnull @res_rint1.0884EC03.0, i64 14, i64 %1), !dbg !22 + tail call void @print_float(ptr nonnull @res_rfloat.F0E4DD2C.0, i64 17, double %rfloat), !dbg !23 + tail call void @print_int(ptr nonnull @res_rint_bnd.CB1E6B0D.0, i64 17, i64 %0), !dbg !24 + tail call void @random_seed(i64 84), !dbg !25 + %rint47 = tail call i32 @random_int(), !dbg !27 + %rfloat49 = tail call double @random_float(), !dbg !28 + %rintb52 = tail call i32 @random_rng(i32 200), !dbg !29 %3 = sext i32 %rintb52 to i64, !dbg !29 %4 = sext i32 %rint47 to i64, !dbg !27 - notail call void @print_int(ptr nonnull @res_rint2.F0335598.0, i64 14, i64 %4), !dbg !30 - notail call void @print_float(ptr nonnull @res_rfloat2.4DAB941F.0, i64 18, double %rfloat49), !dbg !31 - notail call void @print_int(ptr nonnull @res_rint_bnd2.169DE399.0, i64 18, i64 %3), !dbg !32 + tail call void @print_int(ptr nonnull @res_rint2.F0335598.0, i64 14, i64 %4), !dbg !30 + tail call void @print_float(ptr nonnull @res_rfloat2.4DAB941F.0, i64 18, double %rfloat49), !dbg !31 + tail call void @print_int(ptr nonnull @res_rint_bnd2.169DE399.0, i64 18, i64 %3), !dbg !32 ret void } @@ -52,7 +52,7 @@ declare void @random_seed(i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !33 { entry: tail call void @setup(i64 %0), !dbg !37 - notail call void @"__hugr__.__main__.rng..main.1"(), !dbg !37 + tail call void @"__hugr__.__main__.rng..main.1"(), !dbg !37 %1 = tail call i64 @teardown(), !dbg !37 ret i64 %1, !dbg !37 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-rus/rus_aarch64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-rus/rus_aarch64-apple-darwin index d24299812..261e661bf 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-rus/rus_aarch64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/aarch64-apple-darwin-rus/rus_aarch64-apple-darwin @@ -8,88 +8,88 @@ target triple = "aarch64-apple-darwin" define void @"__hugr__.__main__.rus..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - %qalloc.i = notail call i64 @___qalloc(), !dbg !8 + %qalloc.i = tail call i64 @___qalloc(), !dbg !8 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 br i1 %not_max.not.not.i, label %cond_87_case_0.i, label %__hugr__.__tk2_qalloc.83.exit, !dbg !8 cond_87_case_0.i: ; preds = %alloca_block - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 unreachable, !dbg !8 __hugr__.__tk2_qalloc.83.exit: ; preds = %alloca_block - notail call void @___reset(i64 %qalloc.i), !dbg !8 - %qalloc.i132.i = notail call i64 @___qalloc(), !dbg !9 + tail call void @___reset(i64 %qalloc.i), !dbg !8 + %qalloc.i132.i = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i133.i = icmp eq i64 %qalloc.i132.i, -1, !dbg !9 br i1 %not_max.not.not.i133.i, label %cond_101_case_0.i.i, label %__hugr__.__tk2_qalloc.97.exit.i, !dbg !9 cond_101_case_0.i.i: ; preds = %cond_242_case_1.backedge.i, %__hugr__.__tk2_qalloc.83.exit - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 unreachable, !dbg !9 __hugr__.__tk2_qalloc.97.exit.i: ; preds = %__hugr__.__tk2_qalloc.83.exit, %cond_242_case_1.backedge.i %qalloc.i134.i = phi i64 [ %qalloc.i.i, %cond_242_case_1.backedge.i ], [ %qalloc.i132.i, %__hugr__.__tk2_qalloc.83.exit ] - notail call void @___reset(i64 %qalloc.i134.i), !dbg !9 - %qalloc.i128.i = notail call i64 @___qalloc(), !dbg !15 + tail call void @___reset(i64 %qalloc.i134.i), !dbg !9 + %qalloc.i128.i = tail call i64 @___qalloc(), !dbg !15 %not_max.not.not.i129.i = icmp eq i64 %qalloc.i128.i, -1, !dbg !15 br i1 %not_max.not.not.i129.i, label %cond_115_case_0.i.i, label %__hugr__.__tk2_qalloc.111.exit.i, !dbg !15 cond_115_case_0.i.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !15 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !15 unreachable, !dbg !15 __hugr__.__tk2_qalloc.111.exit.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i - notail call void @___reset(i64 %qalloc.i128.i), !dbg !15 - notail call void @___rxy(i64 %qalloc.i128.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !16 - notail call void @___rz(i64 %qalloc.i128.i, double 0x400921FB54442D18), !dbg !16 - notail call void @___rxy(i64 %qalloc.i134.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !17 - notail call void @___rz(i64 %qalloc.i134.i, double 0x400921FB54442D18), !dbg !17 - notail call void @___rz(i64 %qalloc.i134.i, double 0xBFE921FB54442D18), !dbg !18 - notail call void @___rxy(i64 %qalloc.i134.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18), !dbg !19 - notail call void @___rzz(i64 %qalloc.i128.i, i64 %qalloc.i134.i, double 0x3FF921FB54442D18), !dbg !19 - notail call void @___rz(i64 %qalloc.i128.i, double 0xBFF921FB54442D18), !dbg !19 - notail call void @___rxy(i64 %qalloc.i134.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18), !dbg !19 - notail call void @___rz(i64 %qalloc.i134.i, double 0xBFF921FB54442D18), !dbg !19 - notail call void @___rz(i64 %qalloc.i134.i, double 0x3FE921FB54442D18), !dbg !20 - %lazy_measure.i = notail call i64 @___lazy_measure(i64 %qalloc.i134.i) - notail call void @___qfree(i64 %qalloc.i134.i) + tail call void @___reset(i64 %qalloc.i128.i), !dbg !15 + tail call void @___rxy(i64 %qalloc.i128.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !16 + tail call void @___rz(i64 %qalloc.i128.i, double 0x400921FB54442D18), !dbg !16 + tail call void @___rxy(i64 %qalloc.i134.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !17 + tail call void @___rz(i64 %qalloc.i134.i, double 0x400921FB54442D18), !dbg !17 + tail call void @___rz(i64 %qalloc.i134.i, double 0xBFE921FB54442D18), !dbg !18 + tail call void @___rxy(i64 %qalloc.i134.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18), !dbg !19 + tail call void @___rzz(i64 %qalloc.i128.i, i64 %qalloc.i134.i, double 0x3FF921FB54442D18), !dbg !19 + tail call void @___rz(i64 %qalloc.i128.i, double 0xBFF921FB54442D18), !dbg !19 + tail call void @___rxy(i64 %qalloc.i134.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18), !dbg !19 + tail call void @___rz(i64 %qalloc.i134.i, double 0xBFF921FB54442D18), !dbg !19 + tail call void @___rz(i64 %qalloc.i134.i, double 0x3FE921FB54442D18), !dbg !20 + %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i134.i) + tail call void @___qfree(i64 %qalloc.i134.i) %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) - notail call void @___dec_future_refcount(i64 %lazy_measure.i) + tail call void @___dec_future_refcount(i64 %lazy_measure.i) br i1 %read_bool.i, label %cond_256_case_1.i, label %0 0: ; preds = %__hugr__.__tk2_qalloc.111.exit.i - notail call void @___qfree(i64 %qalloc.i128.i), !dbg !21 + tail call void @___qfree(i64 %qalloc.i128.i), !dbg !21 br label %cond_242_case_1.backedge.i cond_242_case_1.backedge.i: ; preds = %1, %0 - %qalloc.i.i = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.i = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1, !dbg !9 br i1 %not_max.not.not.i.i, label %cond_101_case_0.i.i, label %__hugr__.__tk2_qalloc.97.exit.i, !dbg !9 cond_256_case_1.i: ; preds = %__hugr__.__tk2_qalloc.111.exit.i - notail call void @___rz(i64 %qalloc.i, double 0x3FE921FB54442D18), !dbg !22 - notail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !23 - notail call void @___rxy(i64 %qalloc.i128.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18), !dbg !24 - notail call void @___rzz(i64 %qalloc.i, i64 %qalloc.i128.i, double 0x3FF921FB54442D18), !dbg !24 - notail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18), !dbg !24 - notail call void @___rxy(i64 %qalloc.i128.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18), !dbg !24 - notail call void @___rz(i64 %qalloc.i128.i, double 0xBFF921FB54442D18), !dbg !24 - notail call void @___rz(i64 %qalloc.i128.i, double 0x3FE921FB54442D18), !dbg !25 - %lazy_measure67.i = notail call i64 @___lazy_measure(i64 %qalloc.i128.i) - notail call void @___qfree(i64 %qalloc.i128.i) + tail call void @___rz(i64 %qalloc.i, double 0x3FE921FB54442D18), !dbg !22 + tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !23 + tail call void @___rxy(i64 %qalloc.i128.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18), !dbg !24 + tail call void @___rzz(i64 %qalloc.i, i64 %qalloc.i128.i, double 0x3FF921FB54442D18), !dbg !24 + tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18), !dbg !24 + tail call void @___rxy(i64 %qalloc.i128.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18), !dbg !24 + tail call void @___rz(i64 %qalloc.i128.i, double 0xBFF921FB54442D18), !dbg !24 + tail call void @___rz(i64 %qalloc.i128.i, double 0x3FE921FB54442D18), !dbg !25 + %lazy_measure67.i = tail call i64 @___lazy_measure(i64 %qalloc.i128.i) + tail call void @___qfree(i64 %qalloc.i128.i) %read_bool80.i = tail call i1 @___read_future_bool(i64 %lazy_measure67.i) - notail call void @___dec_future_refcount(i64 %lazy_measure67.i) + tail call void @___dec_future_refcount(i64 %lazy_measure67.i) br i1 %read_bool80.i, label %"__hugr__.__main__.rus..rus.17.exit", label %1 1: ; preds = %cond_256_case_1.i - notail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00), !dbg !26 + tail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00), !dbg !26 br label %cond_242_case_1.backedge.i "__hugr__.__main__.rus..rus.17.exit": ; preds = %cond_256_case_1.i - %lazy_measure = notail call i64 @___lazy_measure(i64 %qalloc.i) - notail call void @___qfree(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) - notail call void @___dec_future_refcount(i64 %lazy_measure) - notail call void @print_bool(ptr nonnull @res_result.457DE32D.0, i64 16, i1 %read_bool), !dbg !27 + tail call void @___dec_future_refcount(i64 %lazy_measure) + tail call void @print_bool(ptr nonnull @res_result.457DE32D.0, i64 16, i1 %read_bool), !dbg !27 ret void } @@ -119,7 +119,7 @@ declare void @___rzz(i64, i64, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !28 { entry: tail call void @setup(i64 %0), !dbg !30 - notail call void @"__hugr__.__main__.rus..main.1"(), !dbg !30 + tail call void @"__hugr__.__main__.rus..main.1"(), !dbg !30 %1 = tail call i64 @teardown(), !dbg !30 ret i64 %1, !dbg !30 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-discard_qb_array/discard_qb_array_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-discard_qb_array/discard_qb_array_x86_64-apple-darwin index f90047eb1..24ec6374c 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-discard_qb_array/discard_qb_array_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-discard_qb_array/discard_qb_array_x86_64-apple-darwin @@ -12,34 +12,34 @@ alloca_block: %0 = tail call ptr @heap_alloc(i64 80), !dbg !8 %1 = tail call ptr @heap_alloc(i64 8), !dbg !8 store i64 -1, ptr %1, align 1, !dbg !8 - %qalloc.i = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !9 br i1 %not_max.not.not.i, label %cond_233_case_0.i, label %__barray_check_bounds.exit, !dbg !9 cond_233_case_0.i: ; preds = %cond_exit_20.8, %cond_exit_20.7, %cond_exit_20.6, %cond_exit_20.5, %cond_exit_20.4, %cond_exit_20.3, %cond_exit_20.2, %cond_exit_20.1, %cond_exit_20, %alloca_block - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 unreachable, !dbg !9 __barray_check_bounds.exit: ; preds = %alloca_block - notail call void @___reset(i64 %qalloc.i), !dbg !9 + tail call void @___reset(i64 %qalloc.i), !dbg !9 %2 = load i64, ptr %1, align 4 %3 = trunc i64 %2 to i1 br i1 %3, label %cond_exit_20, 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 - notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable cond_exit_20: ; preds = %__barray_check_bounds.exit %4 = and i64 %2, -2 store i64 %4, ptr %1, align 4 store i64 %qalloc.i, ptr %0, align 4 - %qalloc.i.1 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.1 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1, !dbg !9 br i1 %not_max.not.not.i.1, label %cond_233_case_0.i, label %__barray_check_bounds.exit.1, !dbg !9 __barray_check_bounds.exit.1: ; preds = %cond_exit_20 - notail call void @___reset(i64 %qalloc.i.1), !dbg !9 + tail call void @___reset(i64 %qalloc.i.1), !dbg !9 %5 = load i64, ptr %1, align 4 %6 = and i64 %5, 2 %.not = icmp eq i64 %6, 0 @@ -50,12 +50,12 @@ cond_exit_20.1: ; preds = %__barray_check_boun store i64 %7, ptr %1, align 4 %8 = getelementptr inbounds nuw i8, ptr %0, i64 8 store i64 %qalloc.i.1, ptr %8, align 4 - %qalloc.i.2 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.2 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1, !dbg !9 br i1 %not_max.not.not.i.2, label %cond_233_case_0.i, label %__barray_check_bounds.exit.2, !dbg !9 __barray_check_bounds.exit.2: ; preds = %cond_exit_20.1 - notail call void @___reset(i64 %qalloc.i.2), !dbg !9 + tail call void @___reset(i64 %qalloc.i.2), !dbg !9 %9 = load i64, ptr %1, align 4 %10 = and i64 %9, 4 %.not108 = icmp eq i64 %10, 0 @@ -66,12 +66,12 @@ cond_exit_20.2: ; preds = %__barray_check_boun store i64 %11, ptr %1, align 4 %12 = getelementptr inbounds nuw i8, ptr %0, i64 16 store i64 %qalloc.i.2, ptr %12, align 4 - %qalloc.i.3 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.3 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1, !dbg !9 br i1 %not_max.not.not.i.3, label %cond_233_case_0.i, label %__barray_check_bounds.exit.3, !dbg !9 __barray_check_bounds.exit.3: ; preds = %cond_exit_20.2 - notail call void @___reset(i64 %qalloc.i.3), !dbg !9 + tail call void @___reset(i64 %qalloc.i.3), !dbg !9 %13 = load i64, ptr %1, align 4 %14 = and i64 %13, 8 %.not109 = icmp eq i64 %14, 0 @@ -82,12 +82,12 @@ cond_exit_20.3: ; preds = %__barray_check_boun store i64 %15, ptr %1, align 4 %16 = getelementptr inbounds nuw i8, ptr %0, i64 24 store i64 %qalloc.i.3, ptr %16, align 4 - %qalloc.i.4 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.4 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1, !dbg !9 br i1 %not_max.not.not.i.4, label %cond_233_case_0.i, label %__barray_check_bounds.exit.4, !dbg !9 __barray_check_bounds.exit.4: ; preds = %cond_exit_20.3 - notail call void @___reset(i64 %qalloc.i.4), !dbg !9 + tail call void @___reset(i64 %qalloc.i.4), !dbg !9 %17 = load i64, ptr %1, align 4 %18 = and i64 %17, 16 %.not110 = icmp eq i64 %18, 0 @@ -98,12 +98,12 @@ cond_exit_20.4: ; preds = %__barray_check_boun store i64 %19, ptr %1, align 4 %20 = getelementptr inbounds nuw i8, ptr %0, i64 32 store i64 %qalloc.i.4, ptr %20, align 4 - %qalloc.i.5 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.5 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.5 = icmp eq i64 %qalloc.i.5, -1, !dbg !9 br i1 %not_max.not.not.i.5, label %cond_233_case_0.i, label %__barray_check_bounds.exit.5, !dbg !9 __barray_check_bounds.exit.5: ; preds = %cond_exit_20.4 - notail call void @___reset(i64 %qalloc.i.5), !dbg !9 + tail call void @___reset(i64 %qalloc.i.5), !dbg !9 %21 = load i64, ptr %1, align 4 %22 = and i64 %21, 32 %.not111 = icmp eq i64 %22, 0 @@ -114,12 +114,12 @@ cond_exit_20.5: ; preds = %__barray_check_boun store i64 %23, ptr %1, align 4 %24 = getelementptr inbounds nuw i8, ptr %0, i64 40 store i64 %qalloc.i.5, ptr %24, align 4 - %qalloc.i.6 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.6 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.6 = icmp eq i64 %qalloc.i.6, -1, !dbg !9 br i1 %not_max.not.not.i.6, label %cond_233_case_0.i, label %__barray_check_bounds.exit.6, !dbg !9 __barray_check_bounds.exit.6: ; preds = %cond_exit_20.5 - notail call void @___reset(i64 %qalloc.i.6), !dbg !9 + tail call void @___reset(i64 %qalloc.i.6), !dbg !9 %25 = load i64, ptr %1, align 4 %26 = and i64 %25, 64 %.not112 = icmp eq i64 %26, 0 @@ -130,12 +130,12 @@ cond_exit_20.6: ; preds = %__barray_check_boun store i64 %27, ptr %1, align 4 %28 = getelementptr inbounds nuw i8, ptr %0, i64 48 store i64 %qalloc.i.6, ptr %28, align 4 - %qalloc.i.7 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.7 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.7 = icmp eq i64 %qalloc.i.7, -1, !dbg !9 br i1 %not_max.not.not.i.7, label %cond_233_case_0.i, label %__barray_check_bounds.exit.7, !dbg !9 __barray_check_bounds.exit.7: ; preds = %cond_exit_20.6 - notail call void @___reset(i64 %qalloc.i.7), !dbg !9 + tail call void @___reset(i64 %qalloc.i.7), !dbg !9 %29 = load i64, ptr %1, align 4 %30 = and i64 %29, 128 %.not113 = icmp eq i64 %30, 0 @@ -146,12 +146,12 @@ cond_exit_20.7: ; preds = %__barray_check_boun store i64 %31, ptr %1, align 4 %32 = getelementptr inbounds nuw i8, ptr %0, i64 56 store i64 %qalloc.i.7, ptr %32, align 4 - %qalloc.i.8 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.8 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.8 = icmp eq i64 %qalloc.i.8, -1, !dbg !9 br i1 %not_max.not.not.i.8, label %cond_233_case_0.i, label %__barray_check_bounds.exit.8, !dbg !9 __barray_check_bounds.exit.8: ; preds = %cond_exit_20.7 - notail call void @___reset(i64 %qalloc.i.8), !dbg !9 + tail call void @___reset(i64 %qalloc.i.8), !dbg !9 %33 = load i64, ptr %1, align 4 %34 = and i64 %33, 256 %.not114 = icmp eq i64 %34, 0 @@ -162,12 +162,12 @@ cond_exit_20.8: ; preds = %__barray_check_boun store i64 %35, ptr %1, align 4 %36 = getelementptr inbounds nuw i8, ptr %0, i64 64 store i64 %qalloc.i.8, ptr %36, align 4 - %qalloc.i.9 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.9 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.9 = icmp eq i64 %qalloc.i.9, -1, !dbg !9 br i1 %not_max.not.not.i.9, label %cond_233_case_0.i, label %__barray_check_bounds.exit.9, !dbg !9 __barray_check_bounds.exit.9: ; preds = %cond_exit_20.8 - notail call void @___reset(i64 %qalloc.i.9), !dbg !9 + tail call void @___reset(i64 %qalloc.i.9), !dbg !9 %37 = load i64, ptr %1, align 4 %38 = and i64 %37, 512 %.not115 = icmp eq i64 %38, 0 @@ -193,7 +193,7 @@ __barray_mask_borrow.exit.1.i: ; preds = %cond_171_case_1.1.i store i64 %45, ptr %1, align 4, !dbg !21 %46 = getelementptr inbounds nuw i8, ptr %0, i64 8, !dbg !23 %47 = load i64, ptr %46, align 4, !dbg !23 - notail call void @___qfree(i64 %47), !dbg !24 + tail call void @___qfree(i64 %47), !dbg !24 %.pre337.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.2.i @@ -208,7 +208,7 @@ __barray_mask_borrow.exit.2.i: ; preds = %cond_171_case_1.2.i store i64 %50, ptr %1, align 4, !dbg !21 %51 = getelementptr inbounds nuw i8, ptr %0, i64 16, !dbg !23 %52 = load i64, ptr %51, align 4, !dbg !23 - notail call void @___qfree(i64 %52), !dbg !24 + tail call void @___qfree(i64 %52), !dbg !24 %.pre338.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.3.i @@ -223,7 +223,7 @@ __barray_mask_borrow.exit.3.i: ; preds = %cond_171_case_1.3.i store i64 %55, ptr %1, align 4, !dbg !21 %56 = getelementptr inbounds nuw i8, ptr %0, i64 24, !dbg !23 %57 = load i64, ptr %56, align 4, !dbg !23 - notail call void @___qfree(i64 %57), !dbg !24 + tail call void @___qfree(i64 %57), !dbg !24 %.pre339.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.4.i @@ -238,7 +238,7 @@ __barray_mask_borrow.exit.4.i: ; preds = %cond_171_case_1.4.i store i64 %60, ptr %1, align 4, !dbg !21 %61 = getelementptr inbounds nuw i8, ptr %0, i64 32, !dbg !23 %62 = load i64, ptr %61, align 4, !dbg !23 - notail call void @___qfree(i64 %62), !dbg !24 + tail call void @___qfree(i64 %62), !dbg !24 %.pre340.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.5.i @@ -253,7 +253,7 @@ __barray_mask_borrow.exit.5.i: ; preds = %cond_171_case_1.5.i store i64 %65, ptr %1, align 4, !dbg !21 %66 = getelementptr inbounds nuw i8, ptr %0, i64 40, !dbg !23 %67 = load i64, ptr %66, align 4, !dbg !23 - notail call void @___qfree(i64 %67), !dbg !24 + tail call void @___qfree(i64 %67), !dbg !24 %.pre341.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.6.i @@ -268,7 +268,7 @@ __barray_mask_borrow.exit.6.i: ; preds = %cond_171_case_1.6.i store i64 %70, ptr %1, align 4, !dbg !21 %71 = getelementptr inbounds nuw i8, ptr %0, i64 48, !dbg !23 %72 = load i64, ptr %71, align 4, !dbg !23 - notail call void @___qfree(i64 %72), !dbg !24 + tail call void @___qfree(i64 %72), !dbg !24 %.pre342.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.7.i @@ -283,7 +283,7 @@ __barray_mask_borrow.exit.7.i: ; preds = %cond_171_case_1.7.i store i64 %75, ptr %1, align 4, !dbg !21 %76 = getelementptr inbounds nuw i8, ptr %0, i64 56, !dbg !23 %77 = load i64, ptr %76, align 4, !dbg !23 - notail call void @___qfree(i64 %77), !dbg !24 + tail call void @___qfree(i64 %77), !dbg !24 %.pre343.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.8.i @@ -298,7 +298,7 @@ __barray_mask_borrow.exit.8.i: ; preds = %cond_171_case_1.8.i store i64 %80, ptr %1, align 4, !dbg !21 %81 = getelementptr inbounds nuw i8, ptr %0, i64 64, !dbg !23 %82 = load i64, ptr %81, align 4, !dbg !23 - notail call void @___qfree(i64 %82), !dbg !24 + tail call void @___qfree(i64 %82), !dbg !24 %.pre = load i64, ptr %1, align 4, !dbg !10 br label %__barray_check_bounds.exit.9.i @@ -313,7 +313,7 @@ __barray_mask_borrow.exit.9.i: ; preds = %__barray_check_boun store i64 %85, ptr %1, align 4, !dbg !21 %86 = getelementptr inbounds nuw i8, ptr %0, i64 72, !dbg !23 %87 = load i64, ptr %86, align 4, !dbg !23 - notail call void @___qfree(i64 %87), !dbg !24 + tail call void @___qfree(i64 %87), !dbg !24 %.pre344.i = load i64, ptr %1, align 4, !dbg !25 br label %cond_exit_156.i @@ -325,14 +325,14 @@ cond_exit_156.i: ; preds = %__barray_mask_borro br i1 %90, label %"__hugr__.guppylang.std.quantum.discard_array$10.113.exit", label %mask_block_err.i.i, !dbg !25 mask_block_err.i.i: ; preds = %cond_exit_156.i - notail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0"), !dbg !25 + tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0"), !dbg !25 unreachable, !dbg !25 __barray_mask_borrow.exit.i: ; preds = %cond_exit_20.9 %91 = or disjoint i64 %41, 1, !dbg !21 store i64 %91, ptr %1, align 4, !dbg !21 %92 = load i64, ptr %0, align 4, !dbg !23 - notail call void @___qfree(i64 %92), !dbg !24 + tail call void @___qfree(i64 %92), !dbg !24 %.pre.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.1.i @@ -358,7 +358,7 @@ declare void @___reset(i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !28 { entry: tail call void @setup(i64 %0), !dbg !32 - notail call void @"__hugr__.__main__.discard_qb_array..main.1"(), !dbg !32 + tail call void @"__hugr__.__main__.discard_qb_array..main.1"(), !dbg !32 %1 = tail call i64 @teardown(), !dbg !32 ret i64 %1, !dbg !32 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-flip_some/flip_some_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-flip_some/flip_some_x86_64-apple-darwin index f08e0b6f2..591fc3b9f 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-flip_some/flip_some_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-flip_some/flip_some_x86_64-apple-darwin @@ -11,69 +11,69 @@ target triple = "x86_64-apple-darwin" define void @"__hugr__.__main__.flip_some..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - %qalloc.i = notail call i64 @___qalloc(), !dbg !8 + %qalloc.i = tail call i64 @___qalloc(), !dbg !8 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 br i1 %not_max.not.not.i, label %cond_40_case_0.i, label %__hugr__.__tk2_qalloc.36.exit, !dbg !8 cond_40_case_0.i: ; preds = %alloca_block - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 unreachable, !dbg !8 __hugr__.__tk2_qalloc.36.exit: ; preds = %alloca_block - notail call void @___reset(i64 %qalloc.i), !dbg !8 - notail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00), !dbg !9 - %qalloc.i101 = notail call i64 @___qalloc(), !dbg !10 + tail call void @___reset(i64 %qalloc.i), !dbg !8 + tail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00), !dbg !9 + %qalloc.i101 = tail call i64 @___qalloc(), !dbg !10 %not_max.not.not.i102 = icmp eq i64 %qalloc.i101, -1, !dbg !10 br i1 %not_max.not.not.i102, label %cond_54_case_0.i, label %__hugr__.__tk2_qalloc.50.exit, !dbg !10 cond_54_case_0.i: ; preds = %__hugr__.__tk2_qalloc.36.exit - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !10 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !10 unreachable, !dbg !10 __hugr__.__tk2_qalloc.50.exit: ; preds = %__hugr__.__tk2_qalloc.36.exit - notail call void @___reset(i64 %qalloc.i101), !dbg !10 - %qalloc.i103 = notail call i64 @___qalloc(), !dbg !11 + tail call void @___reset(i64 %qalloc.i101), !dbg !10 + %qalloc.i103 = tail call i64 @___qalloc(), !dbg !11 %not_max.not.not.i104 = icmp eq i64 %qalloc.i103, -1, !dbg !11 br i1 %not_max.not.not.i104, label %cond_68_case_0.i, label %__hugr__.__tk2_qalloc.64.exit, !dbg !11 cond_68_case_0.i: ; preds = %__hugr__.__tk2_qalloc.50.exit - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !11 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !11 unreachable, !dbg !11 __hugr__.__tk2_qalloc.64.exit: ; preds = %__hugr__.__tk2_qalloc.50.exit - notail call void @___reset(i64 %qalloc.i103), !dbg !11 - notail call void @___rxy(i64 %qalloc.i103, double 0x400921FB54442D18, double 0.000000e+00), !dbg !12 - %qalloc.i105 = notail call i64 @___qalloc(), !dbg !13 + tail call void @___reset(i64 %qalloc.i103), !dbg !11 + tail call void @___rxy(i64 %qalloc.i103, double 0x400921FB54442D18, double 0.000000e+00), !dbg !12 + %qalloc.i105 = tail call i64 @___qalloc(), !dbg !13 %not_max.not.not.i106 = icmp eq i64 %qalloc.i105, -1, !dbg !13 br i1 %not_max.not.not.i106, label %cond_82_case_0.i, label %__hugr__.__tk2_qalloc.78.exit, !dbg !13 cond_82_case_0.i: ; preds = %__hugr__.__tk2_qalloc.64.exit - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !13 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !13 unreachable, !dbg !13 __hugr__.__tk2_qalloc.78.exit: ; preds = %__hugr__.__tk2_qalloc.64.exit - notail call void @___reset(i64 %qalloc.i105), !dbg !13 - %lazy_measure = notail call i64 @___lazy_measure(i64 %qalloc.i) - notail call void @___qfree(i64 %qalloc.i) + tail call void @___reset(i64 %qalloc.i105), !dbg !13 + %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) - notail call void @___dec_future_refcount(i64 %lazy_measure) - notail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool), !dbg !14 - %lazy_measure22 = notail call i64 @___lazy_measure(i64 %qalloc.i101) - notail call void @___qfree(i64 %qalloc.i101) + 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), !dbg !14 + %lazy_measure22 = tail call i64 @___lazy_measure(i64 %qalloc.i101) + tail call void @___qfree(i64 %qalloc.i101) %read_bool35 = tail call i1 @___read_future_bool(i64 %lazy_measure22) - notail call void @___dec_future_refcount(i64 %lazy_measure22) - notail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool35), !dbg !15 - %lazy_measure44 = notail call i64 @___lazy_measure(i64 %qalloc.i103) - notail call void @___qfree(i64 %qalloc.i103) + tail call void @___dec_future_refcount(i64 %lazy_measure22) + tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool35), !dbg !15 + %lazy_measure44 = tail call i64 @___lazy_measure(i64 %qalloc.i103) + tail call void @___qfree(i64 %qalloc.i103) %read_bool57 = tail call i1 @___read_future_bool(i64 %lazy_measure44) - notail call void @___dec_future_refcount(i64 %lazy_measure44) - notail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool57), !dbg !16 - notail call void @___rxy(i64 %qalloc.i105, double 0x400921FB54442D18, double 0.000000e+00), !dbg !17 - %lazy_measure67 = notail call i64 @___lazy_measure(i64 %qalloc.i105) - notail call void @___qfree(i64 %qalloc.i105) + tail call void @___dec_future_refcount(i64 %lazy_measure44) + tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool57), !dbg !16 + tail call void @___rxy(i64 %qalloc.i105, double 0x400921FB54442D18, double 0.000000e+00), !dbg !17 + %lazy_measure67 = tail call i64 @___lazy_measure(i64 %qalloc.i105) + tail call void @___qfree(i64 %qalloc.i105) %read_bool80 = tail call i1 @___read_future_bool(i64 %lazy_measure67) - notail call void @___dec_future_refcount(i64 %lazy_measure67) - notail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool80), !dbg !18 + tail call void @___dec_future_refcount(i64 %lazy_measure67) + tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool80), !dbg !18 ret void } @@ -99,7 +99,7 @@ declare void @___rxy(i64, double, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !19 { entry: tail call void @setup(i64 %0), !dbg !24 - notail call void @"__hugr__.__main__.flip_some..main.1"(), !dbg !24 + tail call void @"__hugr__.__main__.flip_some..main.1"(), !dbg !24 %1 = tail call i64 @teardown(), !dbg !24 ret i64 %1, !dbg !24 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-measure_qb_array/measure_qb_array_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-measure_qb_array/measure_qb_array_x86_64-apple-darwin index e9078a70e..f3acc089a 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-measure_qb_array/measure_qb_array_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-measure_qb_array/measure_qb_array_x86_64-apple-darwin @@ -13,34 +13,34 @@ alloca_block: %0 = tail call ptr @heap_alloc(i64 80), !dbg !8 %1 = tail call ptr @heap_alloc(i64 8), !dbg !8 store i64 -1, ptr %1, align 1, !dbg !8 - %qalloc.i = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !9 br i1 %not_max.not.not.i, label %cond_299_case_0.i, label %__barray_check_bounds.exit, !dbg !9 cond_299_case_0.i: ; preds = %cond_exit_20.8, %cond_exit_20.7, %cond_exit_20.6, %cond_exit_20.5, %cond_exit_20.4, %cond_exit_20.3, %cond_exit_20.2, %cond_exit_20.1, %cond_exit_20, %alloca_block - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 unreachable, !dbg !9 __barray_check_bounds.exit: ; preds = %alloca_block - notail call void @___reset(i64 %qalloc.i), !dbg !9 + tail call void @___reset(i64 %qalloc.i), !dbg !9 %2 = load i64, ptr %1, align 4 %3 = trunc i64 %2 to i1 br i1 %3, label %cond_exit_20, 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 - notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable cond_exit_20: ; preds = %__barray_check_bounds.exit %4 = and i64 %2, -2 store i64 %4, ptr %1, align 4 store i64 %qalloc.i, ptr %0, align 4 - %qalloc.i.1 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.1 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1, !dbg !9 br i1 %not_max.not.not.i.1, label %cond_299_case_0.i, label %__barray_check_bounds.exit.1, !dbg !9 __barray_check_bounds.exit.1: ; preds = %cond_exit_20 - notail call void @___reset(i64 %qalloc.i.1), !dbg !9 + tail call void @___reset(i64 %qalloc.i.1), !dbg !9 %5 = load i64, ptr %1, align 4 %6 = and i64 %5, 2 %.not299 = icmp eq i64 %6, 0 @@ -51,12 +51,12 @@ cond_exit_20.1: ; preds = %__barray_check_boun store i64 %7, ptr %1, align 4 %8 = getelementptr inbounds nuw i8, ptr %0, i64 8 store i64 %qalloc.i.1, ptr %8, align 4 - %qalloc.i.2 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.2 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1, !dbg !9 br i1 %not_max.not.not.i.2, label %cond_299_case_0.i, label %__barray_check_bounds.exit.2, !dbg !9 __barray_check_bounds.exit.2: ; preds = %cond_exit_20.1 - notail call void @___reset(i64 %qalloc.i.2), !dbg !9 + tail call void @___reset(i64 %qalloc.i.2), !dbg !9 %9 = load i64, ptr %1, align 4 %10 = and i64 %9, 4 %.not300 = icmp eq i64 %10, 0 @@ -67,12 +67,12 @@ cond_exit_20.2: ; preds = %__barray_check_boun store i64 %11, ptr %1, align 4 %12 = getelementptr inbounds nuw i8, ptr %0, i64 16 store i64 %qalloc.i.2, ptr %12, align 4 - %qalloc.i.3 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.3 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1, !dbg !9 br i1 %not_max.not.not.i.3, label %cond_299_case_0.i, label %__barray_check_bounds.exit.3, !dbg !9 __barray_check_bounds.exit.3: ; preds = %cond_exit_20.2 - notail call void @___reset(i64 %qalloc.i.3), !dbg !9 + tail call void @___reset(i64 %qalloc.i.3), !dbg !9 %13 = load i64, ptr %1, align 4 %14 = and i64 %13, 8 %.not301 = icmp eq i64 %14, 0 @@ -83,12 +83,12 @@ cond_exit_20.3: ; preds = %__barray_check_boun store i64 %15, ptr %1, align 4 %16 = getelementptr inbounds nuw i8, ptr %0, i64 24 store i64 %qalloc.i.3, ptr %16, align 4 - %qalloc.i.4 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.4 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1, !dbg !9 br i1 %not_max.not.not.i.4, label %cond_299_case_0.i, label %__barray_check_bounds.exit.4, !dbg !9 __barray_check_bounds.exit.4: ; preds = %cond_exit_20.3 - notail call void @___reset(i64 %qalloc.i.4), !dbg !9 + tail call void @___reset(i64 %qalloc.i.4), !dbg !9 %17 = load i64, ptr %1, align 4 %18 = and i64 %17, 16 %.not302 = icmp eq i64 %18, 0 @@ -99,12 +99,12 @@ cond_exit_20.4: ; preds = %__barray_check_boun store i64 %19, ptr %1, align 4 %20 = getelementptr inbounds nuw i8, ptr %0, i64 32 store i64 %qalloc.i.4, ptr %20, align 4 - %qalloc.i.5 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.5 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.5 = icmp eq i64 %qalloc.i.5, -1, !dbg !9 br i1 %not_max.not.not.i.5, label %cond_299_case_0.i, label %__barray_check_bounds.exit.5, !dbg !9 __barray_check_bounds.exit.5: ; preds = %cond_exit_20.4 - notail call void @___reset(i64 %qalloc.i.5), !dbg !9 + tail call void @___reset(i64 %qalloc.i.5), !dbg !9 %21 = load i64, ptr %1, align 4 %22 = and i64 %21, 32 %.not303 = icmp eq i64 %22, 0 @@ -115,12 +115,12 @@ cond_exit_20.5: ; preds = %__barray_check_boun store i64 %23, ptr %1, align 4 %24 = getelementptr inbounds nuw i8, ptr %0, i64 40 store i64 %qalloc.i.5, ptr %24, align 4 - %qalloc.i.6 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.6 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.6 = icmp eq i64 %qalloc.i.6, -1, !dbg !9 br i1 %not_max.not.not.i.6, label %cond_299_case_0.i, label %__barray_check_bounds.exit.6, !dbg !9 __barray_check_bounds.exit.6: ; preds = %cond_exit_20.5 - notail call void @___reset(i64 %qalloc.i.6), !dbg !9 + tail call void @___reset(i64 %qalloc.i.6), !dbg !9 %25 = load i64, ptr %1, align 4 %26 = and i64 %25, 64 %.not304 = icmp eq i64 %26, 0 @@ -131,12 +131,12 @@ cond_exit_20.6: ; preds = %__barray_check_boun store i64 %27, ptr %1, align 4 %28 = getelementptr inbounds nuw i8, ptr %0, i64 48 store i64 %qalloc.i.6, ptr %28, align 4 - %qalloc.i.7 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.7 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.7 = icmp eq i64 %qalloc.i.7, -1, !dbg !9 br i1 %not_max.not.not.i.7, label %cond_299_case_0.i, label %__barray_check_bounds.exit.7, !dbg !9 __barray_check_bounds.exit.7: ; preds = %cond_exit_20.6 - notail call void @___reset(i64 %qalloc.i.7), !dbg !9 + tail call void @___reset(i64 %qalloc.i.7), !dbg !9 %29 = load i64, ptr %1, align 4 %30 = and i64 %29, 128 %.not305 = icmp eq i64 %30, 0 @@ -147,12 +147,12 @@ cond_exit_20.7: ; preds = %__barray_check_boun store i64 %31, ptr %1, align 4 %32 = getelementptr inbounds nuw i8, ptr %0, i64 56 store i64 %qalloc.i.7, ptr %32, align 4 - %qalloc.i.8 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.8 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.8 = icmp eq i64 %qalloc.i.8, -1, !dbg !9 br i1 %not_max.not.not.i.8, label %cond_299_case_0.i, label %__barray_check_bounds.exit.8, !dbg !9 __barray_check_bounds.exit.8: ; preds = %cond_exit_20.7 - notail call void @___reset(i64 %qalloc.i.8), !dbg !9 + tail call void @___reset(i64 %qalloc.i.8), !dbg !9 %33 = load i64, ptr %1, align 4 %34 = and i64 %33, 256 %.not306 = icmp eq i64 %34, 0 @@ -163,12 +163,12 @@ cond_exit_20.8: ; preds = %__barray_check_boun store i64 %35, ptr %1, align 4 %36 = getelementptr inbounds nuw i8, ptr %0, i64 64 store i64 %qalloc.i.8, ptr %36, align 4 - %qalloc.i.9 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.9 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.9 = icmp eq i64 %qalloc.i.9, -1, !dbg !9 br i1 %not_max.not.not.i.9, label %cond_299_case_0.i, label %__barray_check_bounds.exit.9, !dbg !9 __barray_check_bounds.exit.9: ; preds = %cond_exit_20.8 - notail call void @___reset(i64 %qalloc.i.9), !dbg !9 + tail call void @___reset(i64 %qalloc.i.9), !dbg !9 %37 = load i64, ptr %1, align 4 %38 = and i64 %37, 512 %.not307 = icmp eq i64 %38, 0 @@ -187,20 +187,20 @@ cond_exit_20.9: ; preds = %__barray_check_boun br i1 %42, label %panic.i238, label %__barray_mask_borrow.exit, !dbg !10 panic.i238: ; preds = %cond_exit_20.9 - notail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !10 + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !10 unreachable, !dbg !10 __barray_mask_borrow.exit: ; preds = %cond_exit_20.9 %43 = or disjoint i64 %41, 1, !dbg !10 store i64 %43, ptr %1, align 4, !dbg !10 %44 = load i64, ptr %0, align 4, !dbg !12 - notail call void @___rxy(i64 %44, double 0x400921FB54442D18, double 0.000000e+00), !dbg !13 + tail call void @___rxy(i64 %44, double 0x400921FB54442D18, double 0.000000e+00), !dbg !13 %45 = load i64, ptr %1, align 4, !dbg !12 %46 = trunc i64 %45 to i1, !dbg !12 br i1 %46, label %__barray_mask_return.exit240, label %panic.i239, !dbg !12 panic.i239: ; preds = %__barray_mask_borrow.exit - notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !12 + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !12 unreachable, !dbg !12 __barray_mask_return.exit240: ; preds = %__barray_mask_borrow.exit @@ -213,7 +213,7 @@ __barray_mask_return.exit240: ; preds = %__barray_mask_borro br i1 %.not, label %__barray_mask_borrow.exit242, label %panic.i241, !dbg !14 panic.i241: ; preds = %__barray_mask_return.exit240 - notail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !14 + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !14 unreachable, !dbg !14 __barray_mask_borrow.exit242: ; preds = %__barray_mask_return.exit240 @@ -221,14 +221,14 @@ __barray_mask_borrow.exit242: ; preds = %__barray_mask_retur store i64 %50, ptr %1, align 4, !dbg !14 %51 = getelementptr inbounds nuw i8, ptr %0, i64 16, !dbg !16 %52 = load i64, ptr %51, align 4, !dbg !16 - notail call void @___rxy(i64 %52, double 0x400921FB54442D18, double 0.000000e+00), !dbg !17 + tail call void @___rxy(i64 %52, double 0x400921FB54442D18, double 0.000000e+00), !dbg !17 %53 = load i64, ptr %1, align 4, !dbg !16 %54 = and i64 %53, 4, !dbg !16 %.not268 = icmp eq i64 %54, 0, !dbg !16 br i1 %.not268, label %panic.i243, label %__barray_mask_return.exit244, !dbg !16 panic.i243: ; preds = %__barray_mask_borrow.exit242 - notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !16 + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !16 unreachable, !dbg !16 __barray_mask_return.exit244: ; preds = %__barray_mask_borrow.exit242 @@ -241,7 +241,7 @@ __barray_mask_return.exit244: ; preds = %__barray_mask_borro br i1 %.not269, label %__barray_mask_borrow.exit246, label %panic.i245, !dbg !18 panic.i245: ; preds = %__barray_mask_return.exit244 - notail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !18 + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !18 unreachable, !dbg !18 __barray_mask_borrow.exit246: ; preds = %__barray_mask_return.exit244 @@ -249,14 +249,14 @@ __barray_mask_borrow.exit246: ; preds = %__barray_mask_retur store i64 %58, ptr %1, align 4, !dbg !18 %59 = getelementptr inbounds nuw i8, ptr %0, i64 24, !dbg !20 %60 = load i64, ptr %59, align 4, !dbg !20 - notail call void @___rxy(i64 %60, double 0x400921FB54442D18, double 0.000000e+00), !dbg !21 + tail call void @___rxy(i64 %60, double 0x400921FB54442D18, double 0.000000e+00), !dbg !21 %61 = load i64, ptr %1, align 4, !dbg !20 %62 = and i64 %61, 8, !dbg !20 %.not270 = icmp eq i64 %62, 0, !dbg !20 br i1 %.not270, label %panic.i247, label %__barray_mask_return.exit248, !dbg !20 panic.i247: ; preds = %__barray_mask_borrow.exit246 - notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !20 + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !20 unreachable, !dbg !20 __barray_mask_return.exit248: ; preds = %__barray_mask_borrow.exit246 @@ -269,7 +269,7 @@ __barray_mask_return.exit248: ; preds = %__barray_mask_borro br i1 %.not271, label %__barray_mask_borrow.exit250, label %panic.i249, !dbg !22 panic.i249: ; preds = %__barray_mask_return.exit248 - notail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !22 + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !22 unreachable, !dbg !22 __barray_mask_borrow.exit250: ; preds = %__barray_mask_return.exit248 @@ -277,14 +277,14 @@ __barray_mask_borrow.exit250: ; preds = %__barray_mask_retur store i64 %66, ptr %1, align 4, !dbg !22 %67 = getelementptr inbounds nuw i8, ptr %0, i64 72, !dbg !24 %68 = load i64, ptr %67, align 4, !dbg !24 - notail call void @___rxy(i64 %68, double 0x400921FB54442D18, double 0.000000e+00), !dbg !25 + tail call void @___rxy(i64 %68, double 0x400921FB54442D18, double 0.000000e+00), !dbg !25 %69 = load i64, ptr %1, align 4, !dbg !24 %70 = and i64 %69, 512, !dbg !24 %.not272 = icmp eq i64 %70, 0, !dbg !24 br i1 %.not272, label %panic.i251, label %__barray_mask_return.exit252, !dbg !24 panic.i251: ; preds = %__barray_mask_borrow.exit250 - notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !24 + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !24 unreachable, !dbg !24 __barray_mask_return.exit252: ; preds = %__barray_mask_borrow.exit250 @@ -335,7 +335,7 @@ mask_block_ok.i.i.i: ; preds = %75, %93 br i1 %96, label %93, label %mask_block_err.i.i.i, !dbg !44 mask_block_err.i.i.i: ; preds = %mask_block_ok.i.i.i - notail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0"), !dbg !44 + tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0"), !dbg !44 unreachable, !dbg !44 __barray_check_bounds.exit.i.i: ; preds = %loop_body.i, %__barray_mask_return.exit252 @@ -355,7 +355,7 @@ __barray_check_bounds.exit.i.i: ; preds = %loop_body.i, %__bar br i1 %104, label %panic.i.i.i, label %__barray_check_bounds.exit.i, !dbg !56 panic.i.i.i: ; preds = %__barray_check_bounds.exit.i.i - notail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !56 + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !56 unreachable, !dbg !56 __barray_check_bounds.exit.i: ; preds = %__barray_check_bounds.exit.i.i @@ -364,15 +364,15 @@ __barray_check_bounds.exit.i: ; preds = %__barray_check_boun store i64 %106, ptr %100, align 4, !dbg !56 %107 = getelementptr inbounds i64, ptr %.fca.0.extract80.i185.i, i64 %98, !dbg !55 %108 = load i64, ptr %107, align 4, !dbg !55 - %lazy_measure.i = notail call i64 @___lazy_measure(i64 %108) - notail call void @___qfree(i64 %108) + %lazy_measure.i = tail call i64 @___lazy_measure(i64 %108) + tail call void @___qfree(i64 %108) %109 = load i64, ptr %74, align 4 %110 = lshr i64 %109, %"163_0.sroa.15.0184.i" %111 = trunc i64 %110 to i1 br i1 %111, label %loop_body.i, label %panic.i.i panic.i.i: ; preds = %__barray_check_bounds.exit.i - notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable loop_body.i: ; preds = %__barray_check_bounds.exit.i @@ -404,7 +404,7 @@ cond_exit_369: ; preds = %cond_exit_369.threa ret void mask_block_err.i: ; preds = %cond_exit_369.thread.9 - notail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") + tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable __barray_mask_borrow.exit259: ; preds = %"__hugr__.guppylang.std.quantum.measure_array$10.149.exit" @@ -430,7 +430,7 @@ __barray_mask_borrow.exit259.1: ; preds = %cond_exit_369.threa cond_392_case_1.1: ; preds = %__barray_mask_borrow.exit259.1 %.fca.1.extract.1 = extractvalue { i1, i64, i1 } %125, 1 - notail call void @___dec_future_refcount(i64 %.fca.1.extract.1) + tail call void @___dec_future_refcount(i64 %.fca.1.extract.1) %.pre281 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.1 @@ -450,7 +450,7 @@ __barray_mask_borrow.exit259.2: ; preds = %cond_exit_369.threa cond_392_case_1.2: ; preds = %__barray_mask_borrow.exit259.2 %.fca.1.extract.2 = extractvalue { i1, i64, i1 } %130, 1 - notail call void @___dec_future_refcount(i64 %.fca.1.extract.2) + tail call void @___dec_future_refcount(i64 %.fca.1.extract.2) %.pre282 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.2 @@ -470,7 +470,7 @@ __barray_mask_borrow.exit259.3: ; preds = %cond_exit_369.threa cond_392_case_1.3: ; preds = %__barray_mask_borrow.exit259.3 %.fca.1.extract.3 = extractvalue { i1, i64, i1 } %135, 1 - notail call void @___dec_future_refcount(i64 %.fca.1.extract.3) + tail call void @___dec_future_refcount(i64 %.fca.1.extract.3) %.pre283 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.3 @@ -490,7 +490,7 @@ __barray_mask_borrow.exit259.4: ; preds = %cond_exit_369.threa cond_392_case_1.4: ; preds = %__barray_mask_borrow.exit259.4 %.fca.1.extract.4 = extractvalue { i1, i64, i1 } %140, 1 - notail call void @___dec_future_refcount(i64 %.fca.1.extract.4) + tail call void @___dec_future_refcount(i64 %.fca.1.extract.4) %.pre284 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.4 @@ -510,7 +510,7 @@ __barray_mask_borrow.exit259.5: ; preds = %cond_exit_369.threa cond_392_case_1.5: ; preds = %__barray_mask_borrow.exit259.5 %.fca.1.extract.5 = extractvalue { i1, i64, i1 } %145, 1 - notail call void @___dec_future_refcount(i64 %.fca.1.extract.5) + tail call void @___dec_future_refcount(i64 %.fca.1.extract.5) %.pre285 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.5 @@ -530,7 +530,7 @@ __barray_mask_borrow.exit259.6: ; preds = %cond_exit_369.threa cond_392_case_1.6: ; preds = %__barray_mask_borrow.exit259.6 %.fca.1.extract.6 = extractvalue { i1, i64, i1 } %150, 1 - notail call void @___dec_future_refcount(i64 %.fca.1.extract.6) + tail call void @___dec_future_refcount(i64 %.fca.1.extract.6) %.pre286 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.6 @@ -550,7 +550,7 @@ __barray_mask_borrow.exit259.7: ; preds = %cond_exit_369.threa cond_392_case_1.7: ; preds = %__barray_mask_borrow.exit259.7 %.fca.1.extract.7 = extractvalue { i1, i64, i1 } %155, 1 - notail call void @___dec_future_refcount(i64 %.fca.1.extract.7) + tail call void @___dec_future_refcount(i64 %.fca.1.extract.7) %.pre287 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.7 @@ -570,7 +570,7 @@ __barray_mask_borrow.exit259.8: ; preds = %cond_exit_369.threa cond_392_case_1.8: ; preds = %__barray_mask_borrow.exit259.8 %.fca.1.extract.8 = extractvalue { i1, i64, i1 } %160, 1 - notail call void @___dec_future_refcount(i64 %.fca.1.extract.8) + tail call void @___dec_future_refcount(i64 %.fca.1.extract.8) %.pre288 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.8 @@ -590,7 +590,7 @@ __barray_mask_borrow.exit259.9: ; preds = %cond_exit_369.threa cond_392_case_1.9: ; preds = %__barray_mask_borrow.exit259.9 %.fca.1.extract.9 = extractvalue { i1, i64, i1 } %165, 1 - notail call void @___dec_future_refcount(i64 %.fca.1.extract.9) + tail call void @___dec_future_refcount(i64 %.fca.1.extract.9) %.pre289 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.9 @@ -603,7 +603,7 @@ cond_exit_369.thread.9: ; preds = %cond_392_case_1.9, cond_392_case_1: ; preds = %__barray_mask_borrow.exit259 %.fca.1.extract = extractvalue { i1, i64, i1 } %120, 1 - notail call void @___dec_future_refcount(i64 %.fca.1.extract) + tail call void @___dec_future_refcount(i64 %.fca.1.extract) %.pre = load i64, ptr %74, align 4 br label %cond_exit_369.thread } @@ -630,7 +630,7 @@ declare void @___reset(i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !59 { entry: tail call void @setup(i64 %0), !dbg !63 - notail call void @"__hugr__.__main__.measure_qb_array..main.1"(), !dbg !63 + tail call void @"__hugr__.__main__.measure_qb_array..main.1"(), !dbg !63 %1 = tail call i64 @teardown(), !dbg !63 ret i64 %1, !dbg !63 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-no_results/no_results_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-no_results/no_results_x86_64-apple-darwin index f05627053..a4231ba53 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-no_results/no_results_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-no_results/no_results_x86_64-apple-darwin @@ -7,21 +7,21 @@ target triple = "x86_64-apple-darwin" define void @"__hugr__.__main__.no_results..bar.1"() local_unnamed_addr !dbg !4 { alloca_block: - %qalloc.i = notail call i64 @___qalloc(), !dbg !8 + %qalloc.i = tail call i64 @___qalloc(), !dbg !8 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 br i1 %not_max.not.not.i, label %cond_18_case_0.i, label %__hugr__.__tk2_qalloc.14.exit, !dbg !8 cond_18_case_0.i: ; preds = %alloca_block - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 unreachable, !dbg !8 __hugr__.__tk2_qalloc.14.exit: ; preds = %alloca_block - notail call void @___reset(i64 %qalloc.i), !dbg !8 - notail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 - notail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 - %lazy_measure = notail call i64 @___lazy_measure(i64 %qalloc.i) - notail call void @___qfree(i64 %qalloc.i) - notail call void @___dec_future_refcount(i64 %lazy_measure) + tail call void @___reset(i64 %qalloc.i), !dbg !8 + tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 + tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 + %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) ret void } @@ -45,7 +45,7 @@ declare void @___rz(i64, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !10 { entry: tail call void @setup(i64 %0), !dbg !15 - notail call void @"__hugr__.__main__.no_results..bar.1"(), !dbg !15 + tail call void @"__hugr__.__main__.no_results..bar.1"(), !dbg !15 %1 = tail call i64 @teardown(), !dbg !15 ret i64 %1, !dbg !15 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-postselect_exit/postselect_exit_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-postselect_exit/postselect_exit_x86_64-apple-darwin index f16c1a87f..871710e73 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-postselect_exit/postselect_exit_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-postselect_exit/postselect_exit_x86_64-apple-darwin @@ -9,33 +9,33 @@ target triple = "x86_64-apple-darwin" define void @"__hugr__.__main__.postselect_exit..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - %qalloc.i = notail call i64 @___qalloc(), !dbg !8 + %qalloc.i = tail call i64 @___qalloc(), !dbg !8 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 br i1 %not_max.not.not.i, label %cond_45_case_0.i, label %__hugr__.__tk2_qalloc.41.exit, !dbg !8 cond_45_case_0.i: ; preds = %alloca_block - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 unreachable, !dbg !8 __hugr__.__tk2_qalloc.41.exit: ; preds = %alloca_block - notail call void @___reset(i64 %qalloc.i), !dbg !8 - notail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 - notail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 - %lazy_measure = notail call i64 @___lazy_measure(i64 %qalloc.i) - notail call void @___qfree(i64 %qalloc.i) - notail call void @___inc_future_refcount(i64 %lazy_measure) + tail call void @___reset(i64 %qalloc.i), !dbg !8 + tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 + tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 + %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + tail call void @___qfree(i64 %qalloc.i) + tail call void @___inc_future_refcount(i64 %lazy_measure) %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - notail call void @___dec_future_refcount(i64 %lazy_measure) + tail call void @___dec_future_refcount(i64 %lazy_measure) br i1 %read_bool, label %0, label %cond_98_case_1 cond_98_case_1: ; preds = %__hugr__.__tk2_qalloc.41.exit %read_bool66 = tail call i1 @___read_future_bool(i64 %lazy_measure) - notail call void @___dec_future_refcount(i64 %lazy_measure) - notail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool66), !dbg !10 + tail call void @___dec_future_refcount(i64 %lazy_measure) + tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool66), !dbg !10 ret void 0: ; preds = %__hugr__.__tk2_qalloc.41.exit - notail call void @panic(i32 42, ptr nonnull @s_Postselect.13DF1CD0.0), !dbg !11 + tail call void @panic(i32 42, ptr nonnull @s_Postselect.13DF1CD0.0), !dbg !11 unreachable } @@ -65,7 +65,7 @@ declare void @___rz(i64, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !12 { entry: tail call void @setup(i64 %0), !dbg !17 - notail call void @"__hugr__.__main__.postselect_exit..main.1"(), !dbg !17 + tail call void @"__hugr__.__main__.postselect_exit..main.1"(), !dbg !17 %1 = tail call i64 @teardown(), !dbg !17 ret i64 %1, !dbg !17 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-postselect_panic/postselect_panic_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-postselect_panic/postselect_panic_x86_64-apple-darwin index 60add1725..f22baba7c 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-postselect_panic/postselect_panic_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-postselect_panic/postselect_panic_x86_64-apple-darwin @@ -9,33 +9,33 @@ target triple = "x86_64-apple-darwin" define void @"__hugr__.__main__.postselect_panic..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - %qalloc.i = notail call i64 @___qalloc(), !dbg !8 + %qalloc.i = tail call i64 @___qalloc(), !dbg !8 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 br i1 %not_max.not.not.i, label %cond_43_case_0.i, label %__hugr__.__tk2_qalloc.39.exit, !dbg !8 cond_43_case_0.i: ; preds = %alloca_block - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 unreachable, !dbg !8 __hugr__.__tk2_qalloc.39.exit: ; preds = %alloca_block - notail call void @___reset(i64 %qalloc.i), !dbg !8 - notail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 - notail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 - %lazy_measure = notail call i64 @___lazy_measure(i64 %qalloc.i) - notail call void @___qfree(i64 %qalloc.i) - notail call void @___inc_future_refcount(i64 %lazy_measure) + tail call void @___reset(i64 %qalloc.i), !dbg !8 + tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 + tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 + %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + tail call void @___qfree(i64 %qalloc.i) + tail call void @___inc_future_refcount(i64 %lazy_measure) %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - notail call void @___dec_future_refcount(i64 %lazy_measure) + tail call void @___dec_future_refcount(i64 %lazy_measure) br i1 %read_bool, label %0, label %cond_96_case_1 cond_96_case_1: ; preds = %__hugr__.__tk2_qalloc.39.exit %read_bool65 = tail call i1 @___read_future_bool(i64 %lazy_measure) - notail call void @___dec_future_refcount(i64 %lazy_measure) - notail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool65), !dbg !10 + tail call void @___dec_future_refcount(i64 %lazy_measure) + tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool65), !dbg !10 ret void 0: ; preds = %__hugr__.__tk2_qalloc.39.exit - notail call void @panic(i32 1001, ptr nonnull @s_Postselect.13DF1CD0.0), !dbg !11 + tail call void @panic(i32 1001, ptr nonnull @s_Postselect.13DF1CD0.0), !dbg !11 unreachable } @@ -65,7 +65,7 @@ declare void @___rz(i64, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !12 { entry: tail call void @setup(i64 %0), !dbg !17 - notail call void @"__hugr__.__main__.postselect_panic..main.1"(), !dbg !17 + tail call void @"__hugr__.__main__.postselect_panic..main.1"(), !dbg !17 %1 = tail call i64 @teardown(), !dbg !17 ret i64 %1, !dbg !17 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-print_current_shot/print_current_shot_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-print_current_shot/print_current_shot_x86_64-apple-darwin index 7095ecd35..bfef10ffc 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-print_current_shot/print_current_shot_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-print_current_shot/print_current_shot_x86_64-apple-darwin @@ -7,8 +7,8 @@ target triple = "x86_64-apple-darwin" define void @"__hugr__.__main__.print_current_shot..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - %shot = notail call i64 @get_current_shot(), !dbg !8 - notail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot), !dbg !9 + %shot = tail call i64 @get_current_shot(), !dbg !8 + tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot), !dbg !9 ret void } @@ -19,8 +19,8 @@ declare void @print_int(ptr, i64, i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !10 { entry: tail call void @setup(i64 %0), !dbg !15 - %shot.i = notail call i64 @get_current_shot(), !dbg !16 - notail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot.i), !dbg !18 + %shot.i = tail call i64 @get_current_shot(), !dbg !16 + tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot.i), !dbg !18 %1 = tail call i64 @teardown(), !dbg !15 ret i64 %1, !dbg !15 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-rng/rng_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-rng/rng_x86_64-apple-darwin index 4e59cc7f6..2543ea77b 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-rng/rng_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-rng/rng_x86_64-apple-darwin @@ -13,27 +13,27 @@ target triple = "x86_64-apple-darwin" define void @"__hugr__.__main__.rng..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - notail call void @random_seed(i64 42), !dbg !8 - %rint = notail call i32 @random_int(), !dbg !17 - %rint14 = notail call i32 @random_int(), !dbg !18 - %rfloat = notail call double @random_float(), !dbg !19 - %rintb = notail call i32 @random_rng(i32 100), !dbg !20 + tail call void @random_seed(i64 42), !dbg !8 + %rint = tail call i32 @random_int(), !dbg !17 + %rint14 = tail call i32 @random_int(), !dbg !18 + %rfloat = tail call double @random_float(), !dbg !19 + %rintb = tail call i32 @random_rng(i32 100), !dbg !20 %0 = sext i32 %rintb to i64, !dbg !20 %1 = sext i32 %rint14 to i64, !dbg !18 %2 = sext i32 %rint to i64, !dbg !17 - notail call void @print_int(ptr nonnull @res_rint.B928E41E.0, i64 13, i64 %2), !dbg !21 - notail call void @print_int(ptr nonnull @res_rint1.0884EC03.0, i64 14, i64 %1), !dbg !22 - notail call void @print_float(ptr nonnull @res_rfloat.F0E4DD2C.0, i64 17, double %rfloat), !dbg !23 - notail call void @print_int(ptr nonnull @res_rint_bnd.CB1E6B0D.0, i64 17, i64 %0), !dbg !24 - notail call void @random_seed(i64 84), !dbg !25 - %rint47 = notail call i32 @random_int(), !dbg !27 - %rfloat49 = notail call double @random_float(), !dbg !28 - %rintb52 = notail call i32 @random_rng(i32 200), !dbg !29 + tail call void @print_int(ptr nonnull @res_rint.B928E41E.0, i64 13, i64 %2), !dbg !21 + tail call void @print_int(ptr nonnull @res_rint1.0884EC03.0, i64 14, i64 %1), !dbg !22 + tail call void @print_float(ptr nonnull @res_rfloat.F0E4DD2C.0, i64 17, double %rfloat), !dbg !23 + tail call void @print_int(ptr nonnull @res_rint_bnd.CB1E6B0D.0, i64 17, i64 %0), !dbg !24 + tail call void @random_seed(i64 84), !dbg !25 + %rint47 = tail call i32 @random_int(), !dbg !27 + %rfloat49 = tail call double @random_float(), !dbg !28 + %rintb52 = tail call i32 @random_rng(i32 200), !dbg !29 %3 = sext i32 %rintb52 to i64, !dbg !29 %4 = sext i32 %rint47 to i64, !dbg !27 - notail call void @print_int(ptr nonnull @res_rint2.F0335598.0, i64 14, i64 %4), !dbg !30 - notail call void @print_float(ptr nonnull @res_rfloat2.4DAB941F.0, i64 18, double %rfloat49), !dbg !31 - notail call void @print_int(ptr nonnull @res_rint_bnd2.169DE399.0, i64 18, i64 %3), !dbg !32 + tail call void @print_int(ptr nonnull @res_rint2.F0335598.0, i64 14, i64 %4), !dbg !30 + tail call void @print_float(ptr nonnull @res_rfloat2.4DAB941F.0, i64 18, double %rfloat49), !dbg !31 + tail call void @print_int(ptr nonnull @res_rint_bnd2.169DE399.0, i64 18, i64 %3), !dbg !32 ret void } @@ -52,7 +52,7 @@ declare void @random_seed(i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !33 { entry: tail call void @setup(i64 %0), !dbg !37 - notail call void @"__hugr__.__main__.rng..main.1"(), !dbg !37 + tail call void @"__hugr__.__main__.rng..main.1"(), !dbg !37 %1 = tail call i64 @teardown(), !dbg !37 ret i64 %1, !dbg !37 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-rus/rus_x86_64-apple-darwin b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-rus/rus_x86_64-apple-darwin index 6de7bf614..a97de453f 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-rus/rus_x86_64-apple-darwin +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-apple-darwin-rus/rus_x86_64-apple-darwin @@ -8,88 +8,88 @@ target triple = "x86_64-apple-darwin" define void @"__hugr__.__main__.rus..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - %qalloc.i = notail call i64 @___qalloc(), !dbg !8 + %qalloc.i = tail call i64 @___qalloc(), !dbg !8 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 br i1 %not_max.not.not.i, label %cond_87_case_0.i, label %__hugr__.__tk2_qalloc.83.exit, !dbg !8 cond_87_case_0.i: ; preds = %alloca_block - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 unreachable, !dbg !8 __hugr__.__tk2_qalloc.83.exit: ; preds = %alloca_block - notail call void @___reset(i64 %qalloc.i), !dbg !8 - %qalloc.i132.i = notail call i64 @___qalloc(), !dbg !9 + tail call void @___reset(i64 %qalloc.i), !dbg !8 + %qalloc.i132.i = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i133.i = icmp eq i64 %qalloc.i132.i, -1, !dbg !9 br i1 %not_max.not.not.i133.i, label %cond_101_case_0.i.i, label %__hugr__.__tk2_qalloc.97.exit.i, !dbg !9 cond_101_case_0.i.i: ; preds = %cond_242_case_1.backedge.i, %__hugr__.__tk2_qalloc.83.exit - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 unreachable, !dbg !9 __hugr__.__tk2_qalloc.97.exit.i: ; preds = %__hugr__.__tk2_qalloc.83.exit, %cond_242_case_1.backedge.i %qalloc.i134.i = phi i64 [ %qalloc.i.i, %cond_242_case_1.backedge.i ], [ %qalloc.i132.i, %__hugr__.__tk2_qalloc.83.exit ] - notail call void @___reset(i64 %qalloc.i134.i), !dbg !9 - %qalloc.i128.i = notail call i64 @___qalloc(), !dbg !15 + tail call void @___reset(i64 %qalloc.i134.i), !dbg !9 + %qalloc.i128.i = tail call i64 @___qalloc(), !dbg !15 %not_max.not.not.i129.i = icmp eq i64 %qalloc.i128.i, -1, !dbg !15 br i1 %not_max.not.not.i129.i, label %cond_115_case_0.i.i, label %__hugr__.__tk2_qalloc.111.exit.i, !dbg !15 cond_115_case_0.i.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !15 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !15 unreachable, !dbg !15 __hugr__.__tk2_qalloc.111.exit.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i - notail call void @___reset(i64 %qalloc.i128.i), !dbg !15 - notail call void @___rxy(i64 %qalloc.i128.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !16 - notail call void @___rz(i64 %qalloc.i128.i, double 0x400921FB54442D18), !dbg !16 - notail call void @___rxy(i64 %qalloc.i134.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !17 - notail call void @___rz(i64 %qalloc.i134.i, double 0x400921FB54442D18), !dbg !17 - notail call void @___rz(i64 %qalloc.i134.i, double 0xBFE921FB54442D18), !dbg !18 - notail call void @___rxy(i64 %qalloc.i134.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18), !dbg !19 - notail call void @___rzz(i64 %qalloc.i128.i, i64 %qalloc.i134.i, double 0x3FF921FB54442D18), !dbg !19 - notail call void @___rz(i64 %qalloc.i128.i, double 0xBFF921FB54442D18), !dbg !19 - notail call void @___rxy(i64 %qalloc.i134.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18), !dbg !19 - notail call void @___rz(i64 %qalloc.i134.i, double 0xBFF921FB54442D18), !dbg !19 - notail call void @___rz(i64 %qalloc.i134.i, double 0x3FE921FB54442D18), !dbg !20 - %lazy_measure.i = notail call i64 @___lazy_measure(i64 %qalloc.i134.i) - notail call void @___qfree(i64 %qalloc.i134.i) + tail call void @___reset(i64 %qalloc.i128.i), !dbg !15 + tail call void @___rxy(i64 %qalloc.i128.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !16 + tail call void @___rz(i64 %qalloc.i128.i, double 0x400921FB54442D18), !dbg !16 + tail call void @___rxy(i64 %qalloc.i134.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !17 + tail call void @___rz(i64 %qalloc.i134.i, double 0x400921FB54442D18), !dbg !17 + tail call void @___rz(i64 %qalloc.i134.i, double 0xBFE921FB54442D18), !dbg !18 + tail call void @___rxy(i64 %qalloc.i134.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18), !dbg !19 + tail call void @___rzz(i64 %qalloc.i128.i, i64 %qalloc.i134.i, double 0x3FF921FB54442D18), !dbg !19 + tail call void @___rz(i64 %qalloc.i128.i, double 0xBFF921FB54442D18), !dbg !19 + tail call void @___rxy(i64 %qalloc.i134.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18), !dbg !19 + tail call void @___rz(i64 %qalloc.i134.i, double 0xBFF921FB54442D18), !dbg !19 + tail call void @___rz(i64 %qalloc.i134.i, double 0x3FE921FB54442D18), !dbg !20 + %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i134.i) + tail call void @___qfree(i64 %qalloc.i134.i) %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) - notail call void @___dec_future_refcount(i64 %lazy_measure.i) + tail call void @___dec_future_refcount(i64 %lazy_measure.i) br i1 %read_bool.i, label %cond_256_case_1.i, label %0 0: ; preds = %__hugr__.__tk2_qalloc.111.exit.i - notail call void @___qfree(i64 %qalloc.i128.i), !dbg !21 + tail call void @___qfree(i64 %qalloc.i128.i), !dbg !21 br label %cond_242_case_1.backedge.i cond_242_case_1.backedge.i: ; preds = %1, %0 - %qalloc.i.i = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.i = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1, !dbg !9 br i1 %not_max.not.not.i.i, label %cond_101_case_0.i.i, label %__hugr__.__tk2_qalloc.97.exit.i, !dbg !9 cond_256_case_1.i: ; preds = %__hugr__.__tk2_qalloc.111.exit.i - notail call void @___rz(i64 %qalloc.i, double 0x3FE921FB54442D18), !dbg !22 - notail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !23 - notail call void @___rxy(i64 %qalloc.i128.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18), !dbg !24 - notail call void @___rzz(i64 %qalloc.i, i64 %qalloc.i128.i, double 0x3FF921FB54442D18), !dbg !24 - notail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18), !dbg !24 - notail call void @___rxy(i64 %qalloc.i128.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18), !dbg !24 - notail call void @___rz(i64 %qalloc.i128.i, double 0xBFF921FB54442D18), !dbg !24 - notail call void @___rz(i64 %qalloc.i128.i, double 0x3FE921FB54442D18), !dbg !25 - %lazy_measure67.i = notail call i64 @___lazy_measure(i64 %qalloc.i128.i) - notail call void @___qfree(i64 %qalloc.i128.i) + tail call void @___rz(i64 %qalloc.i, double 0x3FE921FB54442D18), !dbg !22 + tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !23 + tail call void @___rxy(i64 %qalloc.i128.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18), !dbg !24 + tail call void @___rzz(i64 %qalloc.i, i64 %qalloc.i128.i, double 0x3FF921FB54442D18), !dbg !24 + tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18), !dbg !24 + tail call void @___rxy(i64 %qalloc.i128.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18), !dbg !24 + tail call void @___rz(i64 %qalloc.i128.i, double 0xBFF921FB54442D18), !dbg !24 + tail call void @___rz(i64 %qalloc.i128.i, double 0x3FE921FB54442D18), !dbg !25 + %lazy_measure67.i = tail call i64 @___lazy_measure(i64 %qalloc.i128.i) + tail call void @___qfree(i64 %qalloc.i128.i) %read_bool80.i = tail call i1 @___read_future_bool(i64 %lazy_measure67.i) - notail call void @___dec_future_refcount(i64 %lazy_measure67.i) + tail call void @___dec_future_refcount(i64 %lazy_measure67.i) br i1 %read_bool80.i, label %"__hugr__.__main__.rus..rus.17.exit", label %1 1: ; preds = %cond_256_case_1.i - notail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00), !dbg !26 + tail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00), !dbg !26 br label %cond_242_case_1.backedge.i "__hugr__.__main__.rus..rus.17.exit": ; preds = %cond_256_case_1.i - %lazy_measure = notail call i64 @___lazy_measure(i64 %qalloc.i) - notail call void @___qfree(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) - notail call void @___dec_future_refcount(i64 %lazy_measure) - notail call void @print_bool(ptr nonnull @res_result.457DE32D.0, i64 16, i1 %read_bool), !dbg !27 + tail call void @___dec_future_refcount(i64 %lazy_measure) + tail call void @print_bool(ptr nonnull @res_result.457DE32D.0, i64 16, i1 %read_bool), !dbg !27 ret void } @@ -119,7 +119,7 @@ declare void @___rzz(i64, i64, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !28 { entry: tail call void @setup(i64 %0), !dbg !30 - notail call void @"__hugr__.__main__.rus..main.1"(), !dbg !30 + tail call void @"__hugr__.__main__.rus..main.1"(), !dbg !30 %1 = tail call i64 @teardown(), !dbg !30 ret i64 %1, !dbg !30 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-discard_qb_array/discard_qb_array_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-discard_qb_array/discard_qb_array_x86_64-unknown-linux-gnu index 84c1163c9..86eb72ab6 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-discard_qb_array/discard_qb_array_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-discard_qb_array/discard_qb_array_x86_64-unknown-linux-gnu @@ -12,34 +12,34 @@ alloca_block: %0 = tail call ptr @heap_alloc(i64 80), !dbg !8 %1 = tail call ptr @heap_alloc(i64 8), !dbg !8 store i64 -1, ptr %1, align 1, !dbg !8 - %qalloc.i = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !9 br i1 %not_max.not.not.i, label %cond_233_case_0.i, label %__barray_check_bounds.exit, !dbg !9 cond_233_case_0.i: ; preds = %cond_exit_20.8, %cond_exit_20.7, %cond_exit_20.6, %cond_exit_20.5, %cond_exit_20.4, %cond_exit_20.3, %cond_exit_20.2, %cond_exit_20.1, %cond_exit_20, %alloca_block - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 unreachable, !dbg !9 __barray_check_bounds.exit: ; preds = %alloca_block - notail call void @___reset(i64 %qalloc.i), !dbg !9 + tail call void @___reset(i64 %qalloc.i), !dbg !9 %2 = load i64, ptr %1, align 4 %3 = trunc i64 %2 to i1 br i1 %3, label %cond_exit_20, 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 - notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable cond_exit_20: ; preds = %__barray_check_bounds.exit %4 = and i64 %2, -2 store i64 %4, ptr %1, align 4 store i64 %qalloc.i, ptr %0, align 4 - %qalloc.i.1 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.1 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1, !dbg !9 br i1 %not_max.not.not.i.1, label %cond_233_case_0.i, label %__barray_check_bounds.exit.1, !dbg !9 __barray_check_bounds.exit.1: ; preds = %cond_exit_20 - notail call void @___reset(i64 %qalloc.i.1), !dbg !9 + tail call void @___reset(i64 %qalloc.i.1), !dbg !9 %5 = load i64, ptr %1, align 4 %6 = and i64 %5, 2 %.not = icmp eq i64 %6, 0 @@ -50,12 +50,12 @@ cond_exit_20.1: ; preds = %__barray_check_boun store i64 %7, ptr %1, align 4 %8 = getelementptr inbounds nuw i8, ptr %0, i64 8 store i64 %qalloc.i.1, ptr %8, align 4 - %qalloc.i.2 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.2 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1, !dbg !9 br i1 %not_max.not.not.i.2, label %cond_233_case_0.i, label %__barray_check_bounds.exit.2, !dbg !9 __barray_check_bounds.exit.2: ; preds = %cond_exit_20.1 - notail call void @___reset(i64 %qalloc.i.2), !dbg !9 + tail call void @___reset(i64 %qalloc.i.2), !dbg !9 %9 = load i64, ptr %1, align 4 %10 = and i64 %9, 4 %.not108 = icmp eq i64 %10, 0 @@ -66,12 +66,12 @@ cond_exit_20.2: ; preds = %__barray_check_boun store i64 %11, ptr %1, align 4 %12 = getelementptr inbounds nuw i8, ptr %0, i64 16 store i64 %qalloc.i.2, ptr %12, align 4 - %qalloc.i.3 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.3 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1, !dbg !9 br i1 %not_max.not.not.i.3, label %cond_233_case_0.i, label %__barray_check_bounds.exit.3, !dbg !9 __barray_check_bounds.exit.3: ; preds = %cond_exit_20.2 - notail call void @___reset(i64 %qalloc.i.3), !dbg !9 + tail call void @___reset(i64 %qalloc.i.3), !dbg !9 %13 = load i64, ptr %1, align 4 %14 = and i64 %13, 8 %.not109 = icmp eq i64 %14, 0 @@ -82,12 +82,12 @@ cond_exit_20.3: ; preds = %__barray_check_boun store i64 %15, ptr %1, align 4 %16 = getelementptr inbounds nuw i8, ptr %0, i64 24 store i64 %qalloc.i.3, ptr %16, align 4 - %qalloc.i.4 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.4 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1, !dbg !9 br i1 %not_max.not.not.i.4, label %cond_233_case_0.i, label %__barray_check_bounds.exit.4, !dbg !9 __barray_check_bounds.exit.4: ; preds = %cond_exit_20.3 - notail call void @___reset(i64 %qalloc.i.4), !dbg !9 + tail call void @___reset(i64 %qalloc.i.4), !dbg !9 %17 = load i64, ptr %1, align 4 %18 = and i64 %17, 16 %.not110 = icmp eq i64 %18, 0 @@ -98,12 +98,12 @@ cond_exit_20.4: ; preds = %__barray_check_boun store i64 %19, ptr %1, align 4 %20 = getelementptr inbounds nuw i8, ptr %0, i64 32 store i64 %qalloc.i.4, ptr %20, align 4 - %qalloc.i.5 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.5 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.5 = icmp eq i64 %qalloc.i.5, -1, !dbg !9 br i1 %not_max.not.not.i.5, label %cond_233_case_0.i, label %__barray_check_bounds.exit.5, !dbg !9 __barray_check_bounds.exit.5: ; preds = %cond_exit_20.4 - notail call void @___reset(i64 %qalloc.i.5), !dbg !9 + tail call void @___reset(i64 %qalloc.i.5), !dbg !9 %21 = load i64, ptr %1, align 4 %22 = and i64 %21, 32 %.not111 = icmp eq i64 %22, 0 @@ -114,12 +114,12 @@ cond_exit_20.5: ; preds = %__barray_check_boun store i64 %23, ptr %1, align 4 %24 = getelementptr inbounds nuw i8, ptr %0, i64 40 store i64 %qalloc.i.5, ptr %24, align 4 - %qalloc.i.6 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.6 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.6 = icmp eq i64 %qalloc.i.6, -1, !dbg !9 br i1 %not_max.not.not.i.6, label %cond_233_case_0.i, label %__barray_check_bounds.exit.6, !dbg !9 __barray_check_bounds.exit.6: ; preds = %cond_exit_20.5 - notail call void @___reset(i64 %qalloc.i.6), !dbg !9 + tail call void @___reset(i64 %qalloc.i.6), !dbg !9 %25 = load i64, ptr %1, align 4 %26 = and i64 %25, 64 %.not112 = icmp eq i64 %26, 0 @@ -130,12 +130,12 @@ cond_exit_20.6: ; preds = %__barray_check_boun store i64 %27, ptr %1, align 4 %28 = getelementptr inbounds nuw i8, ptr %0, i64 48 store i64 %qalloc.i.6, ptr %28, align 4 - %qalloc.i.7 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.7 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.7 = icmp eq i64 %qalloc.i.7, -1, !dbg !9 br i1 %not_max.not.not.i.7, label %cond_233_case_0.i, label %__barray_check_bounds.exit.7, !dbg !9 __barray_check_bounds.exit.7: ; preds = %cond_exit_20.6 - notail call void @___reset(i64 %qalloc.i.7), !dbg !9 + tail call void @___reset(i64 %qalloc.i.7), !dbg !9 %29 = load i64, ptr %1, align 4 %30 = and i64 %29, 128 %.not113 = icmp eq i64 %30, 0 @@ -146,12 +146,12 @@ cond_exit_20.7: ; preds = %__barray_check_boun store i64 %31, ptr %1, align 4 %32 = getelementptr inbounds nuw i8, ptr %0, i64 56 store i64 %qalloc.i.7, ptr %32, align 4 - %qalloc.i.8 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.8 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.8 = icmp eq i64 %qalloc.i.8, -1, !dbg !9 br i1 %not_max.not.not.i.8, label %cond_233_case_0.i, label %__barray_check_bounds.exit.8, !dbg !9 __barray_check_bounds.exit.8: ; preds = %cond_exit_20.7 - notail call void @___reset(i64 %qalloc.i.8), !dbg !9 + tail call void @___reset(i64 %qalloc.i.8), !dbg !9 %33 = load i64, ptr %1, align 4 %34 = and i64 %33, 256 %.not114 = icmp eq i64 %34, 0 @@ -162,12 +162,12 @@ cond_exit_20.8: ; preds = %__barray_check_boun store i64 %35, ptr %1, align 4 %36 = getelementptr inbounds nuw i8, ptr %0, i64 64 store i64 %qalloc.i.8, ptr %36, align 4 - %qalloc.i.9 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.9 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.9 = icmp eq i64 %qalloc.i.9, -1, !dbg !9 br i1 %not_max.not.not.i.9, label %cond_233_case_0.i, label %__barray_check_bounds.exit.9, !dbg !9 __barray_check_bounds.exit.9: ; preds = %cond_exit_20.8 - notail call void @___reset(i64 %qalloc.i.9), !dbg !9 + tail call void @___reset(i64 %qalloc.i.9), !dbg !9 %37 = load i64, ptr %1, align 4 %38 = and i64 %37, 512 %.not115 = icmp eq i64 %38, 0 @@ -193,7 +193,7 @@ __barray_mask_borrow.exit.1.i: ; preds = %cond_171_case_1.1.i store i64 %45, ptr %1, align 4, !dbg !21 %46 = getelementptr inbounds nuw i8, ptr %0, i64 8, !dbg !23 %47 = load i64, ptr %46, align 4, !dbg !23 - notail call void @___qfree(i64 %47), !dbg !24 + tail call void @___qfree(i64 %47), !dbg !24 %.pre337.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.2.i @@ -208,7 +208,7 @@ __barray_mask_borrow.exit.2.i: ; preds = %cond_171_case_1.2.i store i64 %50, ptr %1, align 4, !dbg !21 %51 = getelementptr inbounds nuw i8, ptr %0, i64 16, !dbg !23 %52 = load i64, ptr %51, align 4, !dbg !23 - notail call void @___qfree(i64 %52), !dbg !24 + tail call void @___qfree(i64 %52), !dbg !24 %.pre338.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.3.i @@ -223,7 +223,7 @@ __barray_mask_borrow.exit.3.i: ; preds = %cond_171_case_1.3.i store i64 %55, ptr %1, align 4, !dbg !21 %56 = getelementptr inbounds nuw i8, ptr %0, i64 24, !dbg !23 %57 = load i64, ptr %56, align 4, !dbg !23 - notail call void @___qfree(i64 %57), !dbg !24 + tail call void @___qfree(i64 %57), !dbg !24 %.pre339.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.4.i @@ -238,7 +238,7 @@ __barray_mask_borrow.exit.4.i: ; preds = %cond_171_case_1.4.i store i64 %60, ptr %1, align 4, !dbg !21 %61 = getelementptr inbounds nuw i8, ptr %0, i64 32, !dbg !23 %62 = load i64, ptr %61, align 4, !dbg !23 - notail call void @___qfree(i64 %62), !dbg !24 + tail call void @___qfree(i64 %62), !dbg !24 %.pre340.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.5.i @@ -253,7 +253,7 @@ __barray_mask_borrow.exit.5.i: ; preds = %cond_171_case_1.5.i store i64 %65, ptr %1, align 4, !dbg !21 %66 = getelementptr inbounds nuw i8, ptr %0, i64 40, !dbg !23 %67 = load i64, ptr %66, align 4, !dbg !23 - notail call void @___qfree(i64 %67), !dbg !24 + tail call void @___qfree(i64 %67), !dbg !24 %.pre341.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.6.i @@ -268,7 +268,7 @@ __barray_mask_borrow.exit.6.i: ; preds = %cond_171_case_1.6.i store i64 %70, ptr %1, align 4, !dbg !21 %71 = getelementptr inbounds nuw i8, ptr %0, i64 48, !dbg !23 %72 = load i64, ptr %71, align 4, !dbg !23 - notail call void @___qfree(i64 %72), !dbg !24 + tail call void @___qfree(i64 %72), !dbg !24 %.pre342.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.7.i @@ -283,7 +283,7 @@ __barray_mask_borrow.exit.7.i: ; preds = %cond_171_case_1.7.i store i64 %75, ptr %1, align 4, !dbg !21 %76 = getelementptr inbounds nuw i8, ptr %0, i64 56, !dbg !23 %77 = load i64, ptr %76, align 4, !dbg !23 - notail call void @___qfree(i64 %77), !dbg !24 + tail call void @___qfree(i64 %77), !dbg !24 %.pre343.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.8.i @@ -298,7 +298,7 @@ __barray_mask_borrow.exit.8.i: ; preds = %cond_171_case_1.8.i store i64 %80, ptr %1, align 4, !dbg !21 %81 = getelementptr inbounds nuw i8, ptr %0, i64 64, !dbg !23 %82 = load i64, ptr %81, align 4, !dbg !23 - notail call void @___qfree(i64 %82), !dbg !24 + tail call void @___qfree(i64 %82), !dbg !24 %.pre = load i64, ptr %1, align 4, !dbg !10 br label %__barray_check_bounds.exit.9.i @@ -313,7 +313,7 @@ __barray_mask_borrow.exit.9.i: ; preds = %__barray_check_boun store i64 %85, ptr %1, align 4, !dbg !21 %86 = getelementptr inbounds nuw i8, ptr %0, i64 72, !dbg !23 %87 = load i64, ptr %86, align 4, !dbg !23 - notail call void @___qfree(i64 %87), !dbg !24 + tail call void @___qfree(i64 %87), !dbg !24 %.pre344.i = load i64, ptr %1, align 4, !dbg !25 br label %cond_exit_156.i @@ -325,14 +325,14 @@ cond_exit_156.i: ; preds = %__barray_mask_borro br i1 %90, label %"__hugr__.guppylang.std.quantum.discard_array$10.113.exit", label %mask_block_err.i.i, !dbg !25 mask_block_err.i.i: ; preds = %cond_exit_156.i - notail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0"), !dbg !25 + tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0"), !dbg !25 unreachable, !dbg !25 __barray_mask_borrow.exit.i: ; preds = %cond_exit_20.9 %91 = or disjoint i64 %41, 1, !dbg !21 store i64 %91, ptr %1, align 4, !dbg !21 %92 = load i64, ptr %0, align 4, !dbg !23 - notail call void @___qfree(i64 %92), !dbg !24 + tail call void @___qfree(i64 %92), !dbg !24 %.pre.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.1.i @@ -358,7 +358,7 @@ declare void @___reset(i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !28 { entry: tail call void @setup(i64 %0), !dbg !32 - notail call void @"__hugr__.__main__.discard_qb_array..main.1"(), !dbg !32 + tail call void @"__hugr__.__main__.discard_qb_array..main.1"(), !dbg !32 %1 = tail call i64 @teardown(), !dbg !32 ret i64 %1, !dbg !32 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-flip_some/flip_some_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-flip_some/flip_some_x86_64-unknown-linux-gnu index a66baaa23..8b43e04cd 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-flip_some/flip_some_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-flip_some/flip_some_x86_64-unknown-linux-gnu @@ -11,69 +11,69 @@ target triple = "x86_64-unknown-linux-gnu" define void @"__hugr__.__main__.flip_some..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - %qalloc.i = notail call i64 @___qalloc(), !dbg !8 + %qalloc.i = tail call i64 @___qalloc(), !dbg !8 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 br i1 %not_max.not.not.i, label %cond_40_case_0.i, label %__hugr__.__tk2_qalloc.36.exit, !dbg !8 cond_40_case_0.i: ; preds = %alloca_block - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 unreachable, !dbg !8 __hugr__.__tk2_qalloc.36.exit: ; preds = %alloca_block - notail call void @___reset(i64 %qalloc.i), !dbg !8 - notail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00), !dbg !9 - %qalloc.i101 = notail call i64 @___qalloc(), !dbg !10 + tail call void @___reset(i64 %qalloc.i), !dbg !8 + tail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00), !dbg !9 + %qalloc.i101 = tail call i64 @___qalloc(), !dbg !10 %not_max.not.not.i102 = icmp eq i64 %qalloc.i101, -1, !dbg !10 br i1 %not_max.not.not.i102, label %cond_54_case_0.i, label %__hugr__.__tk2_qalloc.50.exit, !dbg !10 cond_54_case_0.i: ; preds = %__hugr__.__tk2_qalloc.36.exit - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !10 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !10 unreachable, !dbg !10 __hugr__.__tk2_qalloc.50.exit: ; preds = %__hugr__.__tk2_qalloc.36.exit - notail call void @___reset(i64 %qalloc.i101), !dbg !10 - %qalloc.i103 = notail call i64 @___qalloc(), !dbg !11 + tail call void @___reset(i64 %qalloc.i101), !dbg !10 + %qalloc.i103 = tail call i64 @___qalloc(), !dbg !11 %not_max.not.not.i104 = icmp eq i64 %qalloc.i103, -1, !dbg !11 br i1 %not_max.not.not.i104, label %cond_68_case_0.i, label %__hugr__.__tk2_qalloc.64.exit, !dbg !11 cond_68_case_0.i: ; preds = %__hugr__.__tk2_qalloc.50.exit - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !11 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !11 unreachable, !dbg !11 __hugr__.__tk2_qalloc.64.exit: ; preds = %__hugr__.__tk2_qalloc.50.exit - notail call void @___reset(i64 %qalloc.i103), !dbg !11 - notail call void @___rxy(i64 %qalloc.i103, double 0x400921FB54442D18, double 0.000000e+00), !dbg !12 - %qalloc.i105 = notail call i64 @___qalloc(), !dbg !13 + tail call void @___reset(i64 %qalloc.i103), !dbg !11 + tail call void @___rxy(i64 %qalloc.i103, double 0x400921FB54442D18, double 0.000000e+00), !dbg !12 + %qalloc.i105 = tail call i64 @___qalloc(), !dbg !13 %not_max.not.not.i106 = icmp eq i64 %qalloc.i105, -1, !dbg !13 br i1 %not_max.not.not.i106, label %cond_82_case_0.i, label %__hugr__.__tk2_qalloc.78.exit, !dbg !13 cond_82_case_0.i: ; preds = %__hugr__.__tk2_qalloc.64.exit - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !13 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !13 unreachable, !dbg !13 __hugr__.__tk2_qalloc.78.exit: ; preds = %__hugr__.__tk2_qalloc.64.exit - notail call void @___reset(i64 %qalloc.i105), !dbg !13 - %lazy_measure = notail call i64 @___lazy_measure(i64 %qalloc.i) - notail call void @___qfree(i64 %qalloc.i) + tail call void @___reset(i64 %qalloc.i105), !dbg !13 + %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) - notail call void @___dec_future_refcount(i64 %lazy_measure) - notail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool), !dbg !14 - %lazy_measure22 = notail call i64 @___lazy_measure(i64 %qalloc.i101) - notail call void @___qfree(i64 %qalloc.i101) + 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), !dbg !14 + %lazy_measure22 = tail call i64 @___lazy_measure(i64 %qalloc.i101) + tail call void @___qfree(i64 %qalloc.i101) %read_bool35 = tail call i1 @___read_future_bool(i64 %lazy_measure22) - notail call void @___dec_future_refcount(i64 %lazy_measure22) - notail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool35), !dbg !15 - %lazy_measure44 = notail call i64 @___lazy_measure(i64 %qalloc.i103) - notail call void @___qfree(i64 %qalloc.i103) + tail call void @___dec_future_refcount(i64 %lazy_measure22) + tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool35), !dbg !15 + %lazy_measure44 = tail call i64 @___lazy_measure(i64 %qalloc.i103) + tail call void @___qfree(i64 %qalloc.i103) %read_bool57 = tail call i1 @___read_future_bool(i64 %lazy_measure44) - notail call void @___dec_future_refcount(i64 %lazy_measure44) - notail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool57), !dbg !16 - notail call void @___rxy(i64 %qalloc.i105, double 0x400921FB54442D18, double 0.000000e+00), !dbg !17 - %lazy_measure67 = notail call i64 @___lazy_measure(i64 %qalloc.i105) - notail call void @___qfree(i64 %qalloc.i105) + tail call void @___dec_future_refcount(i64 %lazy_measure44) + tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool57), !dbg !16 + tail call void @___rxy(i64 %qalloc.i105, double 0x400921FB54442D18, double 0.000000e+00), !dbg !17 + %lazy_measure67 = tail call i64 @___lazy_measure(i64 %qalloc.i105) + tail call void @___qfree(i64 %qalloc.i105) %read_bool80 = tail call i1 @___read_future_bool(i64 %lazy_measure67) - notail call void @___dec_future_refcount(i64 %lazy_measure67) - notail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool80), !dbg !18 + tail call void @___dec_future_refcount(i64 %lazy_measure67) + tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool80), !dbg !18 ret void } @@ -99,7 +99,7 @@ declare void @___rxy(i64, double, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !19 { entry: tail call void @setup(i64 %0), !dbg !24 - notail call void @"__hugr__.__main__.flip_some..main.1"(), !dbg !24 + tail call void @"__hugr__.__main__.flip_some..main.1"(), !dbg !24 %1 = tail call i64 @teardown(), !dbg !24 ret i64 %1, !dbg !24 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-measure_qb_array/measure_qb_array_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-measure_qb_array/measure_qb_array_x86_64-unknown-linux-gnu index 46b18b25f..770237bf2 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-measure_qb_array/measure_qb_array_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-measure_qb_array/measure_qb_array_x86_64-unknown-linux-gnu @@ -13,34 +13,34 @@ alloca_block: %0 = tail call ptr @heap_alloc(i64 80), !dbg !8 %1 = tail call ptr @heap_alloc(i64 8), !dbg !8 store i64 -1, ptr %1, align 1, !dbg !8 - %qalloc.i = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !9 br i1 %not_max.not.not.i, label %cond_299_case_0.i, label %__barray_check_bounds.exit, !dbg !9 cond_299_case_0.i: ; preds = %cond_exit_20.8, %cond_exit_20.7, %cond_exit_20.6, %cond_exit_20.5, %cond_exit_20.4, %cond_exit_20.3, %cond_exit_20.2, %cond_exit_20.1, %cond_exit_20, %alloca_block - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 unreachable, !dbg !9 __barray_check_bounds.exit: ; preds = %alloca_block - notail call void @___reset(i64 %qalloc.i), !dbg !9 + tail call void @___reset(i64 %qalloc.i), !dbg !9 %2 = load i64, ptr %1, align 4 %3 = trunc i64 %2 to i1 br i1 %3, label %cond_exit_20, 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 - notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable cond_exit_20: ; preds = %__barray_check_bounds.exit %4 = and i64 %2, -2 store i64 %4, ptr %1, align 4 store i64 %qalloc.i, ptr %0, align 4 - %qalloc.i.1 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.1 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1, !dbg !9 br i1 %not_max.not.not.i.1, label %cond_299_case_0.i, label %__barray_check_bounds.exit.1, !dbg !9 __barray_check_bounds.exit.1: ; preds = %cond_exit_20 - notail call void @___reset(i64 %qalloc.i.1), !dbg !9 + tail call void @___reset(i64 %qalloc.i.1), !dbg !9 %5 = load i64, ptr %1, align 4 %6 = and i64 %5, 2 %.not299 = icmp eq i64 %6, 0 @@ -51,12 +51,12 @@ cond_exit_20.1: ; preds = %__barray_check_boun store i64 %7, ptr %1, align 4 %8 = getelementptr inbounds nuw i8, ptr %0, i64 8 store i64 %qalloc.i.1, ptr %8, align 4 - %qalloc.i.2 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.2 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1, !dbg !9 br i1 %not_max.not.not.i.2, label %cond_299_case_0.i, label %__barray_check_bounds.exit.2, !dbg !9 __barray_check_bounds.exit.2: ; preds = %cond_exit_20.1 - notail call void @___reset(i64 %qalloc.i.2), !dbg !9 + tail call void @___reset(i64 %qalloc.i.2), !dbg !9 %9 = load i64, ptr %1, align 4 %10 = and i64 %9, 4 %.not300 = icmp eq i64 %10, 0 @@ -67,12 +67,12 @@ cond_exit_20.2: ; preds = %__barray_check_boun store i64 %11, ptr %1, align 4 %12 = getelementptr inbounds nuw i8, ptr %0, i64 16 store i64 %qalloc.i.2, ptr %12, align 4 - %qalloc.i.3 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.3 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1, !dbg !9 br i1 %not_max.not.not.i.3, label %cond_299_case_0.i, label %__barray_check_bounds.exit.3, !dbg !9 __barray_check_bounds.exit.3: ; preds = %cond_exit_20.2 - notail call void @___reset(i64 %qalloc.i.3), !dbg !9 + tail call void @___reset(i64 %qalloc.i.3), !dbg !9 %13 = load i64, ptr %1, align 4 %14 = and i64 %13, 8 %.not301 = icmp eq i64 %14, 0 @@ -83,12 +83,12 @@ cond_exit_20.3: ; preds = %__barray_check_boun store i64 %15, ptr %1, align 4 %16 = getelementptr inbounds nuw i8, ptr %0, i64 24 store i64 %qalloc.i.3, ptr %16, align 4 - %qalloc.i.4 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.4 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1, !dbg !9 br i1 %not_max.not.not.i.4, label %cond_299_case_0.i, label %__barray_check_bounds.exit.4, !dbg !9 __barray_check_bounds.exit.4: ; preds = %cond_exit_20.3 - notail call void @___reset(i64 %qalloc.i.4), !dbg !9 + tail call void @___reset(i64 %qalloc.i.4), !dbg !9 %17 = load i64, ptr %1, align 4 %18 = and i64 %17, 16 %.not302 = icmp eq i64 %18, 0 @@ -99,12 +99,12 @@ cond_exit_20.4: ; preds = %__barray_check_boun store i64 %19, ptr %1, align 4 %20 = getelementptr inbounds nuw i8, ptr %0, i64 32 store i64 %qalloc.i.4, ptr %20, align 4 - %qalloc.i.5 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.5 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.5 = icmp eq i64 %qalloc.i.5, -1, !dbg !9 br i1 %not_max.not.not.i.5, label %cond_299_case_0.i, label %__barray_check_bounds.exit.5, !dbg !9 __barray_check_bounds.exit.5: ; preds = %cond_exit_20.4 - notail call void @___reset(i64 %qalloc.i.5), !dbg !9 + tail call void @___reset(i64 %qalloc.i.5), !dbg !9 %21 = load i64, ptr %1, align 4 %22 = and i64 %21, 32 %.not303 = icmp eq i64 %22, 0 @@ -115,12 +115,12 @@ cond_exit_20.5: ; preds = %__barray_check_boun store i64 %23, ptr %1, align 4 %24 = getelementptr inbounds nuw i8, ptr %0, i64 40 store i64 %qalloc.i.5, ptr %24, align 4 - %qalloc.i.6 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.6 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.6 = icmp eq i64 %qalloc.i.6, -1, !dbg !9 br i1 %not_max.not.not.i.6, label %cond_299_case_0.i, label %__barray_check_bounds.exit.6, !dbg !9 __barray_check_bounds.exit.6: ; preds = %cond_exit_20.5 - notail call void @___reset(i64 %qalloc.i.6), !dbg !9 + tail call void @___reset(i64 %qalloc.i.6), !dbg !9 %25 = load i64, ptr %1, align 4 %26 = and i64 %25, 64 %.not304 = icmp eq i64 %26, 0 @@ -131,12 +131,12 @@ cond_exit_20.6: ; preds = %__barray_check_boun store i64 %27, ptr %1, align 4 %28 = getelementptr inbounds nuw i8, ptr %0, i64 48 store i64 %qalloc.i.6, ptr %28, align 4 - %qalloc.i.7 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.7 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.7 = icmp eq i64 %qalloc.i.7, -1, !dbg !9 br i1 %not_max.not.not.i.7, label %cond_299_case_0.i, label %__barray_check_bounds.exit.7, !dbg !9 __barray_check_bounds.exit.7: ; preds = %cond_exit_20.6 - notail call void @___reset(i64 %qalloc.i.7), !dbg !9 + tail call void @___reset(i64 %qalloc.i.7), !dbg !9 %29 = load i64, ptr %1, align 4 %30 = and i64 %29, 128 %.not305 = icmp eq i64 %30, 0 @@ -147,12 +147,12 @@ cond_exit_20.7: ; preds = %__barray_check_boun store i64 %31, ptr %1, align 4 %32 = getelementptr inbounds nuw i8, ptr %0, i64 56 store i64 %qalloc.i.7, ptr %32, align 4 - %qalloc.i.8 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.8 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.8 = icmp eq i64 %qalloc.i.8, -1, !dbg !9 br i1 %not_max.not.not.i.8, label %cond_299_case_0.i, label %__barray_check_bounds.exit.8, !dbg !9 __barray_check_bounds.exit.8: ; preds = %cond_exit_20.7 - notail call void @___reset(i64 %qalloc.i.8), !dbg !9 + tail call void @___reset(i64 %qalloc.i.8), !dbg !9 %33 = load i64, ptr %1, align 4 %34 = and i64 %33, 256 %.not306 = icmp eq i64 %34, 0 @@ -163,12 +163,12 @@ cond_exit_20.8: ; preds = %__barray_check_boun store i64 %35, ptr %1, align 4 %36 = getelementptr inbounds nuw i8, ptr %0, i64 64 store i64 %qalloc.i.8, ptr %36, align 4 - %qalloc.i.9 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.9 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.9 = icmp eq i64 %qalloc.i.9, -1, !dbg !9 br i1 %not_max.not.not.i.9, label %cond_299_case_0.i, label %__barray_check_bounds.exit.9, !dbg !9 __barray_check_bounds.exit.9: ; preds = %cond_exit_20.8 - notail call void @___reset(i64 %qalloc.i.9), !dbg !9 + tail call void @___reset(i64 %qalloc.i.9), !dbg !9 %37 = load i64, ptr %1, align 4 %38 = and i64 %37, 512 %.not307 = icmp eq i64 %38, 0 @@ -187,20 +187,20 @@ cond_exit_20.9: ; preds = %__barray_check_boun br i1 %42, label %panic.i238, label %__barray_mask_borrow.exit, !dbg !10 panic.i238: ; preds = %cond_exit_20.9 - notail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !10 + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !10 unreachable, !dbg !10 __barray_mask_borrow.exit: ; preds = %cond_exit_20.9 %43 = or disjoint i64 %41, 1, !dbg !10 store i64 %43, ptr %1, align 4, !dbg !10 %44 = load i64, ptr %0, align 4, !dbg !12 - notail call void @___rxy(i64 %44, double 0x400921FB54442D18, double 0.000000e+00), !dbg !13 + tail call void @___rxy(i64 %44, double 0x400921FB54442D18, double 0.000000e+00), !dbg !13 %45 = load i64, ptr %1, align 4, !dbg !12 %46 = trunc i64 %45 to i1, !dbg !12 br i1 %46, label %__barray_mask_return.exit240, label %panic.i239, !dbg !12 panic.i239: ; preds = %__barray_mask_borrow.exit - notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !12 + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !12 unreachable, !dbg !12 __barray_mask_return.exit240: ; preds = %__barray_mask_borrow.exit @@ -213,7 +213,7 @@ __barray_mask_return.exit240: ; preds = %__barray_mask_borro br i1 %.not, label %__barray_mask_borrow.exit242, label %panic.i241, !dbg !14 panic.i241: ; preds = %__barray_mask_return.exit240 - notail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !14 + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !14 unreachable, !dbg !14 __barray_mask_borrow.exit242: ; preds = %__barray_mask_return.exit240 @@ -221,14 +221,14 @@ __barray_mask_borrow.exit242: ; preds = %__barray_mask_retur store i64 %50, ptr %1, align 4, !dbg !14 %51 = getelementptr inbounds nuw i8, ptr %0, i64 16, !dbg !16 %52 = load i64, ptr %51, align 4, !dbg !16 - notail call void @___rxy(i64 %52, double 0x400921FB54442D18, double 0.000000e+00), !dbg !17 + tail call void @___rxy(i64 %52, double 0x400921FB54442D18, double 0.000000e+00), !dbg !17 %53 = load i64, ptr %1, align 4, !dbg !16 %54 = and i64 %53, 4, !dbg !16 %.not268 = icmp eq i64 %54, 0, !dbg !16 br i1 %.not268, label %panic.i243, label %__barray_mask_return.exit244, !dbg !16 panic.i243: ; preds = %__barray_mask_borrow.exit242 - notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !16 + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !16 unreachable, !dbg !16 __barray_mask_return.exit244: ; preds = %__barray_mask_borrow.exit242 @@ -241,7 +241,7 @@ __barray_mask_return.exit244: ; preds = %__barray_mask_borro br i1 %.not269, label %__barray_mask_borrow.exit246, label %panic.i245, !dbg !18 panic.i245: ; preds = %__barray_mask_return.exit244 - notail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !18 + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !18 unreachable, !dbg !18 __barray_mask_borrow.exit246: ; preds = %__barray_mask_return.exit244 @@ -249,14 +249,14 @@ __barray_mask_borrow.exit246: ; preds = %__barray_mask_retur store i64 %58, ptr %1, align 4, !dbg !18 %59 = getelementptr inbounds nuw i8, ptr %0, i64 24, !dbg !20 %60 = load i64, ptr %59, align 4, !dbg !20 - notail call void @___rxy(i64 %60, double 0x400921FB54442D18, double 0.000000e+00), !dbg !21 + tail call void @___rxy(i64 %60, double 0x400921FB54442D18, double 0.000000e+00), !dbg !21 %61 = load i64, ptr %1, align 4, !dbg !20 %62 = and i64 %61, 8, !dbg !20 %.not270 = icmp eq i64 %62, 0, !dbg !20 br i1 %.not270, label %panic.i247, label %__barray_mask_return.exit248, !dbg !20 panic.i247: ; preds = %__barray_mask_borrow.exit246 - notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !20 + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !20 unreachable, !dbg !20 __barray_mask_return.exit248: ; preds = %__barray_mask_borrow.exit246 @@ -269,7 +269,7 @@ __barray_mask_return.exit248: ; preds = %__barray_mask_borro br i1 %.not271, label %__barray_mask_borrow.exit250, label %panic.i249, !dbg !22 panic.i249: ; preds = %__barray_mask_return.exit248 - notail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !22 + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !22 unreachable, !dbg !22 __barray_mask_borrow.exit250: ; preds = %__barray_mask_return.exit248 @@ -277,14 +277,14 @@ __barray_mask_borrow.exit250: ; preds = %__barray_mask_retur store i64 %66, ptr %1, align 4, !dbg !22 %67 = getelementptr inbounds nuw i8, ptr %0, i64 72, !dbg !24 %68 = load i64, ptr %67, align 4, !dbg !24 - notail call void @___rxy(i64 %68, double 0x400921FB54442D18, double 0.000000e+00), !dbg !25 + tail call void @___rxy(i64 %68, double 0x400921FB54442D18, double 0.000000e+00), !dbg !25 %69 = load i64, ptr %1, align 4, !dbg !24 %70 = and i64 %69, 512, !dbg !24 %.not272 = icmp eq i64 %70, 0, !dbg !24 br i1 %.not272, label %panic.i251, label %__barray_mask_return.exit252, !dbg !24 panic.i251: ; preds = %__barray_mask_borrow.exit250 - notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !24 + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !24 unreachable, !dbg !24 __barray_mask_return.exit252: ; preds = %__barray_mask_borrow.exit250 @@ -335,7 +335,7 @@ mask_block_ok.i.i.i: ; preds = %75, %93 br i1 %96, label %93, label %mask_block_err.i.i.i, !dbg !44 mask_block_err.i.i.i: ; preds = %mask_block_ok.i.i.i - notail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0"), !dbg !44 + tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0"), !dbg !44 unreachable, !dbg !44 __barray_check_bounds.exit.i.i: ; preds = %loop_body.i, %__barray_mask_return.exit252 @@ -355,7 +355,7 @@ __barray_check_bounds.exit.i.i: ; preds = %loop_body.i, %__bar br i1 %104, label %panic.i.i.i, label %__barray_check_bounds.exit.i, !dbg !56 panic.i.i.i: ; preds = %__barray_check_bounds.exit.i.i - notail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !56 + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !56 unreachable, !dbg !56 __barray_check_bounds.exit.i: ; preds = %__barray_check_bounds.exit.i.i @@ -364,15 +364,15 @@ __barray_check_bounds.exit.i: ; preds = %__barray_check_boun store i64 %106, ptr %100, align 4, !dbg !56 %107 = getelementptr inbounds i64, ptr %.fca.0.extract80.i185.i, i64 %98, !dbg !55 %108 = load i64, ptr %107, align 4, !dbg !55 - %lazy_measure.i = notail call i64 @___lazy_measure(i64 %108) - notail call void @___qfree(i64 %108) + %lazy_measure.i = tail call i64 @___lazy_measure(i64 %108) + tail call void @___qfree(i64 %108) %109 = load i64, ptr %74, align 4 %110 = lshr i64 %109, %"163_0.sroa.15.0184.i" %111 = trunc i64 %110 to i1 br i1 %111, label %loop_body.i, label %panic.i.i panic.i.i: ; preds = %__barray_check_bounds.exit.i - notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable loop_body.i: ; preds = %__barray_check_bounds.exit.i @@ -404,7 +404,7 @@ cond_exit_369: ; preds = %cond_exit_369.threa ret void mask_block_err.i: ; preds = %cond_exit_369.thread.9 - notail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") + tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable __barray_mask_borrow.exit259: ; preds = %"__hugr__.guppylang.std.quantum.measure_array$10.149.exit" @@ -430,7 +430,7 @@ __barray_mask_borrow.exit259.1: ; preds = %cond_exit_369.threa cond_392_case_1.1: ; preds = %__barray_mask_borrow.exit259.1 %.fca.1.extract.1 = extractvalue { i1, i64, i1 } %125, 1 - notail call void @___dec_future_refcount(i64 %.fca.1.extract.1) + tail call void @___dec_future_refcount(i64 %.fca.1.extract.1) %.pre281 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.1 @@ -450,7 +450,7 @@ __barray_mask_borrow.exit259.2: ; preds = %cond_exit_369.threa cond_392_case_1.2: ; preds = %__barray_mask_borrow.exit259.2 %.fca.1.extract.2 = extractvalue { i1, i64, i1 } %130, 1 - notail call void @___dec_future_refcount(i64 %.fca.1.extract.2) + tail call void @___dec_future_refcount(i64 %.fca.1.extract.2) %.pre282 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.2 @@ -470,7 +470,7 @@ __barray_mask_borrow.exit259.3: ; preds = %cond_exit_369.threa cond_392_case_1.3: ; preds = %__barray_mask_borrow.exit259.3 %.fca.1.extract.3 = extractvalue { i1, i64, i1 } %135, 1 - notail call void @___dec_future_refcount(i64 %.fca.1.extract.3) + tail call void @___dec_future_refcount(i64 %.fca.1.extract.3) %.pre283 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.3 @@ -490,7 +490,7 @@ __barray_mask_borrow.exit259.4: ; preds = %cond_exit_369.threa cond_392_case_1.4: ; preds = %__barray_mask_borrow.exit259.4 %.fca.1.extract.4 = extractvalue { i1, i64, i1 } %140, 1 - notail call void @___dec_future_refcount(i64 %.fca.1.extract.4) + tail call void @___dec_future_refcount(i64 %.fca.1.extract.4) %.pre284 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.4 @@ -510,7 +510,7 @@ __barray_mask_borrow.exit259.5: ; preds = %cond_exit_369.threa cond_392_case_1.5: ; preds = %__barray_mask_borrow.exit259.5 %.fca.1.extract.5 = extractvalue { i1, i64, i1 } %145, 1 - notail call void @___dec_future_refcount(i64 %.fca.1.extract.5) + tail call void @___dec_future_refcount(i64 %.fca.1.extract.5) %.pre285 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.5 @@ -530,7 +530,7 @@ __barray_mask_borrow.exit259.6: ; preds = %cond_exit_369.threa cond_392_case_1.6: ; preds = %__barray_mask_borrow.exit259.6 %.fca.1.extract.6 = extractvalue { i1, i64, i1 } %150, 1 - notail call void @___dec_future_refcount(i64 %.fca.1.extract.6) + tail call void @___dec_future_refcount(i64 %.fca.1.extract.6) %.pre286 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.6 @@ -550,7 +550,7 @@ __barray_mask_borrow.exit259.7: ; preds = %cond_exit_369.threa cond_392_case_1.7: ; preds = %__barray_mask_borrow.exit259.7 %.fca.1.extract.7 = extractvalue { i1, i64, i1 } %155, 1 - notail call void @___dec_future_refcount(i64 %.fca.1.extract.7) + tail call void @___dec_future_refcount(i64 %.fca.1.extract.7) %.pre287 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.7 @@ -570,7 +570,7 @@ __barray_mask_borrow.exit259.8: ; preds = %cond_exit_369.threa cond_392_case_1.8: ; preds = %__barray_mask_borrow.exit259.8 %.fca.1.extract.8 = extractvalue { i1, i64, i1 } %160, 1 - notail call void @___dec_future_refcount(i64 %.fca.1.extract.8) + tail call void @___dec_future_refcount(i64 %.fca.1.extract.8) %.pre288 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.8 @@ -590,7 +590,7 @@ __barray_mask_borrow.exit259.9: ; preds = %cond_exit_369.threa cond_392_case_1.9: ; preds = %__barray_mask_borrow.exit259.9 %.fca.1.extract.9 = extractvalue { i1, i64, i1 } %165, 1 - notail call void @___dec_future_refcount(i64 %.fca.1.extract.9) + tail call void @___dec_future_refcount(i64 %.fca.1.extract.9) %.pre289 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.9 @@ -603,7 +603,7 @@ cond_exit_369.thread.9: ; preds = %cond_392_case_1.9, cond_392_case_1: ; preds = %__barray_mask_borrow.exit259 %.fca.1.extract = extractvalue { i1, i64, i1 } %120, 1 - notail call void @___dec_future_refcount(i64 %.fca.1.extract) + tail call void @___dec_future_refcount(i64 %.fca.1.extract) %.pre = load i64, ptr %74, align 4 br label %cond_exit_369.thread } @@ -630,7 +630,7 @@ declare void @___reset(i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !59 { entry: tail call void @setup(i64 %0), !dbg !63 - notail call void @"__hugr__.__main__.measure_qb_array..main.1"(), !dbg !63 + tail call void @"__hugr__.__main__.measure_qb_array..main.1"(), !dbg !63 %1 = tail call i64 @teardown(), !dbg !63 ret i64 %1, !dbg !63 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-no_results/no_results_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-no_results/no_results_x86_64-unknown-linux-gnu index a84e435a7..2b0bd5a60 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-no_results/no_results_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-no_results/no_results_x86_64-unknown-linux-gnu @@ -7,21 +7,21 @@ target triple = "x86_64-unknown-linux-gnu" define void @"__hugr__.__main__.no_results..bar.1"() local_unnamed_addr !dbg !4 { alloca_block: - %qalloc.i = notail call i64 @___qalloc(), !dbg !8 + %qalloc.i = tail call i64 @___qalloc(), !dbg !8 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 br i1 %not_max.not.not.i, label %cond_18_case_0.i, label %__hugr__.__tk2_qalloc.14.exit, !dbg !8 cond_18_case_0.i: ; preds = %alloca_block - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 unreachable, !dbg !8 __hugr__.__tk2_qalloc.14.exit: ; preds = %alloca_block - notail call void @___reset(i64 %qalloc.i), !dbg !8 - notail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 - notail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 - %lazy_measure = notail call i64 @___lazy_measure(i64 %qalloc.i) - notail call void @___qfree(i64 %qalloc.i) - notail call void @___dec_future_refcount(i64 %lazy_measure) + tail call void @___reset(i64 %qalloc.i), !dbg !8 + tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 + tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 + %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) ret void } @@ -45,7 +45,7 @@ declare void @___rz(i64, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !10 { entry: tail call void @setup(i64 %0), !dbg !15 - notail call void @"__hugr__.__main__.no_results..bar.1"(), !dbg !15 + tail call void @"__hugr__.__main__.no_results..bar.1"(), !dbg !15 %1 = tail call i64 @teardown(), !dbg !15 ret i64 %1, !dbg !15 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-postselect_exit/postselect_exit_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-postselect_exit/postselect_exit_x86_64-unknown-linux-gnu index b71a7cf59..38469c430 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-postselect_exit/postselect_exit_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-postselect_exit/postselect_exit_x86_64-unknown-linux-gnu @@ -9,33 +9,33 @@ target triple = "x86_64-unknown-linux-gnu" define void @"__hugr__.__main__.postselect_exit..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - %qalloc.i = notail call i64 @___qalloc(), !dbg !8 + %qalloc.i = tail call i64 @___qalloc(), !dbg !8 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 br i1 %not_max.not.not.i, label %cond_45_case_0.i, label %__hugr__.__tk2_qalloc.41.exit, !dbg !8 cond_45_case_0.i: ; preds = %alloca_block - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 unreachable, !dbg !8 __hugr__.__tk2_qalloc.41.exit: ; preds = %alloca_block - notail call void @___reset(i64 %qalloc.i), !dbg !8 - notail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 - notail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 - %lazy_measure = notail call i64 @___lazy_measure(i64 %qalloc.i) - notail call void @___qfree(i64 %qalloc.i) - notail call void @___inc_future_refcount(i64 %lazy_measure) + tail call void @___reset(i64 %qalloc.i), !dbg !8 + tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 + tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 + %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + tail call void @___qfree(i64 %qalloc.i) + tail call void @___inc_future_refcount(i64 %lazy_measure) %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - notail call void @___dec_future_refcount(i64 %lazy_measure) + tail call void @___dec_future_refcount(i64 %lazy_measure) br i1 %read_bool, label %0, label %cond_98_case_1 cond_98_case_1: ; preds = %__hugr__.__tk2_qalloc.41.exit %read_bool66 = tail call i1 @___read_future_bool(i64 %lazy_measure) - notail call void @___dec_future_refcount(i64 %lazy_measure) - notail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool66), !dbg !10 + tail call void @___dec_future_refcount(i64 %lazy_measure) + tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool66), !dbg !10 ret void 0: ; preds = %__hugr__.__tk2_qalloc.41.exit - notail call void @panic(i32 42, ptr nonnull @s_Postselect.13DF1CD0.0), !dbg !11 + tail call void @panic(i32 42, ptr nonnull @s_Postselect.13DF1CD0.0), !dbg !11 unreachable } @@ -65,7 +65,7 @@ declare void @___rz(i64, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !12 { entry: tail call void @setup(i64 %0), !dbg !17 - notail call void @"__hugr__.__main__.postselect_exit..main.1"(), !dbg !17 + tail call void @"__hugr__.__main__.postselect_exit..main.1"(), !dbg !17 %1 = tail call i64 @teardown(), !dbg !17 ret i64 %1, !dbg !17 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-postselect_panic/postselect_panic_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-postselect_panic/postselect_panic_x86_64-unknown-linux-gnu index f7d9e1414..70c237edc 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-postselect_panic/postselect_panic_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-postselect_panic/postselect_panic_x86_64-unknown-linux-gnu @@ -9,33 +9,33 @@ target triple = "x86_64-unknown-linux-gnu" define void @"__hugr__.__main__.postselect_panic..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - %qalloc.i = notail call i64 @___qalloc(), !dbg !8 + %qalloc.i = tail call i64 @___qalloc(), !dbg !8 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 br i1 %not_max.not.not.i, label %cond_43_case_0.i, label %__hugr__.__tk2_qalloc.39.exit, !dbg !8 cond_43_case_0.i: ; preds = %alloca_block - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 unreachable, !dbg !8 __hugr__.__tk2_qalloc.39.exit: ; preds = %alloca_block - notail call void @___reset(i64 %qalloc.i), !dbg !8 - notail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 - notail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 - %lazy_measure = notail call i64 @___lazy_measure(i64 %qalloc.i) - notail call void @___qfree(i64 %qalloc.i) - notail call void @___inc_future_refcount(i64 %lazy_measure) + tail call void @___reset(i64 %qalloc.i), !dbg !8 + tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 + tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 + %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + tail call void @___qfree(i64 %qalloc.i) + tail call void @___inc_future_refcount(i64 %lazy_measure) %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - notail call void @___dec_future_refcount(i64 %lazy_measure) + tail call void @___dec_future_refcount(i64 %lazy_measure) br i1 %read_bool, label %0, label %cond_96_case_1 cond_96_case_1: ; preds = %__hugr__.__tk2_qalloc.39.exit %read_bool65 = tail call i1 @___read_future_bool(i64 %lazy_measure) - notail call void @___dec_future_refcount(i64 %lazy_measure) - notail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool65), !dbg !10 + tail call void @___dec_future_refcount(i64 %lazy_measure) + tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool65), !dbg !10 ret void 0: ; preds = %__hugr__.__tk2_qalloc.39.exit - notail call void @panic(i32 1001, ptr nonnull @s_Postselect.13DF1CD0.0), !dbg !11 + tail call void @panic(i32 1001, ptr nonnull @s_Postselect.13DF1CD0.0), !dbg !11 unreachable } @@ -65,7 +65,7 @@ declare void @___rz(i64, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !12 { entry: tail call void @setup(i64 %0), !dbg !17 - notail call void @"__hugr__.__main__.postselect_panic..main.1"(), !dbg !17 + tail call void @"__hugr__.__main__.postselect_panic..main.1"(), !dbg !17 %1 = tail call i64 @teardown(), !dbg !17 ret i64 %1, !dbg !17 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-print_current_shot/print_current_shot_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-print_current_shot/print_current_shot_x86_64-unknown-linux-gnu index d5a548818..5b6f4a73a 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-print_current_shot/print_current_shot_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-print_current_shot/print_current_shot_x86_64-unknown-linux-gnu @@ -7,8 +7,8 @@ target triple = "x86_64-unknown-linux-gnu" define void @"__hugr__.__main__.print_current_shot..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - %shot = notail call i64 @get_current_shot(), !dbg !8 - notail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot), !dbg !9 + %shot = tail call i64 @get_current_shot(), !dbg !8 + tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot), !dbg !9 ret void } @@ -19,8 +19,8 @@ declare void @print_int(ptr, i64, i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !10 { entry: tail call void @setup(i64 %0), !dbg !15 - %shot.i = notail call i64 @get_current_shot(), !dbg !16 - notail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot.i), !dbg !18 + %shot.i = tail call i64 @get_current_shot(), !dbg !16 + tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot.i), !dbg !18 %1 = tail call i64 @teardown(), !dbg !15 ret i64 %1, !dbg !15 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-rng/rng_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-rng/rng_x86_64-unknown-linux-gnu index ffb4d1b61..802e05075 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-rng/rng_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-rng/rng_x86_64-unknown-linux-gnu @@ -13,27 +13,27 @@ target triple = "x86_64-unknown-linux-gnu" define void @"__hugr__.__main__.rng..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - notail call void @random_seed(i64 42), !dbg !8 - %rint = notail call i32 @random_int(), !dbg !17 - %rint14 = notail call i32 @random_int(), !dbg !18 - %rfloat = notail call double @random_float(), !dbg !19 - %rintb = notail call i32 @random_rng(i32 100), !dbg !20 + tail call void @random_seed(i64 42), !dbg !8 + %rint = tail call i32 @random_int(), !dbg !17 + %rint14 = tail call i32 @random_int(), !dbg !18 + %rfloat = tail call double @random_float(), !dbg !19 + %rintb = tail call i32 @random_rng(i32 100), !dbg !20 %0 = sext i32 %rintb to i64, !dbg !20 %1 = sext i32 %rint14 to i64, !dbg !18 %2 = sext i32 %rint to i64, !dbg !17 - notail call void @print_int(ptr nonnull @res_rint.B928E41E.0, i64 13, i64 %2), !dbg !21 - notail call void @print_int(ptr nonnull @res_rint1.0884EC03.0, i64 14, i64 %1), !dbg !22 - notail call void @print_float(ptr nonnull @res_rfloat.F0E4DD2C.0, i64 17, double %rfloat), !dbg !23 - notail call void @print_int(ptr nonnull @res_rint_bnd.CB1E6B0D.0, i64 17, i64 %0), !dbg !24 - notail call void @random_seed(i64 84), !dbg !25 - %rint47 = notail call i32 @random_int(), !dbg !27 - %rfloat49 = notail call double @random_float(), !dbg !28 - %rintb52 = notail call i32 @random_rng(i32 200), !dbg !29 + tail call void @print_int(ptr nonnull @res_rint.B928E41E.0, i64 13, i64 %2), !dbg !21 + tail call void @print_int(ptr nonnull @res_rint1.0884EC03.0, i64 14, i64 %1), !dbg !22 + tail call void @print_float(ptr nonnull @res_rfloat.F0E4DD2C.0, i64 17, double %rfloat), !dbg !23 + tail call void @print_int(ptr nonnull @res_rint_bnd.CB1E6B0D.0, i64 17, i64 %0), !dbg !24 + tail call void @random_seed(i64 84), !dbg !25 + %rint47 = tail call i32 @random_int(), !dbg !27 + %rfloat49 = tail call double @random_float(), !dbg !28 + %rintb52 = tail call i32 @random_rng(i32 200), !dbg !29 %3 = sext i32 %rintb52 to i64, !dbg !29 %4 = sext i32 %rint47 to i64, !dbg !27 - notail call void @print_int(ptr nonnull @res_rint2.F0335598.0, i64 14, i64 %4), !dbg !30 - notail call void @print_float(ptr nonnull @res_rfloat2.4DAB941F.0, i64 18, double %rfloat49), !dbg !31 - notail call void @print_int(ptr nonnull @res_rint_bnd2.169DE399.0, i64 18, i64 %3), !dbg !32 + tail call void @print_int(ptr nonnull @res_rint2.F0335598.0, i64 14, i64 %4), !dbg !30 + tail call void @print_float(ptr nonnull @res_rfloat2.4DAB941F.0, i64 18, double %rfloat49), !dbg !31 + tail call void @print_int(ptr nonnull @res_rint_bnd2.169DE399.0, i64 18, i64 %3), !dbg !32 ret void } @@ -52,7 +52,7 @@ declare void @random_seed(i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !33 { entry: tail call void @setup(i64 %0), !dbg !37 - notail call void @"__hugr__.__main__.rng..main.1"(), !dbg !37 + tail call void @"__hugr__.__main__.rng..main.1"(), !dbg !37 %1 = tail call i64 @teardown(), !dbg !37 ret i64 %1, !dbg !37 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-rus/rus_x86_64-unknown-linux-gnu b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-rus/rus_x86_64-unknown-linux-gnu index 33f9ea18e..9b2a555e5 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-rus/rus_x86_64-unknown-linux-gnu +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-unknown-linux-gnu-rus/rus_x86_64-unknown-linux-gnu @@ -8,88 +8,88 @@ target triple = "x86_64-unknown-linux-gnu" define void @"__hugr__.__main__.rus..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - %qalloc.i = notail call i64 @___qalloc(), !dbg !8 + %qalloc.i = tail call i64 @___qalloc(), !dbg !8 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 br i1 %not_max.not.not.i, label %cond_87_case_0.i, label %__hugr__.__tk2_qalloc.83.exit, !dbg !8 cond_87_case_0.i: ; preds = %alloca_block - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 unreachable, !dbg !8 __hugr__.__tk2_qalloc.83.exit: ; preds = %alloca_block - notail call void @___reset(i64 %qalloc.i), !dbg !8 - %qalloc.i132.i = notail call i64 @___qalloc(), !dbg !9 + tail call void @___reset(i64 %qalloc.i), !dbg !8 + %qalloc.i132.i = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i133.i = icmp eq i64 %qalloc.i132.i, -1, !dbg !9 br i1 %not_max.not.not.i133.i, label %cond_101_case_0.i.i, label %__hugr__.__tk2_qalloc.97.exit.i, !dbg !9 cond_101_case_0.i.i: ; preds = %cond_242_case_1.backedge.i, %__hugr__.__tk2_qalloc.83.exit - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 unreachable, !dbg !9 __hugr__.__tk2_qalloc.97.exit.i: ; preds = %__hugr__.__tk2_qalloc.83.exit, %cond_242_case_1.backedge.i %qalloc.i134.i = phi i64 [ %qalloc.i.i, %cond_242_case_1.backedge.i ], [ %qalloc.i132.i, %__hugr__.__tk2_qalloc.83.exit ] - notail call void @___reset(i64 %qalloc.i134.i), !dbg !9 - %qalloc.i128.i = notail call i64 @___qalloc(), !dbg !15 + tail call void @___reset(i64 %qalloc.i134.i), !dbg !9 + %qalloc.i128.i = tail call i64 @___qalloc(), !dbg !15 %not_max.not.not.i129.i = icmp eq i64 %qalloc.i128.i, -1, !dbg !15 br i1 %not_max.not.not.i129.i, label %cond_115_case_0.i.i, label %__hugr__.__tk2_qalloc.111.exit.i, !dbg !15 cond_115_case_0.i.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !15 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !15 unreachable, !dbg !15 __hugr__.__tk2_qalloc.111.exit.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i - notail call void @___reset(i64 %qalloc.i128.i), !dbg !15 - notail call void @___rxy(i64 %qalloc.i128.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !16 - notail call void @___rz(i64 %qalloc.i128.i, double 0x400921FB54442D18), !dbg !16 - notail call void @___rxy(i64 %qalloc.i134.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !17 - notail call void @___rz(i64 %qalloc.i134.i, double 0x400921FB54442D18), !dbg !17 - notail call void @___rz(i64 %qalloc.i134.i, double 0xBFE921FB54442D18), !dbg !18 - notail call void @___rxy(i64 %qalloc.i134.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18), !dbg !19 - notail call void @___rzz(i64 %qalloc.i128.i, i64 %qalloc.i134.i, double 0x3FF921FB54442D18), !dbg !19 - notail call void @___rz(i64 %qalloc.i128.i, double 0xBFF921FB54442D18), !dbg !19 - notail call void @___rxy(i64 %qalloc.i134.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18), !dbg !19 - notail call void @___rz(i64 %qalloc.i134.i, double 0xBFF921FB54442D18), !dbg !19 - notail call void @___rz(i64 %qalloc.i134.i, double 0x3FE921FB54442D18), !dbg !20 - %lazy_measure.i = notail call i64 @___lazy_measure(i64 %qalloc.i134.i) - notail call void @___qfree(i64 %qalloc.i134.i) + tail call void @___reset(i64 %qalloc.i128.i), !dbg !15 + tail call void @___rxy(i64 %qalloc.i128.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !16 + tail call void @___rz(i64 %qalloc.i128.i, double 0x400921FB54442D18), !dbg !16 + tail call void @___rxy(i64 %qalloc.i134.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !17 + tail call void @___rz(i64 %qalloc.i134.i, double 0x400921FB54442D18), !dbg !17 + tail call void @___rz(i64 %qalloc.i134.i, double 0xBFE921FB54442D18), !dbg !18 + tail call void @___rxy(i64 %qalloc.i134.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18), !dbg !19 + tail call void @___rzz(i64 %qalloc.i128.i, i64 %qalloc.i134.i, double 0x3FF921FB54442D18), !dbg !19 + tail call void @___rz(i64 %qalloc.i128.i, double 0xBFF921FB54442D18), !dbg !19 + tail call void @___rxy(i64 %qalloc.i134.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18), !dbg !19 + tail call void @___rz(i64 %qalloc.i134.i, double 0xBFF921FB54442D18), !dbg !19 + tail call void @___rz(i64 %qalloc.i134.i, double 0x3FE921FB54442D18), !dbg !20 + %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i134.i) + tail call void @___qfree(i64 %qalloc.i134.i) %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) - notail call void @___dec_future_refcount(i64 %lazy_measure.i) + tail call void @___dec_future_refcount(i64 %lazy_measure.i) br i1 %read_bool.i, label %cond_256_case_1.i, label %0 0: ; preds = %__hugr__.__tk2_qalloc.111.exit.i - notail call void @___qfree(i64 %qalloc.i128.i), !dbg !21 + tail call void @___qfree(i64 %qalloc.i128.i), !dbg !21 br label %cond_242_case_1.backedge.i cond_242_case_1.backedge.i: ; preds = %1, %0 - %qalloc.i.i = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.i = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1, !dbg !9 br i1 %not_max.not.not.i.i, label %cond_101_case_0.i.i, label %__hugr__.__tk2_qalloc.97.exit.i, !dbg !9 cond_256_case_1.i: ; preds = %__hugr__.__tk2_qalloc.111.exit.i - notail call void @___rz(i64 %qalloc.i, double 0x3FE921FB54442D18), !dbg !22 - notail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !23 - notail call void @___rxy(i64 %qalloc.i128.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18), !dbg !24 - notail call void @___rzz(i64 %qalloc.i, i64 %qalloc.i128.i, double 0x3FF921FB54442D18), !dbg !24 - notail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18), !dbg !24 - notail call void @___rxy(i64 %qalloc.i128.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18), !dbg !24 - notail call void @___rz(i64 %qalloc.i128.i, double 0xBFF921FB54442D18), !dbg !24 - notail call void @___rz(i64 %qalloc.i128.i, double 0x3FE921FB54442D18), !dbg !25 - %lazy_measure67.i = notail call i64 @___lazy_measure(i64 %qalloc.i128.i) - notail call void @___qfree(i64 %qalloc.i128.i) + tail call void @___rz(i64 %qalloc.i, double 0x3FE921FB54442D18), !dbg !22 + tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !23 + tail call void @___rxy(i64 %qalloc.i128.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18), !dbg !24 + tail call void @___rzz(i64 %qalloc.i, i64 %qalloc.i128.i, double 0x3FF921FB54442D18), !dbg !24 + tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18), !dbg !24 + tail call void @___rxy(i64 %qalloc.i128.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18), !dbg !24 + tail call void @___rz(i64 %qalloc.i128.i, double 0xBFF921FB54442D18), !dbg !24 + tail call void @___rz(i64 %qalloc.i128.i, double 0x3FE921FB54442D18), !dbg !25 + %lazy_measure67.i = tail call i64 @___lazy_measure(i64 %qalloc.i128.i) + tail call void @___qfree(i64 %qalloc.i128.i) %read_bool80.i = tail call i1 @___read_future_bool(i64 %lazy_measure67.i) - notail call void @___dec_future_refcount(i64 %lazy_measure67.i) + tail call void @___dec_future_refcount(i64 %lazy_measure67.i) br i1 %read_bool80.i, label %"__hugr__.__main__.rus..rus.17.exit", label %1 1: ; preds = %cond_256_case_1.i - notail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00), !dbg !26 + tail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00), !dbg !26 br label %cond_242_case_1.backedge.i "__hugr__.__main__.rus..rus.17.exit": ; preds = %cond_256_case_1.i - %lazy_measure = notail call i64 @___lazy_measure(i64 %qalloc.i) - notail call void @___qfree(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) - notail call void @___dec_future_refcount(i64 %lazy_measure) - notail call void @print_bool(ptr nonnull @res_result.457DE32D.0, i64 16, i1 %read_bool), !dbg !27 + tail call void @___dec_future_refcount(i64 %lazy_measure) + tail call void @print_bool(ptr nonnull @res_result.457DE32D.0, i64 16, i1 %read_bool), !dbg !27 ret void } @@ -119,7 +119,7 @@ declare void @___rzz(i64, i64, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !28 { entry: tail call void @setup(i64 %0), !dbg !30 - notail call void @"__hugr__.__main__.rus..main.1"(), !dbg !30 + tail call void @"__hugr__.__main__.rus..main.1"(), !dbg !30 %1 = tail call i64 @teardown(), !dbg !30 ret i64 %1, !dbg !30 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-discard_qb_array/discard_qb_array_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-discard_qb_array/discard_qb_array_x86_64-windows-msvc index 914dbc074..f9bb0b2b8 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-discard_qb_array/discard_qb_array_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-discard_qb_array/discard_qb_array_x86_64-windows-msvc @@ -12,34 +12,34 @@ alloca_block: %0 = tail call ptr @heap_alloc(i64 80), !dbg !8 %1 = tail call ptr @heap_alloc(i64 8), !dbg !8 store i64 -1, ptr %1, align 1, !dbg !8 - %qalloc.i = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !9 br i1 %not_max.not.not.i, label %cond_233_case_0.i, label %__barray_check_bounds.exit, !dbg !9 cond_233_case_0.i: ; preds = %cond_exit_20.8, %cond_exit_20.7, %cond_exit_20.6, %cond_exit_20.5, %cond_exit_20.4, %cond_exit_20.3, %cond_exit_20.2, %cond_exit_20.1, %cond_exit_20, %alloca_block - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 unreachable, !dbg !9 __barray_check_bounds.exit: ; preds = %alloca_block - notail call void @___reset(i64 %qalloc.i), !dbg !9 + tail call void @___reset(i64 %qalloc.i), !dbg !9 %2 = load i64, ptr %1, align 4 %3 = trunc i64 %2 to i1 br i1 %3, label %cond_exit_20, 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 - notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable cond_exit_20: ; preds = %__barray_check_bounds.exit %4 = and i64 %2, -2 store i64 %4, ptr %1, align 4 store i64 %qalloc.i, ptr %0, align 4 - %qalloc.i.1 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.1 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1, !dbg !9 br i1 %not_max.not.not.i.1, label %cond_233_case_0.i, label %__barray_check_bounds.exit.1, !dbg !9 __barray_check_bounds.exit.1: ; preds = %cond_exit_20 - notail call void @___reset(i64 %qalloc.i.1), !dbg !9 + tail call void @___reset(i64 %qalloc.i.1), !dbg !9 %5 = load i64, ptr %1, align 4 %6 = and i64 %5, 2 %.not = icmp eq i64 %6, 0 @@ -50,12 +50,12 @@ cond_exit_20.1: ; preds = %__barray_check_boun store i64 %7, ptr %1, align 4 %8 = getelementptr inbounds nuw i8, ptr %0, i64 8 store i64 %qalloc.i.1, ptr %8, align 4 - %qalloc.i.2 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.2 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1, !dbg !9 br i1 %not_max.not.not.i.2, label %cond_233_case_0.i, label %__barray_check_bounds.exit.2, !dbg !9 __barray_check_bounds.exit.2: ; preds = %cond_exit_20.1 - notail call void @___reset(i64 %qalloc.i.2), !dbg !9 + tail call void @___reset(i64 %qalloc.i.2), !dbg !9 %9 = load i64, ptr %1, align 4 %10 = and i64 %9, 4 %.not108 = icmp eq i64 %10, 0 @@ -66,12 +66,12 @@ cond_exit_20.2: ; preds = %__barray_check_boun store i64 %11, ptr %1, align 4 %12 = getelementptr inbounds nuw i8, ptr %0, i64 16 store i64 %qalloc.i.2, ptr %12, align 4 - %qalloc.i.3 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.3 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1, !dbg !9 br i1 %not_max.not.not.i.3, label %cond_233_case_0.i, label %__barray_check_bounds.exit.3, !dbg !9 __barray_check_bounds.exit.3: ; preds = %cond_exit_20.2 - notail call void @___reset(i64 %qalloc.i.3), !dbg !9 + tail call void @___reset(i64 %qalloc.i.3), !dbg !9 %13 = load i64, ptr %1, align 4 %14 = and i64 %13, 8 %.not109 = icmp eq i64 %14, 0 @@ -82,12 +82,12 @@ cond_exit_20.3: ; preds = %__barray_check_boun store i64 %15, ptr %1, align 4 %16 = getelementptr inbounds nuw i8, ptr %0, i64 24 store i64 %qalloc.i.3, ptr %16, align 4 - %qalloc.i.4 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.4 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1, !dbg !9 br i1 %not_max.not.not.i.4, label %cond_233_case_0.i, label %__barray_check_bounds.exit.4, !dbg !9 __barray_check_bounds.exit.4: ; preds = %cond_exit_20.3 - notail call void @___reset(i64 %qalloc.i.4), !dbg !9 + tail call void @___reset(i64 %qalloc.i.4), !dbg !9 %17 = load i64, ptr %1, align 4 %18 = and i64 %17, 16 %.not110 = icmp eq i64 %18, 0 @@ -98,12 +98,12 @@ cond_exit_20.4: ; preds = %__barray_check_boun store i64 %19, ptr %1, align 4 %20 = getelementptr inbounds nuw i8, ptr %0, i64 32 store i64 %qalloc.i.4, ptr %20, align 4 - %qalloc.i.5 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.5 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.5 = icmp eq i64 %qalloc.i.5, -1, !dbg !9 br i1 %not_max.not.not.i.5, label %cond_233_case_0.i, label %__barray_check_bounds.exit.5, !dbg !9 __barray_check_bounds.exit.5: ; preds = %cond_exit_20.4 - notail call void @___reset(i64 %qalloc.i.5), !dbg !9 + tail call void @___reset(i64 %qalloc.i.5), !dbg !9 %21 = load i64, ptr %1, align 4 %22 = and i64 %21, 32 %.not111 = icmp eq i64 %22, 0 @@ -114,12 +114,12 @@ cond_exit_20.5: ; preds = %__barray_check_boun store i64 %23, ptr %1, align 4 %24 = getelementptr inbounds nuw i8, ptr %0, i64 40 store i64 %qalloc.i.5, ptr %24, align 4 - %qalloc.i.6 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.6 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.6 = icmp eq i64 %qalloc.i.6, -1, !dbg !9 br i1 %not_max.not.not.i.6, label %cond_233_case_0.i, label %__barray_check_bounds.exit.6, !dbg !9 __barray_check_bounds.exit.6: ; preds = %cond_exit_20.5 - notail call void @___reset(i64 %qalloc.i.6), !dbg !9 + tail call void @___reset(i64 %qalloc.i.6), !dbg !9 %25 = load i64, ptr %1, align 4 %26 = and i64 %25, 64 %.not112 = icmp eq i64 %26, 0 @@ -130,12 +130,12 @@ cond_exit_20.6: ; preds = %__barray_check_boun store i64 %27, ptr %1, align 4 %28 = getelementptr inbounds nuw i8, ptr %0, i64 48 store i64 %qalloc.i.6, ptr %28, align 4 - %qalloc.i.7 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.7 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.7 = icmp eq i64 %qalloc.i.7, -1, !dbg !9 br i1 %not_max.not.not.i.7, label %cond_233_case_0.i, label %__barray_check_bounds.exit.7, !dbg !9 __barray_check_bounds.exit.7: ; preds = %cond_exit_20.6 - notail call void @___reset(i64 %qalloc.i.7), !dbg !9 + tail call void @___reset(i64 %qalloc.i.7), !dbg !9 %29 = load i64, ptr %1, align 4 %30 = and i64 %29, 128 %.not113 = icmp eq i64 %30, 0 @@ -146,12 +146,12 @@ cond_exit_20.7: ; preds = %__barray_check_boun store i64 %31, ptr %1, align 4 %32 = getelementptr inbounds nuw i8, ptr %0, i64 56 store i64 %qalloc.i.7, ptr %32, align 4 - %qalloc.i.8 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.8 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.8 = icmp eq i64 %qalloc.i.8, -1, !dbg !9 br i1 %not_max.not.not.i.8, label %cond_233_case_0.i, label %__barray_check_bounds.exit.8, !dbg !9 __barray_check_bounds.exit.8: ; preds = %cond_exit_20.7 - notail call void @___reset(i64 %qalloc.i.8), !dbg !9 + tail call void @___reset(i64 %qalloc.i.8), !dbg !9 %33 = load i64, ptr %1, align 4 %34 = and i64 %33, 256 %.not114 = icmp eq i64 %34, 0 @@ -162,12 +162,12 @@ cond_exit_20.8: ; preds = %__barray_check_boun store i64 %35, ptr %1, align 4 %36 = getelementptr inbounds nuw i8, ptr %0, i64 64 store i64 %qalloc.i.8, ptr %36, align 4 - %qalloc.i.9 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.9 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.9 = icmp eq i64 %qalloc.i.9, -1, !dbg !9 br i1 %not_max.not.not.i.9, label %cond_233_case_0.i, label %__barray_check_bounds.exit.9, !dbg !9 __barray_check_bounds.exit.9: ; preds = %cond_exit_20.8 - notail call void @___reset(i64 %qalloc.i.9), !dbg !9 + tail call void @___reset(i64 %qalloc.i.9), !dbg !9 %37 = load i64, ptr %1, align 4 %38 = and i64 %37, 512 %.not115 = icmp eq i64 %38, 0 @@ -193,7 +193,7 @@ __barray_mask_borrow.exit.1.i: ; preds = %cond_171_case_1.1.i store i64 %45, ptr %1, align 4, !dbg !21 %46 = getelementptr inbounds nuw i8, ptr %0, i64 8, !dbg !23 %47 = load i64, ptr %46, align 4, !dbg !23 - notail call void @___qfree(i64 %47), !dbg !24 + tail call void @___qfree(i64 %47), !dbg !24 %.pre337.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.2.i @@ -208,7 +208,7 @@ __barray_mask_borrow.exit.2.i: ; preds = %cond_171_case_1.2.i store i64 %50, ptr %1, align 4, !dbg !21 %51 = getelementptr inbounds nuw i8, ptr %0, i64 16, !dbg !23 %52 = load i64, ptr %51, align 4, !dbg !23 - notail call void @___qfree(i64 %52), !dbg !24 + tail call void @___qfree(i64 %52), !dbg !24 %.pre338.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.3.i @@ -223,7 +223,7 @@ __barray_mask_borrow.exit.3.i: ; preds = %cond_171_case_1.3.i store i64 %55, ptr %1, align 4, !dbg !21 %56 = getelementptr inbounds nuw i8, ptr %0, i64 24, !dbg !23 %57 = load i64, ptr %56, align 4, !dbg !23 - notail call void @___qfree(i64 %57), !dbg !24 + tail call void @___qfree(i64 %57), !dbg !24 %.pre339.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.4.i @@ -238,7 +238,7 @@ __barray_mask_borrow.exit.4.i: ; preds = %cond_171_case_1.4.i store i64 %60, ptr %1, align 4, !dbg !21 %61 = getelementptr inbounds nuw i8, ptr %0, i64 32, !dbg !23 %62 = load i64, ptr %61, align 4, !dbg !23 - notail call void @___qfree(i64 %62), !dbg !24 + tail call void @___qfree(i64 %62), !dbg !24 %.pre340.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.5.i @@ -253,7 +253,7 @@ __barray_mask_borrow.exit.5.i: ; preds = %cond_171_case_1.5.i store i64 %65, ptr %1, align 4, !dbg !21 %66 = getelementptr inbounds nuw i8, ptr %0, i64 40, !dbg !23 %67 = load i64, ptr %66, align 4, !dbg !23 - notail call void @___qfree(i64 %67), !dbg !24 + tail call void @___qfree(i64 %67), !dbg !24 %.pre341.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.6.i @@ -268,7 +268,7 @@ __barray_mask_borrow.exit.6.i: ; preds = %cond_171_case_1.6.i store i64 %70, ptr %1, align 4, !dbg !21 %71 = getelementptr inbounds nuw i8, ptr %0, i64 48, !dbg !23 %72 = load i64, ptr %71, align 4, !dbg !23 - notail call void @___qfree(i64 %72), !dbg !24 + tail call void @___qfree(i64 %72), !dbg !24 %.pre342.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.7.i @@ -283,7 +283,7 @@ __barray_mask_borrow.exit.7.i: ; preds = %cond_171_case_1.7.i store i64 %75, ptr %1, align 4, !dbg !21 %76 = getelementptr inbounds nuw i8, ptr %0, i64 56, !dbg !23 %77 = load i64, ptr %76, align 4, !dbg !23 - notail call void @___qfree(i64 %77), !dbg !24 + tail call void @___qfree(i64 %77), !dbg !24 %.pre343.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.8.i @@ -298,7 +298,7 @@ __barray_mask_borrow.exit.8.i: ; preds = %cond_171_case_1.8.i store i64 %80, ptr %1, align 4, !dbg !21 %81 = getelementptr inbounds nuw i8, ptr %0, i64 64, !dbg !23 %82 = load i64, ptr %81, align 4, !dbg !23 - notail call void @___qfree(i64 %82), !dbg !24 + tail call void @___qfree(i64 %82), !dbg !24 %.pre = load i64, ptr %1, align 4, !dbg !10 br label %__barray_check_bounds.exit.9.i @@ -313,7 +313,7 @@ __barray_mask_borrow.exit.9.i: ; preds = %__barray_check_boun store i64 %85, ptr %1, align 4, !dbg !21 %86 = getelementptr inbounds nuw i8, ptr %0, i64 72, !dbg !23 %87 = load i64, ptr %86, align 4, !dbg !23 - notail call void @___qfree(i64 %87), !dbg !24 + tail call void @___qfree(i64 %87), !dbg !24 %.pre344.i = load i64, ptr %1, align 4, !dbg !25 br label %cond_exit_156.i @@ -325,14 +325,14 @@ cond_exit_156.i: ; preds = %__barray_mask_borro br i1 %90, label %"__hugr__.guppylang.std.quantum.discard_array$10.113.exit", label %mask_block_err.i.i, !dbg !25 mask_block_err.i.i: ; preds = %cond_exit_156.i - notail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0"), !dbg !25 + tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0"), !dbg !25 unreachable, !dbg !25 __barray_mask_borrow.exit.i: ; preds = %cond_exit_20.9 %91 = or disjoint i64 %41, 1, !dbg !21 store i64 %91, ptr %1, align 4, !dbg !21 %92 = load i64, ptr %0, align 4, !dbg !23 - notail call void @___qfree(i64 %92), !dbg !24 + tail call void @___qfree(i64 %92), !dbg !24 %.pre.i = load i64, ptr %1, align 4, !dbg !10 br label %cond_171_case_1.1.i @@ -358,7 +358,7 @@ declare void @___reset(i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !28 { entry: tail call void @setup(i64 %0), !dbg !32 - notail call void @"__hugr__.__main__.discard_qb_array..main.1"(), !dbg !32 + tail call void @"__hugr__.__main__.discard_qb_array..main.1"(), !dbg !32 %1 = tail call i64 @teardown(), !dbg !32 ret i64 %1, !dbg !32 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-flip_some/flip_some_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-flip_some/flip_some_x86_64-windows-msvc index ca9ddaeab..4ff3138cb 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-flip_some/flip_some_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-flip_some/flip_some_x86_64-windows-msvc @@ -11,69 +11,69 @@ target triple = "x86_64-windows-msvc" define void @"__hugr__.__main__.flip_some..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - %qalloc.i = notail call i64 @___qalloc(), !dbg !8 + %qalloc.i = tail call i64 @___qalloc(), !dbg !8 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 br i1 %not_max.not.not.i, label %cond_40_case_0.i, label %__hugr__.__tk2_qalloc.36.exit, !dbg !8 cond_40_case_0.i: ; preds = %alloca_block - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 unreachable, !dbg !8 __hugr__.__tk2_qalloc.36.exit: ; preds = %alloca_block - notail call void @___reset(i64 %qalloc.i), !dbg !8 - notail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00), !dbg !9 - %qalloc.i101 = notail call i64 @___qalloc(), !dbg !10 + tail call void @___reset(i64 %qalloc.i), !dbg !8 + tail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00), !dbg !9 + %qalloc.i101 = tail call i64 @___qalloc(), !dbg !10 %not_max.not.not.i102 = icmp eq i64 %qalloc.i101, -1, !dbg !10 br i1 %not_max.not.not.i102, label %cond_54_case_0.i, label %__hugr__.__tk2_qalloc.50.exit, !dbg !10 cond_54_case_0.i: ; preds = %__hugr__.__tk2_qalloc.36.exit - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !10 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !10 unreachable, !dbg !10 __hugr__.__tk2_qalloc.50.exit: ; preds = %__hugr__.__tk2_qalloc.36.exit - notail call void @___reset(i64 %qalloc.i101), !dbg !10 - %qalloc.i103 = notail call i64 @___qalloc(), !dbg !11 + tail call void @___reset(i64 %qalloc.i101), !dbg !10 + %qalloc.i103 = tail call i64 @___qalloc(), !dbg !11 %not_max.not.not.i104 = icmp eq i64 %qalloc.i103, -1, !dbg !11 br i1 %not_max.not.not.i104, label %cond_68_case_0.i, label %__hugr__.__tk2_qalloc.64.exit, !dbg !11 cond_68_case_0.i: ; preds = %__hugr__.__tk2_qalloc.50.exit - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !11 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !11 unreachable, !dbg !11 __hugr__.__tk2_qalloc.64.exit: ; preds = %__hugr__.__tk2_qalloc.50.exit - notail call void @___reset(i64 %qalloc.i103), !dbg !11 - notail call void @___rxy(i64 %qalloc.i103, double 0x400921FB54442D18, double 0.000000e+00), !dbg !12 - %qalloc.i105 = notail call i64 @___qalloc(), !dbg !13 + tail call void @___reset(i64 %qalloc.i103), !dbg !11 + tail call void @___rxy(i64 %qalloc.i103, double 0x400921FB54442D18, double 0.000000e+00), !dbg !12 + %qalloc.i105 = tail call i64 @___qalloc(), !dbg !13 %not_max.not.not.i106 = icmp eq i64 %qalloc.i105, -1, !dbg !13 br i1 %not_max.not.not.i106, label %cond_82_case_0.i, label %__hugr__.__tk2_qalloc.78.exit, !dbg !13 cond_82_case_0.i: ; preds = %__hugr__.__tk2_qalloc.64.exit - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !13 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !13 unreachable, !dbg !13 __hugr__.__tk2_qalloc.78.exit: ; preds = %__hugr__.__tk2_qalloc.64.exit - notail call void @___reset(i64 %qalloc.i105), !dbg !13 - %lazy_measure = notail call i64 @___lazy_measure(i64 %qalloc.i) - notail call void @___qfree(i64 %qalloc.i) + tail call void @___reset(i64 %qalloc.i105), !dbg !13 + %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) - notail call void @___dec_future_refcount(i64 %lazy_measure) - notail call void @print_bool(ptr nonnull @res_c0.7C14CD6E.0, i64 12, i1 %read_bool), !dbg !14 - %lazy_measure22 = notail call i64 @___lazy_measure(i64 %qalloc.i101) - notail call void @___qfree(i64 %qalloc.i101) + 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), !dbg !14 + %lazy_measure22 = tail call i64 @___lazy_measure(i64 %qalloc.i101) + tail call void @___qfree(i64 %qalloc.i101) %read_bool35 = tail call i1 @___read_future_bool(i64 %lazy_measure22) - notail call void @___dec_future_refcount(i64 %lazy_measure22) - notail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool35), !dbg !15 - %lazy_measure44 = notail call i64 @___lazy_measure(i64 %qalloc.i103) - notail call void @___qfree(i64 %qalloc.i103) + tail call void @___dec_future_refcount(i64 %lazy_measure22) + tail call void @print_bool(ptr nonnull @res_c1.1F7A6571.0, i64 12, i1 %read_bool35), !dbg !15 + %lazy_measure44 = tail call i64 @___lazy_measure(i64 %qalloc.i103) + tail call void @___qfree(i64 %qalloc.i103) %read_bool57 = tail call i1 @___read_future_bool(i64 %lazy_measure44) - notail call void @___dec_future_refcount(i64 %lazy_measure44) - notail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool57), !dbg !16 - notail call void @___rxy(i64 %qalloc.i105, double 0x400921FB54442D18, double 0.000000e+00), !dbg !17 - %lazy_measure67 = notail call i64 @___lazy_measure(i64 %qalloc.i105) - notail call void @___qfree(i64 %qalloc.i105) + tail call void @___dec_future_refcount(i64 %lazy_measure44) + tail call void @print_bool(ptr nonnull @res_c2.60825383.0, i64 12, i1 %read_bool57), !dbg !16 + tail call void @___rxy(i64 %qalloc.i105, double 0x400921FB54442D18, double 0.000000e+00), !dbg !17 + %lazy_measure67 = tail call i64 @___lazy_measure(i64 %qalloc.i105) + tail call void @___qfree(i64 %qalloc.i105) %read_bool80 = tail call i1 @___read_future_bool(i64 %lazy_measure67) - notail call void @___dec_future_refcount(i64 %lazy_measure67) - notail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool80), !dbg !18 + tail call void @___dec_future_refcount(i64 %lazy_measure67) + tail call void @print_bool(ptr nonnull @res_c3.B223E16D.0, i64 12, i1 %read_bool80), !dbg !18 ret void } @@ -99,7 +99,7 @@ declare void @___rxy(i64, double, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !19 { entry: tail call void @setup(i64 %0), !dbg !24 - notail call void @"__hugr__.__main__.flip_some..main.1"(), !dbg !24 + tail call void @"__hugr__.__main__.flip_some..main.1"(), !dbg !24 %1 = tail call i64 @teardown(), !dbg !24 ret i64 %1, !dbg !24 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-measure_qb_array/measure_qb_array_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-measure_qb_array/measure_qb_array_x86_64-windows-msvc index 2734b505c..419d2b9a8 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-measure_qb_array/measure_qb_array_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-measure_qb_array/measure_qb_array_x86_64-windows-msvc @@ -13,34 +13,34 @@ alloca_block: %0 = tail call ptr @heap_alloc(i64 80), !dbg !8 %1 = tail call ptr @heap_alloc(i64 8), !dbg !8 store i64 -1, ptr %1, align 1, !dbg !8 - %qalloc.i = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !9 br i1 %not_max.not.not.i, label %cond_299_case_0.i, label %__barray_check_bounds.exit, !dbg !9 cond_299_case_0.i: ; preds = %cond_exit_20.8, %cond_exit_20.7, %cond_exit_20.6, %cond_exit_20.5, %cond_exit_20.4, %cond_exit_20.3, %cond_exit_20.2, %cond_exit_20.1, %cond_exit_20, %alloca_block - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 unreachable, !dbg !9 __barray_check_bounds.exit: ; preds = %alloca_block - notail call void @___reset(i64 %qalloc.i), !dbg !9 + tail call void @___reset(i64 %qalloc.i), !dbg !9 %2 = load i64, ptr %1, align 4 %3 = trunc i64 %2 to i1 br i1 %3, label %cond_exit_20, 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 - notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable cond_exit_20: ; preds = %__barray_check_bounds.exit %4 = and i64 %2, -2 store i64 %4, ptr %1, align 4 store i64 %qalloc.i, ptr %0, align 4 - %qalloc.i.1 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.1 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.1 = icmp eq i64 %qalloc.i.1, -1, !dbg !9 br i1 %not_max.not.not.i.1, label %cond_299_case_0.i, label %__barray_check_bounds.exit.1, !dbg !9 __barray_check_bounds.exit.1: ; preds = %cond_exit_20 - notail call void @___reset(i64 %qalloc.i.1), !dbg !9 + tail call void @___reset(i64 %qalloc.i.1), !dbg !9 %5 = load i64, ptr %1, align 4 %6 = and i64 %5, 2 %.not299 = icmp eq i64 %6, 0 @@ -51,12 +51,12 @@ cond_exit_20.1: ; preds = %__barray_check_boun store i64 %7, ptr %1, align 4 %8 = getelementptr inbounds nuw i8, ptr %0, i64 8 store i64 %qalloc.i.1, ptr %8, align 4 - %qalloc.i.2 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.2 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.2 = icmp eq i64 %qalloc.i.2, -1, !dbg !9 br i1 %not_max.not.not.i.2, label %cond_299_case_0.i, label %__barray_check_bounds.exit.2, !dbg !9 __barray_check_bounds.exit.2: ; preds = %cond_exit_20.1 - notail call void @___reset(i64 %qalloc.i.2), !dbg !9 + tail call void @___reset(i64 %qalloc.i.2), !dbg !9 %9 = load i64, ptr %1, align 4 %10 = and i64 %9, 4 %.not300 = icmp eq i64 %10, 0 @@ -67,12 +67,12 @@ cond_exit_20.2: ; preds = %__barray_check_boun store i64 %11, ptr %1, align 4 %12 = getelementptr inbounds nuw i8, ptr %0, i64 16 store i64 %qalloc.i.2, ptr %12, align 4 - %qalloc.i.3 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.3 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.3 = icmp eq i64 %qalloc.i.3, -1, !dbg !9 br i1 %not_max.not.not.i.3, label %cond_299_case_0.i, label %__barray_check_bounds.exit.3, !dbg !9 __barray_check_bounds.exit.3: ; preds = %cond_exit_20.2 - notail call void @___reset(i64 %qalloc.i.3), !dbg !9 + tail call void @___reset(i64 %qalloc.i.3), !dbg !9 %13 = load i64, ptr %1, align 4 %14 = and i64 %13, 8 %.not301 = icmp eq i64 %14, 0 @@ -83,12 +83,12 @@ cond_exit_20.3: ; preds = %__barray_check_boun store i64 %15, ptr %1, align 4 %16 = getelementptr inbounds nuw i8, ptr %0, i64 24 store i64 %qalloc.i.3, ptr %16, align 4 - %qalloc.i.4 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.4 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.4 = icmp eq i64 %qalloc.i.4, -1, !dbg !9 br i1 %not_max.not.not.i.4, label %cond_299_case_0.i, label %__barray_check_bounds.exit.4, !dbg !9 __barray_check_bounds.exit.4: ; preds = %cond_exit_20.3 - notail call void @___reset(i64 %qalloc.i.4), !dbg !9 + tail call void @___reset(i64 %qalloc.i.4), !dbg !9 %17 = load i64, ptr %1, align 4 %18 = and i64 %17, 16 %.not302 = icmp eq i64 %18, 0 @@ -99,12 +99,12 @@ cond_exit_20.4: ; preds = %__barray_check_boun store i64 %19, ptr %1, align 4 %20 = getelementptr inbounds nuw i8, ptr %0, i64 32 store i64 %qalloc.i.4, ptr %20, align 4 - %qalloc.i.5 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.5 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.5 = icmp eq i64 %qalloc.i.5, -1, !dbg !9 br i1 %not_max.not.not.i.5, label %cond_299_case_0.i, label %__barray_check_bounds.exit.5, !dbg !9 __barray_check_bounds.exit.5: ; preds = %cond_exit_20.4 - notail call void @___reset(i64 %qalloc.i.5), !dbg !9 + tail call void @___reset(i64 %qalloc.i.5), !dbg !9 %21 = load i64, ptr %1, align 4 %22 = and i64 %21, 32 %.not303 = icmp eq i64 %22, 0 @@ -115,12 +115,12 @@ cond_exit_20.5: ; preds = %__barray_check_boun store i64 %23, ptr %1, align 4 %24 = getelementptr inbounds nuw i8, ptr %0, i64 40 store i64 %qalloc.i.5, ptr %24, align 4 - %qalloc.i.6 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.6 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.6 = icmp eq i64 %qalloc.i.6, -1, !dbg !9 br i1 %not_max.not.not.i.6, label %cond_299_case_0.i, label %__barray_check_bounds.exit.6, !dbg !9 __barray_check_bounds.exit.6: ; preds = %cond_exit_20.5 - notail call void @___reset(i64 %qalloc.i.6), !dbg !9 + tail call void @___reset(i64 %qalloc.i.6), !dbg !9 %25 = load i64, ptr %1, align 4 %26 = and i64 %25, 64 %.not304 = icmp eq i64 %26, 0 @@ -131,12 +131,12 @@ cond_exit_20.6: ; preds = %__barray_check_boun store i64 %27, ptr %1, align 4 %28 = getelementptr inbounds nuw i8, ptr %0, i64 48 store i64 %qalloc.i.6, ptr %28, align 4 - %qalloc.i.7 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.7 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.7 = icmp eq i64 %qalloc.i.7, -1, !dbg !9 br i1 %not_max.not.not.i.7, label %cond_299_case_0.i, label %__barray_check_bounds.exit.7, !dbg !9 __barray_check_bounds.exit.7: ; preds = %cond_exit_20.6 - notail call void @___reset(i64 %qalloc.i.7), !dbg !9 + tail call void @___reset(i64 %qalloc.i.7), !dbg !9 %29 = load i64, ptr %1, align 4 %30 = and i64 %29, 128 %.not305 = icmp eq i64 %30, 0 @@ -147,12 +147,12 @@ cond_exit_20.7: ; preds = %__barray_check_boun store i64 %31, ptr %1, align 4 %32 = getelementptr inbounds nuw i8, ptr %0, i64 56 store i64 %qalloc.i.7, ptr %32, align 4 - %qalloc.i.8 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.8 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.8 = icmp eq i64 %qalloc.i.8, -1, !dbg !9 br i1 %not_max.not.not.i.8, label %cond_299_case_0.i, label %__barray_check_bounds.exit.8, !dbg !9 __barray_check_bounds.exit.8: ; preds = %cond_exit_20.7 - notail call void @___reset(i64 %qalloc.i.8), !dbg !9 + tail call void @___reset(i64 %qalloc.i.8), !dbg !9 %33 = load i64, ptr %1, align 4 %34 = and i64 %33, 256 %.not306 = icmp eq i64 %34, 0 @@ -163,12 +163,12 @@ cond_exit_20.8: ; preds = %__barray_check_boun store i64 %35, ptr %1, align 4 %36 = getelementptr inbounds nuw i8, ptr %0, i64 64 store i64 %qalloc.i.8, ptr %36, align 4 - %qalloc.i.9 = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.9 = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.9 = icmp eq i64 %qalloc.i.9, -1, !dbg !9 br i1 %not_max.not.not.i.9, label %cond_299_case_0.i, label %__barray_check_bounds.exit.9, !dbg !9 __barray_check_bounds.exit.9: ; preds = %cond_exit_20.8 - notail call void @___reset(i64 %qalloc.i.9), !dbg !9 + tail call void @___reset(i64 %qalloc.i.9), !dbg !9 %37 = load i64, ptr %1, align 4 %38 = and i64 %37, 512 %.not307 = icmp eq i64 %38, 0 @@ -187,20 +187,20 @@ cond_exit_20.9: ; preds = %__barray_check_boun br i1 %42, label %panic.i238, label %__barray_mask_borrow.exit, !dbg !10 panic.i238: ; preds = %cond_exit_20.9 - notail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !10 + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !10 unreachable, !dbg !10 __barray_mask_borrow.exit: ; preds = %cond_exit_20.9 %43 = or disjoint i64 %41, 1, !dbg !10 store i64 %43, ptr %1, align 4, !dbg !10 %44 = load i64, ptr %0, align 4, !dbg !12 - notail call void @___rxy(i64 %44, double 0x400921FB54442D18, double 0.000000e+00), !dbg !13 + tail call void @___rxy(i64 %44, double 0x400921FB54442D18, double 0.000000e+00), !dbg !13 %45 = load i64, ptr %1, align 4, !dbg !12 %46 = trunc i64 %45 to i1, !dbg !12 br i1 %46, label %__barray_mask_return.exit240, label %panic.i239, !dbg !12 panic.i239: ; preds = %__barray_mask_borrow.exit - notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !12 + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !12 unreachable, !dbg !12 __barray_mask_return.exit240: ; preds = %__barray_mask_borrow.exit @@ -213,7 +213,7 @@ __barray_mask_return.exit240: ; preds = %__barray_mask_borro br i1 %.not, label %__barray_mask_borrow.exit242, label %panic.i241, !dbg !14 panic.i241: ; preds = %__barray_mask_return.exit240 - notail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !14 + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !14 unreachable, !dbg !14 __barray_mask_borrow.exit242: ; preds = %__barray_mask_return.exit240 @@ -221,14 +221,14 @@ __barray_mask_borrow.exit242: ; preds = %__barray_mask_retur store i64 %50, ptr %1, align 4, !dbg !14 %51 = getelementptr inbounds nuw i8, ptr %0, i64 16, !dbg !16 %52 = load i64, ptr %51, align 4, !dbg !16 - notail call void @___rxy(i64 %52, double 0x400921FB54442D18, double 0.000000e+00), !dbg !17 + tail call void @___rxy(i64 %52, double 0x400921FB54442D18, double 0.000000e+00), !dbg !17 %53 = load i64, ptr %1, align 4, !dbg !16 %54 = and i64 %53, 4, !dbg !16 %.not268 = icmp eq i64 %54, 0, !dbg !16 br i1 %.not268, label %panic.i243, label %__barray_mask_return.exit244, !dbg !16 panic.i243: ; preds = %__barray_mask_borrow.exit242 - notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !16 + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !16 unreachable, !dbg !16 __barray_mask_return.exit244: ; preds = %__barray_mask_borrow.exit242 @@ -241,7 +241,7 @@ __barray_mask_return.exit244: ; preds = %__barray_mask_borro br i1 %.not269, label %__barray_mask_borrow.exit246, label %panic.i245, !dbg !18 panic.i245: ; preds = %__barray_mask_return.exit244 - notail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !18 + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !18 unreachable, !dbg !18 __barray_mask_borrow.exit246: ; preds = %__barray_mask_return.exit244 @@ -249,14 +249,14 @@ __barray_mask_borrow.exit246: ; preds = %__barray_mask_retur store i64 %58, ptr %1, align 4, !dbg !18 %59 = getelementptr inbounds nuw i8, ptr %0, i64 24, !dbg !20 %60 = load i64, ptr %59, align 4, !dbg !20 - notail call void @___rxy(i64 %60, double 0x400921FB54442D18, double 0.000000e+00), !dbg !21 + tail call void @___rxy(i64 %60, double 0x400921FB54442D18, double 0.000000e+00), !dbg !21 %61 = load i64, ptr %1, align 4, !dbg !20 %62 = and i64 %61, 8, !dbg !20 %.not270 = icmp eq i64 %62, 0, !dbg !20 br i1 %.not270, label %panic.i247, label %__barray_mask_return.exit248, !dbg !20 panic.i247: ; preds = %__barray_mask_borrow.exit246 - notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !20 + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !20 unreachable, !dbg !20 __barray_mask_return.exit248: ; preds = %__barray_mask_borrow.exit246 @@ -269,7 +269,7 @@ __barray_mask_return.exit248: ; preds = %__barray_mask_borro br i1 %.not271, label %__barray_mask_borrow.exit250, label %panic.i249, !dbg !22 panic.i249: ; preds = %__barray_mask_return.exit248 - notail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !22 + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !22 unreachable, !dbg !22 __barray_mask_borrow.exit250: ; preds = %__barray_mask_return.exit248 @@ -277,14 +277,14 @@ __barray_mask_borrow.exit250: ; preds = %__barray_mask_retur store i64 %66, ptr %1, align 4, !dbg !22 %67 = getelementptr inbounds nuw i8, ptr %0, i64 72, !dbg !24 %68 = load i64, ptr %67, align 4, !dbg !24 - notail call void @___rxy(i64 %68, double 0x400921FB54442D18, double 0.000000e+00), !dbg !25 + tail call void @___rxy(i64 %68, double 0x400921FB54442D18, double 0.000000e+00), !dbg !25 %69 = load i64, ptr %1, align 4, !dbg !24 %70 = and i64 %69, 512, !dbg !24 %.not272 = icmp eq i64 %70, 0, !dbg !24 br i1 %.not272, label %panic.i251, label %__barray_mask_return.exit252, !dbg !24 panic.i251: ; preds = %__barray_mask_borrow.exit250 - notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !24 + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0"), !dbg !24 unreachable, !dbg !24 __barray_mask_return.exit252: ; preds = %__barray_mask_borrow.exit250 @@ -335,7 +335,7 @@ mask_block_ok.i.i.i: ; preds = %75, %93 br i1 %96, label %93, label %mask_block_err.i.i.i, !dbg !44 mask_block_err.i.i.i: ; preds = %mask_block_ok.i.i.i - notail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0"), !dbg !44 + tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0"), !dbg !44 unreachable, !dbg !44 __barray_check_bounds.exit.i.i: ; preds = %loop_body.i, %__barray_mask_return.exit252 @@ -355,7 +355,7 @@ __barray_check_bounds.exit.i.i: ; preds = %loop_body.i, %__bar br i1 %104, label %panic.i.i.i, label %__barray_check_bounds.exit.i, !dbg !56 panic.i.i.i: ; preds = %__barray_check_bounds.exit.i.i - notail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !56 + tail call void @panic(i32 1002, ptr nonnull @"e_Array elem.E746B1A3.0"), !dbg !56 unreachable, !dbg !56 __barray_check_bounds.exit.i: ; preds = %__barray_check_bounds.exit.i.i @@ -364,15 +364,15 @@ __barray_check_bounds.exit.i: ; preds = %__barray_check_boun store i64 %106, ptr %100, align 4, !dbg !56 %107 = getelementptr inbounds i64, ptr %.fca.0.extract80.i185.i, i64 %98, !dbg !55 %108 = load i64, ptr %107, align 4, !dbg !55 - %lazy_measure.i = notail call i64 @___lazy_measure(i64 %108) - notail call void @___qfree(i64 %108) + %lazy_measure.i = tail call i64 @___lazy_measure(i64 %108) + tail call void @___qfree(i64 %108) %109 = load i64, ptr %74, align 4 %110 = lshr i64 %109, %"163_0.sroa.15.0184.i" %111 = trunc i64 %110 to i1 br i1 %111, label %loop_body.i, label %panic.i.i panic.i.i: ; preds = %__barray_check_bounds.exit.i - notail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") + tail call void @panic(i32 1002, ptr nonnull @"e_Array alre.5A300C2A.0") unreachable loop_body.i: ; preds = %__barray_check_bounds.exit.i @@ -404,7 +404,7 @@ cond_exit_369: ; preds = %cond_exit_369.threa ret void mask_block_err.i: ; preds = %cond_exit_369.thread.9 - notail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") + tail call void @panic(i32 1002, ptr nonnull @"e_Array cont.EFA5AC45.0") unreachable __barray_mask_borrow.exit259: ; preds = %"__hugr__.guppylang.std.quantum.measure_array$10.149.exit" @@ -430,7 +430,7 @@ __barray_mask_borrow.exit259.1: ; preds = %cond_exit_369.threa cond_392_case_1.1: ; preds = %__barray_mask_borrow.exit259.1 %.fca.1.extract.1 = extractvalue { i1, i64, i1 } %125, 1 - notail call void @___dec_future_refcount(i64 %.fca.1.extract.1) + tail call void @___dec_future_refcount(i64 %.fca.1.extract.1) %.pre281 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.1 @@ -450,7 +450,7 @@ __barray_mask_borrow.exit259.2: ; preds = %cond_exit_369.threa cond_392_case_1.2: ; preds = %__barray_mask_borrow.exit259.2 %.fca.1.extract.2 = extractvalue { i1, i64, i1 } %130, 1 - notail call void @___dec_future_refcount(i64 %.fca.1.extract.2) + tail call void @___dec_future_refcount(i64 %.fca.1.extract.2) %.pre282 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.2 @@ -470,7 +470,7 @@ __barray_mask_borrow.exit259.3: ; preds = %cond_exit_369.threa cond_392_case_1.3: ; preds = %__barray_mask_borrow.exit259.3 %.fca.1.extract.3 = extractvalue { i1, i64, i1 } %135, 1 - notail call void @___dec_future_refcount(i64 %.fca.1.extract.3) + tail call void @___dec_future_refcount(i64 %.fca.1.extract.3) %.pre283 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.3 @@ -490,7 +490,7 @@ __barray_mask_borrow.exit259.4: ; preds = %cond_exit_369.threa cond_392_case_1.4: ; preds = %__barray_mask_borrow.exit259.4 %.fca.1.extract.4 = extractvalue { i1, i64, i1 } %140, 1 - notail call void @___dec_future_refcount(i64 %.fca.1.extract.4) + tail call void @___dec_future_refcount(i64 %.fca.1.extract.4) %.pre284 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.4 @@ -510,7 +510,7 @@ __barray_mask_borrow.exit259.5: ; preds = %cond_exit_369.threa cond_392_case_1.5: ; preds = %__barray_mask_borrow.exit259.5 %.fca.1.extract.5 = extractvalue { i1, i64, i1 } %145, 1 - notail call void @___dec_future_refcount(i64 %.fca.1.extract.5) + tail call void @___dec_future_refcount(i64 %.fca.1.extract.5) %.pre285 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.5 @@ -530,7 +530,7 @@ __barray_mask_borrow.exit259.6: ; preds = %cond_exit_369.threa cond_392_case_1.6: ; preds = %__barray_mask_borrow.exit259.6 %.fca.1.extract.6 = extractvalue { i1, i64, i1 } %150, 1 - notail call void @___dec_future_refcount(i64 %.fca.1.extract.6) + tail call void @___dec_future_refcount(i64 %.fca.1.extract.6) %.pre286 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.6 @@ -550,7 +550,7 @@ __barray_mask_borrow.exit259.7: ; preds = %cond_exit_369.threa cond_392_case_1.7: ; preds = %__barray_mask_borrow.exit259.7 %.fca.1.extract.7 = extractvalue { i1, i64, i1 } %155, 1 - notail call void @___dec_future_refcount(i64 %.fca.1.extract.7) + tail call void @___dec_future_refcount(i64 %.fca.1.extract.7) %.pre287 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.7 @@ -570,7 +570,7 @@ __barray_mask_borrow.exit259.8: ; preds = %cond_exit_369.threa cond_392_case_1.8: ; preds = %__barray_mask_borrow.exit259.8 %.fca.1.extract.8 = extractvalue { i1, i64, i1 } %160, 1 - notail call void @___dec_future_refcount(i64 %.fca.1.extract.8) + tail call void @___dec_future_refcount(i64 %.fca.1.extract.8) %.pre288 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.8 @@ -590,7 +590,7 @@ __barray_mask_borrow.exit259.9: ; preds = %cond_exit_369.threa cond_392_case_1.9: ; preds = %__barray_mask_borrow.exit259.9 %.fca.1.extract.9 = extractvalue { i1, i64, i1 } %165, 1 - notail call void @___dec_future_refcount(i64 %.fca.1.extract.9) + tail call void @___dec_future_refcount(i64 %.fca.1.extract.9) %.pre289 = load i64, ptr %74, align 4 br label %cond_exit_369.thread.9 @@ -603,7 +603,7 @@ cond_exit_369.thread.9: ; preds = %cond_392_case_1.9, cond_392_case_1: ; preds = %__barray_mask_borrow.exit259 %.fca.1.extract = extractvalue { i1, i64, i1 } %120, 1 - notail call void @___dec_future_refcount(i64 %.fca.1.extract) + tail call void @___dec_future_refcount(i64 %.fca.1.extract) %.pre = load i64, ptr %74, align 4 br label %cond_exit_369.thread } @@ -630,7 +630,7 @@ declare void @___reset(i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !59 { entry: tail call void @setup(i64 %0), !dbg !63 - notail call void @"__hugr__.__main__.measure_qb_array..main.1"(), !dbg !63 + tail call void @"__hugr__.__main__.measure_qb_array..main.1"(), !dbg !63 %1 = tail call i64 @teardown(), !dbg !63 ret i64 %1, !dbg !63 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-no_results/no_results_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-no_results/no_results_x86_64-windows-msvc index e6cb14582..3272e6249 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-no_results/no_results_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-no_results/no_results_x86_64-windows-msvc @@ -7,21 +7,21 @@ target triple = "x86_64-windows-msvc" define void @"__hugr__.__main__.no_results..bar.1"() local_unnamed_addr !dbg !4 { alloca_block: - %qalloc.i = notail call i64 @___qalloc(), !dbg !8 + %qalloc.i = tail call i64 @___qalloc(), !dbg !8 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 br i1 %not_max.not.not.i, label %cond_18_case_0.i, label %__hugr__.__tk2_qalloc.14.exit, !dbg !8 cond_18_case_0.i: ; preds = %alloca_block - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 unreachable, !dbg !8 __hugr__.__tk2_qalloc.14.exit: ; preds = %alloca_block - notail call void @___reset(i64 %qalloc.i), !dbg !8 - notail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 - notail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 - %lazy_measure = notail call i64 @___lazy_measure(i64 %qalloc.i) - notail call void @___qfree(i64 %qalloc.i) - notail call void @___dec_future_refcount(i64 %lazy_measure) + tail call void @___reset(i64 %qalloc.i), !dbg !8 + tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 + tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 + %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) ret void } @@ -45,7 +45,7 @@ declare void @___rz(i64, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !10 { entry: tail call void @setup(i64 %0), !dbg !15 - notail call void @"__hugr__.__main__.no_results..bar.1"(), !dbg !15 + tail call void @"__hugr__.__main__.no_results..bar.1"(), !dbg !15 %1 = tail call i64 @teardown(), !dbg !15 ret i64 %1, !dbg !15 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-postselect_exit/postselect_exit_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-postselect_exit/postselect_exit_x86_64-windows-msvc index 8c6c88ec9..2b142ff01 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-postselect_exit/postselect_exit_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-postselect_exit/postselect_exit_x86_64-windows-msvc @@ -9,33 +9,33 @@ target triple = "x86_64-windows-msvc" define void @"__hugr__.__main__.postselect_exit..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - %qalloc.i = notail call i64 @___qalloc(), !dbg !8 + %qalloc.i = tail call i64 @___qalloc(), !dbg !8 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 br i1 %not_max.not.not.i, label %cond_45_case_0.i, label %__hugr__.__tk2_qalloc.41.exit, !dbg !8 cond_45_case_0.i: ; preds = %alloca_block - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 unreachable, !dbg !8 __hugr__.__tk2_qalloc.41.exit: ; preds = %alloca_block - notail call void @___reset(i64 %qalloc.i), !dbg !8 - notail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 - notail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 - %lazy_measure = notail call i64 @___lazy_measure(i64 %qalloc.i) - notail call void @___qfree(i64 %qalloc.i) - notail call void @___inc_future_refcount(i64 %lazy_measure) + tail call void @___reset(i64 %qalloc.i), !dbg !8 + tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 + tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 + %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + tail call void @___qfree(i64 %qalloc.i) + tail call void @___inc_future_refcount(i64 %lazy_measure) %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - notail call void @___dec_future_refcount(i64 %lazy_measure) + tail call void @___dec_future_refcount(i64 %lazy_measure) br i1 %read_bool, label %0, label %cond_98_case_1 cond_98_case_1: ; preds = %__hugr__.__tk2_qalloc.41.exit %read_bool66 = tail call i1 @___read_future_bool(i64 %lazy_measure) - notail call void @___dec_future_refcount(i64 %lazy_measure) - notail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool66), !dbg !10 + tail call void @___dec_future_refcount(i64 %lazy_measure) + tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool66), !dbg !10 ret void 0: ; preds = %__hugr__.__tk2_qalloc.41.exit - notail call void @panic(i32 42, ptr nonnull @s_Postselect.13DF1CD0.0), !dbg !11 + tail call void @panic(i32 42, ptr nonnull @s_Postselect.13DF1CD0.0), !dbg !11 unreachable } @@ -65,7 +65,7 @@ declare void @___rz(i64, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !12 { entry: tail call void @setup(i64 %0), !dbg !17 - notail call void @"__hugr__.__main__.postselect_exit..main.1"(), !dbg !17 + tail call void @"__hugr__.__main__.postselect_exit..main.1"(), !dbg !17 %1 = tail call i64 @teardown(), !dbg !17 ret i64 %1, !dbg !17 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-postselect_panic/postselect_panic_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-postselect_panic/postselect_panic_x86_64-windows-msvc index 3d6dfaf95..4012ba1cc 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-postselect_panic/postselect_panic_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-postselect_panic/postselect_panic_x86_64-windows-msvc @@ -9,33 +9,33 @@ target triple = "x86_64-windows-msvc" define void @"__hugr__.__main__.postselect_panic..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - %qalloc.i = notail call i64 @___qalloc(), !dbg !8 + %qalloc.i = tail call i64 @___qalloc(), !dbg !8 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 br i1 %not_max.not.not.i, label %cond_43_case_0.i, label %__hugr__.__tk2_qalloc.39.exit, !dbg !8 cond_43_case_0.i: ; preds = %alloca_block - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 unreachable, !dbg !8 __hugr__.__tk2_qalloc.39.exit: ; preds = %alloca_block - notail call void @___reset(i64 %qalloc.i), !dbg !8 - notail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 - notail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 - %lazy_measure = notail call i64 @___lazy_measure(i64 %qalloc.i) - notail call void @___qfree(i64 %qalloc.i) - notail call void @___inc_future_refcount(i64 %lazy_measure) + tail call void @___reset(i64 %qalloc.i), !dbg !8 + tail call void @___rxy(i64 %qalloc.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !9 + tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !9 + %lazy_measure = tail call i64 @___lazy_measure(i64 %qalloc.i) + tail call void @___qfree(i64 %qalloc.i) + tail call void @___inc_future_refcount(i64 %lazy_measure) %read_bool = tail call i1 @___read_future_bool(i64 %lazy_measure) - notail call void @___dec_future_refcount(i64 %lazy_measure) + tail call void @___dec_future_refcount(i64 %lazy_measure) br i1 %read_bool, label %0, label %cond_96_case_1 cond_96_case_1: ; preds = %__hugr__.__tk2_qalloc.39.exit %read_bool65 = tail call i1 @___read_future_bool(i64 %lazy_measure) - notail call void @___dec_future_refcount(i64 %lazy_measure) - notail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool65), !dbg !10 + tail call void @___dec_future_refcount(i64 %lazy_measure) + tail call void @print_bool(ptr nonnull @res_c.1C9EF4D1.0, i64 11, i1 %read_bool65), !dbg !10 ret void 0: ; preds = %__hugr__.__tk2_qalloc.39.exit - notail call void @panic(i32 1001, ptr nonnull @s_Postselect.13DF1CD0.0), !dbg !11 + tail call void @panic(i32 1001, ptr nonnull @s_Postselect.13DF1CD0.0), !dbg !11 unreachable } @@ -65,7 +65,7 @@ declare void @___rz(i64, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !12 { entry: tail call void @setup(i64 %0), !dbg !17 - notail call void @"__hugr__.__main__.postselect_panic..main.1"(), !dbg !17 + tail call void @"__hugr__.__main__.postselect_panic..main.1"(), !dbg !17 %1 = tail call i64 @teardown(), !dbg !17 ret i64 %1, !dbg !17 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-print_current_shot/print_current_shot_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-print_current_shot/print_current_shot_x86_64-windows-msvc index 697995e11..324ca126f 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-print_current_shot/print_current_shot_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-print_current_shot/print_current_shot_x86_64-windows-msvc @@ -7,8 +7,8 @@ target triple = "x86_64-windows-msvc" define void @"__hugr__.__main__.print_current_shot..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - %shot = notail call i64 @get_current_shot(), !dbg !8 - notail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot), !dbg !9 + %shot = tail call i64 @get_current_shot(), !dbg !8 + tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot), !dbg !9 ret void } @@ -19,8 +19,8 @@ declare void @print_int(ptr, i64, i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !10 { entry: tail call void @setup(i64 %0), !dbg !15 - %shot.i = notail call i64 @get_current_shot(), !dbg !16 - notail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot.i), !dbg !18 + %shot.i = tail call i64 @get_current_shot(), !dbg !16 + tail call void @print_int(ptr nonnull @res_shot.6D86EAF7.0, i64 13, i64 %shot.i), !dbg !18 %1 = tail call i64 @teardown(), !dbg !15 ret i64 %1, !dbg !15 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-rng/rng_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-rng/rng_x86_64-windows-msvc index 393c41144..c0a74200b 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-rng/rng_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-rng/rng_x86_64-windows-msvc @@ -13,27 +13,27 @@ target triple = "x86_64-windows-msvc" define void @"__hugr__.__main__.rng..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - notail call void @random_seed(i64 42), !dbg !8 - %rint = notail call i32 @random_int(), !dbg !17 - %rint14 = notail call i32 @random_int(), !dbg !18 - %rfloat = notail call double @random_float(), !dbg !19 - %rintb = notail call i32 @random_rng(i32 100), !dbg !20 + tail call void @random_seed(i64 42), !dbg !8 + %rint = tail call i32 @random_int(), !dbg !17 + %rint14 = tail call i32 @random_int(), !dbg !18 + %rfloat = tail call double @random_float(), !dbg !19 + %rintb = tail call i32 @random_rng(i32 100), !dbg !20 %0 = sext i32 %rintb to i64, !dbg !20 %1 = sext i32 %rint14 to i64, !dbg !18 %2 = sext i32 %rint to i64, !dbg !17 - notail call void @print_int(ptr nonnull @res_rint.B928E41E.0, i64 13, i64 %2), !dbg !21 - notail call void @print_int(ptr nonnull @res_rint1.0884EC03.0, i64 14, i64 %1), !dbg !22 - notail call void @print_float(ptr nonnull @res_rfloat.F0E4DD2C.0, i64 17, double %rfloat), !dbg !23 - notail call void @print_int(ptr nonnull @res_rint_bnd.CB1E6B0D.0, i64 17, i64 %0), !dbg !24 - notail call void @random_seed(i64 84), !dbg !25 - %rint47 = notail call i32 @random_int(), !dbg !27 - %rfloat49 = notail call double @random_float(), !dbg !28 - %rintb52 = notail call i32 @random_rng(i32 200), !dbg !29 + tail call void @print_int(ptr nonnull @res_rint.B928E41E.0, i64 13, i64 %2), !dbg !21 + tail call void @print_int(ptr nonnull @res_rint1.0884EC03.0, i64 14, i64 %1), !dbg !22 + tail call void @print_float(ptr nonnull @res_rfloat.F0E4DD2C.0, i64 17, double %rfloat), !dbg !23 + tail call void @print_int(ptr nonnull @res_rint_bnd.CB1E6B0D.0, i64 17, i64 %0), !dbg !24 + tail call void @random_seed(i64 84), !dbg !25 + %rint47 = tail call i32 @random_int(), !dbg !27 + %rfloat49 = tail call double @random_float(), !dbg !28 + %rintb52 = tail call i32 @random_rng(i32 200), !dbg !29 %3 = sext i32 %rintb52 to i64, !dbg !29 %4 = sext i32 %rint47 to i64, !dbg !27 - notail call void @print_int(ptr nonnull @res_rint2.F0335598.0, i64 14, i64 %4), !dbg !30 - notail call void @print_float(ptr nonnull @res_rfloat2.4DAB941F.0, i64 18, double %rfloat49), !dbg !31 - notail call void @print_int(ptr nonnull @res_rint_bnd2.169DE399.0, i64 18, i64 %3), !dbg !32 + tail call void @print_int(ptr nonnull @res_rint2.F0335598.0, i64 14, i64 %4), !dbg !30 + tail call void @print_float(ptr nonnull @res_rfloat2.4DAB941F.0, i64 18, double %rfloat49), !dbg !31 + tail call void @print_int(ptr nonnull @res_rint_bnd2.169DE399.0, i64 18, i64 %3), !dbg !32 ret void } @@ -52,7 +52,7 @@ declare void @random_seed(i64) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !33 { entry: tail call void @setup(i64 %0), !dbg !37 - notail call void @"__hugr__.__main__.rng..main.1"(), !dbg !37 + tail call void @"__hugr__.__main__.rng..main.1"(), !dbg !37 %1 = tail call i64 @teardown(), !dbg !37 ret i64 %1, !dbg !37 } diff --git a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-rus/rus_x86_64-windows-msvc b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-rus/rus_x86_64-windows-msvc index ef37409a2..40deb85c3 100644 --- a/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-rus/rus_x86_64-windows-msvc +++ b/qis-compiler/python/tests/snapshots/test_basic_generation/test_llvm/x86_64-windows-msvc-rus/rus_x86_64-windows-msvc @@ -8,88 +8,88 @@ target triple = "x86_64-windows-msvc" define void @"__hugr__.__main__.rus..main.1"() local_unnamed_addr !dbg !4 { alloca_block: - %qalloc.i = notail call i64 @___qalloc(), !dbg !8 + %qalloc.i = tail call i64 @___qalloc(), !dbg !8 %not_max.not.not.i = icmp eq i64 %qalloc.i, -1, !dbg !8 br i1 %not_max.not.not.i, label %cond_87_case_0.i, label %__hugr__.__tk2_qalloc.83.exit, !dbg !8 cond_87_case_0.i: ; preds = %alloca_block - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !8 unreachable, !dbg !8 __hugr__.__tk2_qalloc.83.exit: ; preds = %alloca_block - notail call void @___reset(i64 %qalloc.i), !dbg !8 - %qalloc.i132.i = notail call i64 @___qalloc(), !dbg !9 + tail call void @___reset(i64 %qalloc.i), !dbg !8 + %qalloc.i132.i = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i133.i = icmp eq i64 %qalloc.i132.i, -1, !dbg !9 br i1 %not_max.not.not.i133.i, label %cond_101_case_0.i.i, label %__hugr__.__tk2_qalloc.97.exit.i, !dbg !9 cond_101_case_0.i.i: ; preds = %cond_242_case_1.backedge.i, %__hugr__.__tk2_qalloc.83.exit - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !9 unreachable, !dbg !9 __hugr__.__tk2_qalloc.97.exit.i: ; preds = %__hugr__.__tk2_qalloc.83.exit, %cond_242_case_1.backedge.i %qalloc.i134.i = phi i64 [ %qalloc.i.i, %cond_242_case_1.backedge.i ], [ %qalloc.i132.i, %__hugr__.__tk2_qalloc.83.exit ] - notail call void @___reset(i64 %qalloc.i134.i), !dbg !9 - %qalloc.i128.i = notail call i64 @___qalloc(), !dbg !15 + tail call void @___reset(i64 %qalloc.i134.i), !dbg !9 + %qalloc.i128.i = tail call i64 @___qalloc(), !dbg !15 %not_max.not.not.i129.i = icmp eq i64 %qalloc.i128.i, -1, !dbg !15 br i1 %not_max.not.not.i129.i, label %cond_115_case_0.i.i, label %__hugr__.__tk2_qalloc.111.exit.i, !dbg !15 cond_115_case_0.i.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i - notail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !15 + tail call void @panic(i32 1001, ptr nonnull @"e_No more qu.3B2EEBF0.0"), !dbg !15 unreachable, !dbg !15 __hugr__.__tk2_qalloc.111.exit.i: ; preds = %__hugr__.__tk2_qalloc.97.exit.i - notail call void @___reset(i64 %qalloc.i128.i), !dbg !15 - notail call void @___rxy(i64 %qalloc.i128.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !16 - notail call void @___rz(i64 %qalloc.i128.i, double 0x400921FB54442D18), !dbg !16 - notail call void @___rxy(i64 %qalloc.i134.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !17 - notail call void @___rz(i64 %qalloc.i134.i, double 0x400921FB54442D18), !dbg !17 - notail call void @___rz(i64 %qalloc.i134.i, double 0xBFE921FB54442D18), !dbg !18 - notail call void @___rxy(i64 %qalloc.i134.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18), !dbg !19 - notail call void @___rzz(i64 %qalloc.i128.i, i64 %qalloc.i134.i, double 0x3FF921FB54442D18), !dbg !19 - notail call void @___rz(i64 %qalloc.i128.i, double 0xBFF921FB54442D18), !dbg !19 - notail call void @___rxy(i64 %qalloc.i134.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18), !dbg !19 - notail call void @___rz(i64 %qalloc.i134.i, double 0xBFF921FB54442D18), !dbg !19 - notail call void @___rz(i64 %qalloc.i134.i, double 0x3FE921FB54442D18), !dbg !20 - %lazy_measure.i = notail call i64 @___lazy_measure(i64 %qalloc.i134.i) - notail call void @___qfree(i64 %qalloc.i134.i) + tail call void @___reset(i64 %qalloc.i128.i), !dbg !15 + tail call void @___rxy(i64 %qalloc.i128.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !16 + tail call void @___rz(i64 %qalloc.i128.i, double 0x400921FB54442D18), !dbg !16 + tail call void @___rxy(i64 %qalloc.i134.i, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18), !dbg !17 + tail call void @___rz(i64 %qalloc.i134.i, double 0x400921FB54442D18), !dbg !17 + tail call void @___rz(i64 %qalloc.i134.i, double 0xBFE921FB54442D18), !dbg !18 + tail call void @___rxy(i64 %qalloc.i134.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18), !dbg !19 + tail call void @___rzz(i64 %qalloc.i128.i, i64 %qalloc.i134.i, double 0x3FF921FB54442D18), !dbg !19 + tail call void @___rz(i64 %qalloc.i128.i, double 0xBFF921FB54442D18), !dbg !19 + tail call void @___rxy(i64 %qalloc.i134.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18), !dbg !19 + tail call void @___rz(i64 %qalloc.i134.i, double 0xBFF921FB54442D18), !dbg !19 + tail call void @___rz(i64 %qalloc.i134.i, double 0x3FE921FB54442D18), !dbg !20 + %lazy_measure.i = tail call i64 @___lazy_measure(i64 %qalloc.i134.i) + tail call void @___qfree(i64 %qalloc.i134.i) %read_bool.i = tail call i1 @___read_future_bool(i64 %lazy_measure.i) - notail call void @___dec_future_refcount(i64 %lazy_measure.i) + tail call void @___dec_future_refcount(i64 %lazy_measure.i) br i1 %read_bool.i, label %cond_256_case_1.i, label %0 0: ; preds = %__hugr__.__tk2_qalloc.111.exit.i - notail call void @___qfree(i64 %qalloc.i128.i), !dbg !21 + tail call void @___qfree(i64 %qalloc.i128.i), !dbg !21 br label %cond_242_case_1.backedge.i cond_242_case_1.backedge.i: ; preds = %1, %0 - %qalloc.i.i = notail call i64 @___qalloc(), !dbg !9 + %qalloc.i.i = tail call i64 @___qalloc(), !dbg !9 %not_max.not.not.i.i = icmp eq i64 %qalloc.i.i, -1, !dbg !9 br i1 %not_max.not.not.i.i, label %cond_101_case_0.i.i, label %__hugr__.__tk2_qalloc.97.exit.i, !dbg !9 cond_256_case_1.i: ; preds = %__hugr__.__tk2_qalloc.111.exit.i - notail call void @___rz(i64 %qalloc.i, double 0x3FE921FB54442D18), !dbg !22 - notail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !23 - notail call void @___rxy(i64 %qalloc.i128.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18), !dbg !24 - notail call void @___rzz(i64 %qalloc.i, i64 %qalloc.i128.i, double 0x3FF921FB54442D18), !dbg !24 - notail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18), !dbg !24 - notail call void @___rxy(i64 %qalloc.i128.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18), !dbg !24 - notail call void @___rz(i64 %qalloc.i128.i, double 0xBFF921FB54442D18), !dbg !24 - notail call void @___rz(i64 %qalloc.i128.i, double 0x3FE921FB54442D18), !dbg !25 - %lazy_measure67.i = notail call i64 @___lazy_measure(i64 %qalloc.i128.i) - notail call void @___qfree(i64 %qalloc.i128.i) + tail call void @___rz(i64 %qalloc.i, double 0x3FE921FB54442D18), !dbg !22 + tail call void @___rz(i64 %qalloc.i, double 0x400921FB54442D18), !dbg !23 + tail call void @___rxy(i64 %qalloc.i128.i, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18), !dbg !24 + tail call void @___rzz(i64 %qalloc.i, i64 %qalloc.i128.i, double 0x3FF921FB54442D18), !dbg !24 + tail call void @___rz(i64 %qalloc.i, double 0xBFF921FB54442D18), !dbg !24 + tail call void @___rxy(i64 %qalloc.i128.i, double 0x3FF921FB54442D18, double 0x400921FB54442D18), !dbg !24 + tail call void @___rz(i64 %qalloc.i128.i, double 0xBFF921FB54442D18), !dbg !24 + tail call void @___rz(i64 %qalloc.i128.i, double 0x3FE921FB54442D18), !dbg !25 + %lazy_measure67.i = tail call i64 @___lazy_measure(i64 %qalloc.i128.i) + tail call void @___qfree(i64 %qalloc.i128.i) %read_bool80.i = tail call i1 @___read_future_bool(i64 %lazy_measure67.i) - notail call void @___dec_future_refcount(i64 %lazy_measure67.i) + tail call void @___dec_future_refcount(i64 %lazy_measure67.i) br i1 %read_bool80.i, label %"__hugr__.__main__.rus..rus.17.exit", label %1 1: ; preds = %cond_256_case_1.i - notail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00), !dbg !26 + tail call void @___rxy(i64 %qalloc.i, double 0x400921FB54442D18, double 0.000000e+00), !dbg !26 br label %cond_242_case_1.backedge.i "__hugr__.__main__.rus..rus.17.exit": ; preds = %cond_256_case_1.i - %lazy_measure = notail call i64 @___lazy_measure(i64 %qalloc.i) - notail call void @___qfree(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) - notail call void @___dec_future_refcount(i64 %lazy_measure) - notail call void @print_bool(ptr nonnull @res_result.457DE32D.0, i64 16, i1 %read_bool), !dbg !27 + tail call void @___dec_future_refcount(i64 %lazy_measure) + tail call void @print_bool(ptr nonnull @res_result.457DE32D.0, i64 16, i1 %read_bool), !dbg !27 ret void } @@ -119,7 +119,7 @@ declare void @___rzz(i64, i64, double) local_unnamed_addr define i64 @qmain(i64 %0) local_unnamed_addr !dbg !28 { entry: tail call void @setup(i64 %0), !dbg !30 - notail call void @"__hugr__.__main__.rus..main.1"(), !dbg !30 + tail call void @"__hugr__.__main__.rus..main.1"(), !dbg !30 %1 = tail call i64 @teardown(), !dbg !30 ret i64 %1, !dbg !30 } diff --git a/qis-compiler/rust/lib.rs b/qis-compiler/rust/lib.rs index 82dd2f7c6..816a70855 100644 --- a/qis-compiler/rust/lib.rs +++ b/qis-compiler/rust/lib.rs @@ -16,7 +16,6 @@ use inkwell::support::LLVMString; use inkwell::targets::{ CodeModel, InitializationConfig, RelocMode, Target, TargetMachine, TargetTriple, }; -use inkwell::values::LLVMTailCallKind; use itertools::Itertools; use pyo3::prelude::*; use tket::hugr::ops::DataflowParent; @@ -286,8 +285,7 @@ fn wrap_main<'c>( .ok_or_else(|| anyhow!("Entrypoint function '{hugr_entry}' not found in Module"))?; let _ = builder.build_call(setup, &[initial_tc.into()], "")?; - let main_call = builder.build_call(hugr_main, &[], "")?; - main_call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); + let _ = builder.build_call(hugr_main, &[], "")?; let tc = builder .build_call(teardown, &[], "")? .try_as_basic_value() diff --git a/tket-qsystem/src/llvm/debug.rs b/tket-qsystem/src/llvm/debug.rs index 63618332f..5cd992ba7 100644 --- a/tket-qsystem/src/llvm/debug.rs +++ b/tket-qsystem/src/llvm/debug.rs @@ -8,7 +8,6 @@ use hugr::llvm::custom::CodegenExtension; use hugr::llvm::emit::{EmitFuncContext, EmitOpArgs}; use hugr::llvm::inkwell::AddressSpace; use hugr::llvm::inkwell::types::BasicType; -use hugr::llvm::inkwell::values::LLVMTailCallKind; use hugr::ops::ExtensionOp; use hugr::{HugrView, Node}; use tket::extension::debug::{DEBUG_EXTENSION_ID, STATE_RESULT_OP_ID, StateResult}; @@ -97,12 +96,11 @@ impl DebugCodegenExtension { void_t.fn_type(&[ptr_t.into(), i64_t.into(), ptr_t.into()], false), )?; - let call = builder.build_call( + builder.build_call( fn_state_result, &[tag_ptr.into(), tag_len.into(), qubits_ptr.into()], "print_state_result", )?; - call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); args.outputs.finish(builder, [qubits]) } } diff --git a/tket-qsystem/src/llvm/futures.rs b/tket-qsystem/src/llvm/futures.rs index cef73f308..85cab3bd2 100644 --- a/tket-qsystem/src/llvm/futures.rs +++ b/tket-qsystem/src/llvm/futures.rs @@ -15,7 +15,7 @@ use hugr_llvm::emit::{EmitOpArgs, emit_value}; use inkwell::builder::Builder; use inkwell::context::Context; use inkwell::types::{BasicTypeEnum, IntType}; -use inkwell::values::{FunctionValue, LLVMTailCallKind}; +use inkwell::values::FunctionValue; use tket::hugr::{ self, llvm::{self as hugr_llvm, inkwell}, @@ -126,10 +126,8 @@ impl<'c, H: HugrView> FuturesEmitter<'c, '_, '_, H> { .try_into() .map_err(|_| anyhow!("Dup expects a single input"))?; let func = self.get_func_inc_refcount()?; - let call = self - .builder() + self.builder() .build_call(func, &[arg.into()], "inc_refcount")?; - call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); args.outputs.finish(self.builder(), [arg, arg]) } (FutureOpDef::Free, _) => { @@ -138,10 +136,8 @@ impl<'c, H: HugrView> FuturesEmitter<'c, '_, '_, H> { .try_into() .map_err(|_| anyhow!("Free expects a single input"))?; let func = self.get_func_dec_refcount()?; - let call = self - .builder() + self.builder() .build_call(func, &[arg.into()], "dec_refcount")?; - call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); args.outputs.finish(self.builder(), []) } (FutureOpDef::Read, ty) if *ty == bool_t() => { @@ -157,10 +153,8 @@ impl<'c, H: HugrView> FuturesEmitter<'c, '_, '_, H> { .unwrap_basic() .into_int_value(); let dec_refcount_func = self.get_func_dec_refcount()?; - let call = - self.builder() - .build_call(dec_refcount_func, &[arg.into()], "dec_refcount")?; - call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); + self.builder() + .build_call(dec_refcount_func, &[arg.into()], "dec_refcount")?; let true_val = emit_value(self.0, &Value::true_val())?; let false_val = emit_value(self.0, &Value::false_val())?; let result = self @@ -174,11 +168,11 @@ impl<'c, H: HugrView> FuturesEmitter<'c, '_, '_, H> { .try_into() .map_err(|_| anyhow!("Read expects a single input"))?; let read_func = self.get_func_read_uint()?; - let call = self + let result = self .builder() - .build_call(read_func, &[arg.into()], "read_uint")?; - call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); - let result = call.try_as_basic_value().unwrap_basic(); + .build_call(read_func, &[arg.into()], "read_uint")? + .try_as_basic_value() + .unwrap_basic(); let dec_refcount_func = self.get_func_dec_refcount()?; self.builder() .build_call(dec_refcount_func, &[arg.into()], "dec_refcount")?; diff --git a/tket-qsystem/src/llvm/prelude.rs b/tket-qsystem/src/llvm/prelude.rs index bc658e68e..379ecc93c 100644 --- a/tket-qsystem/src/llvm/prelude.rs +++ b/tket-qsystem/src/llvm/prelude.rs @@ -11,7 +11,7 @@ use inkwell::AddressSpace; use inkwell::attributes::{Attribute, AttributeLoc}; use inkwell::module::Linkage; use inkwell::types::{BasicType, IntType}; -use inkwell::values::{BasicValue, BasicValueEnum, FunctionValue, LLVMTailCallKind, StructValue}; +use inkwell::values::{BasicValue, BasicValueEnum, FunctionValue, StructValue}; use tket::hugr::{HugrView, Node}; #[derive(Clone)] @@ -49,10 +49,8 @@ impl PreludeCodegen for QISPreludeCodegen { let msg = ctx.builder().build_extract_value(err, 1, "")?; let panic = Self::get_panic(ctx)?; - let call = ctx - .builder() + ctx.builder() .build_call(panic, &[return_code.into(), msg.into()], "")?; - call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); Ok(()) } @@ -69,10 +67,8 @@ impl PreludeCodegen for QISPreludeCodegen { // https://github.com/quantinuum-dev/eldarion/issues/287 let msg = ctx.builder().build_extract_value(err, 1, "")?; let panic = Self::get_panic(ctx)?; - let call = ctx - .builder() + ctx.builder() .build_call(panic, &[return_code.into(), msg.into()], "")?; - call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); Ok(()) } diff --git a/tket-qsystem/src/llvm/qsystem.rs b/tket-qsystem/src/llvm/qsystem.rs index 8809c2225..90a40df52 100644 --- a/tket-qsystem/src/llvm/qsystem.rs +++ b/tket-qsystem/src/llvm/qsystem.rs @@ -12,7 +12,7 @@ use hugr::llvm::custom::CodegenExtension; use hugr::llvm::emit::func::{EmitFuncContext, build_option}; use hugr::llvm::emit::{EmitOpArgs, emit_value}; use inkwell::types::BasicType; -use inkwell::values::{BasicValueEnum, FunctionValue, IntValue, LLVMTailCallKind}; +use inkwell::values::{BasicValueEnum, FunctionValue, IntValue}; use tket::hugr::llvm::CodegenExtsBuilder; use tket::hugr::ops::ExtensionOp; use tket::hugr::ops::constant::Value; @@ -138,10 +138,9 @@ impl QSystemCodegenExtension { .collect_vec(); let outputs = output_indices.iter().map(|&i| args.inputs[i]).collect_vec(); let func = self.runtime_func(context, runtime_func)?; - let call = context + context .builder() .build_call(func, &inputs, runtime_func.name())?; - call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); args.outputs.finish(context.builder(), outputs) } @@ -175,32 +174,32 @@ impl QSystemCodegenExtension { .inputs .try_into() .map_err(|_| anyhow!("Measure expects one input"))?; - let call = builder.build_call( - self.runtime_func(context, RuntimeFunction::Measure)?, - &[qb.into()], - "measure_i1", - )?; - call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); - let result_i1 = call.try_as_basic_value().unwrap_basic().into_int_value(); + let result_i1 = builder + .build_call( + self.runtime_func(context, RuntimeFunction::Measure)?, + &[qb.into()], + "measure_i1", + )? + .try_as_basic_value() + .unwrap_basic() + .into_int_value(); let result = builder.build_select(result_i1, true_val, false_val, "measure")?; if op == QSystemOp::Measure { // normal measure may put the qubit in invalid state, so assume // deallocation, don't return it - let call = builder.build_call( + builder.build_call( self.runtime_func(context, RuntimeFunction::QFree)?, &[qb.into()], "qfree", )?; - call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); args.outputs.finish(builder, [result]) } else { // MeasureReset will reset the qubit after measurement so safe to return - let call = builder.build_call( + builder.build_call( self.runtime_func(context, RuntimeFunction::Reset)?, &[qb.into()], "reset", )?; - call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); args.outputs.finish(builder, [qb, result]) } } @@ -211,19 +210,19 @@ impl QSystemCodegenExtension { .inputs .try_into() .map_err(|_| anyhow!("LazyMeasure expects one input"))?; - let meas_call = builder.build_call( - self.runtime_func(context, RuntimeFunction::LazyMeasure)?, - &[qb.into()], - "lazy_measure", - )?; - meas_call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); - let result = meas_call.try_as_basic_value().unwrap_basic(); - let free_call = builder.build_call( + let result = builder + .build_call( + self.runtime_func(context, RuntimeFunction::LazyMeasure)?, + &[qb.into()], + "lazy_measure", + )? + .try_as_basic_value() + .unwrap_basic(); + builder.build_call( self.runtime_func(context, RuntimeFunction::QFree)?, &[qb.into()], "qfree", )?; - free_call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); args.outputs.finish(builder, [result]) } // Measure qubit in Z basis or detect leakage, not forcing to a boolean @@ -233,19 +232,19 @@ impl QSystemCodegenExtension { .inputs .try_into() .map_err(|_| anyhow!("LazyMeasureLeaked expects one input"))?; - let meas_call = builder.build_call( - self.runtime_func(context, RuntimeFunction::LazyMeasureLeaked)?, - &[qb.into()], - "lazy_measure_leaked", - )?; - meas_call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); - let result = meas_call.try_as_basic_value().unwrap_basic(); - let free_call = builder.build_call( + let result = builder + .build_call( + self.runtime_func(context, RuntimeFunction::LazyMeasureLeaked)?, + &[qb.into()], + "lazy_measure_leaked", + )? + .try_as_basic_value() + .unwrap_basic(); + builder.build_call( self.runtime_func(context, RuntimeFunction::QFree)?, &[qb.into()], "qfree", )?; - free_call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); args.outputs.finish(builder, [result]) } QSystemOp::LazyMeasureReset => { @@ -254,19 +253,19 @@ impl QSystemCodegenExtension { .inputs .try_into() .map_err(|_| anyhow!("LazyMeasureReset expects one input"))?; - let meas_call = builder.build_call( - self.runtime_func(context, RuntimeFunction::LazyMeasure)?, - &[qb.into()], - "lazy_measure", - )?; - meas_call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); - let result = meas_call.try_as_basic_value().unwrap_basic(); - let rst_call = builder.build_call( + let result = builder + .build_call( + self.runtime_func(context, RuntimeFunction::LazyMeasure)?, + &[qb.into()], + "lazy_measure", + )? + .try_as_basic_value() + .unwrap_basic(); + builder.build_call( self.runtime_func(context, RuntimeFunction::Reset)?, &[qb.into()], "reset", )?; - rst_call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); args.outputs.finish(builder, [qb, result]) } // Reset a qubit @@ -276,13 +275,15 @@ impl QSystemCodegenExtension { .inputs .try_into() .map_err(|_| anyhow!("QAlloc expects no inputs"))?; - let call = context.builder().build_call( - self.runtime_func(context, RuntimeFunction::QAlloc)?, - &[], - "qalloc", - )?; - call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); - let qb = call.try_as_basic_value().unwrap_basic(); + let qb = context + .builder() + .build_call( + self.runtime_func(context, RuntimeFunction::QAlloc)?, + &[], + "qalloc", + )? + .try_as_basic_value() + .unwrap_basic(); let max_qb = self .0 @@ -323,12 +324,11 @@ impl QSystemCodegenExtension { let reset_bb = context.build_positioned_new_block("reset_bb", Some(id_bb), |context, bb| { - let call = context.builder().build_call( + context.builder().build_call( self.runtime_func(context, RuntimeFunction::Reset)?, &[qb.into()], "reset", )?; - call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); context.builder().build_unconditional_branch(id_bb)?; anyhow::Ok(bb) })?; diff --git a/tket-qsystem/src/llvm/random.rs b/tket-qsystem/src/llvm/random.rs index 046dab07b..10d976337 100644 --- a/tket-qsystem/src/llvm/random.rs +++ b/tket-qsystem/src/llvm/random.rs @@ -10,7 +10,7 @@ use hugr::llvm::emit::func::EmitFuncContext; use inkwell::builder::Builder; use inkwell::context::Context; use inkwell::types::{BasicTypeEnum, FloatType, IntType}; -use inkwell::values::{BasicValueEnum, FunctionValue, LLVMTailCallKind}; +use inkwell::values::{BasicValueEnum, FunctionValue}; use tket::hugr::ops::ExtensionOp; use tket::hugr::{HugrView, Node}; @@ -79,13 +79,15 @@ impl<'c, H: HugrView> RandomEmitter<'c, '_, '_, H> { input_indices: &[usize], ) -> Result<()> { let inputs: Vec<_> = input_indices.iter().map(|&i| args.inputs[i]).collect(); - let call = self.builder().build_call( - func?, - &inputs.iter().map(|&v| v.into()).collect::>(), - name, - )?; - call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); - let result = call.try_as_basic_value().unwrap_basic(); + let result = self + .builder() + .build_call( + func?, + &inputs.iter().map(|&v| v.into()).collect::>(), + name, + )? + .try_as_basic_value() + .unwrap_basic(); args.outputs .finish(self.builder(), [result, self.rng_context()]) } @@ -123,10 +125,8 @@ impl<'c, H: HugrView> RandomEmitter<'c, '_, '_, H> { .inputs .try_into() .map_err(|_| anyhow!("RandomAdvance expects a context and delta argument"))?; - let call = self - .builder() + self.builder() .build_call(fn_random_advance, &[delta.into()], "radv")?; - call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); args.outputs.finish(self.builder(), [ctx]) } RandomOp::NewRNGContext => { @@ -140,10 +140,8 @@ impl<'c, H: HugrView> RandomEmitter<'c, '_, '_, H> { .inputs .try_into() .map_err(|_| anyhow!("NewRNGContext expects a seed argument"))?; - let call = self - .builder() + self.builder() .build_call(fn_random_seed, &[seed.into()], "rseed")?; - call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); args.outputs.finish( self.builder(), [self.bool_type().const_int(1, false).into()], diff --git a/tket-qsystem/src/llvm/result.rs b/tket-qsystem/src/llvm/result.rs index 1d2d84918..7727ad746 100644 --- a/tket-qsystem/src/llvm/result.rs +++ b/tket-qsystem/src/llvm/result.rs @@ -13,7 +13,7 @@ use inkwell::AddressSpace; use inkwell::builder::Builder; use inkwell::context::Context; use inkwell::types::{BasicMetadataTypeEnum, FloatType, IntType, PointerType, VoidType}; -use inkwell::values::{BasicValueEnum, FunctionValue, IntValue, LLVMTailCallKind}; +use inkwell::values::{BasicValueEnum, FunctionValue, IntValue}; use tket::hugr::extension::simple_op::MakeExtensionOp; use tket::hugr::ops::ExtensionOp; use tket::hugr::{HugrView, Node}; @@ -179,14 +179,12 @@ impl<'c, H: HugrView, AL: ArrayLowering + Clone> ResultEmitter<'c, )?; let (array_ptr, _) = struct_1d_arr_alloc(self.iw_context(), self.builder(), length.try_into()?, array)?; - self.builder() - .build_call( - print_fn, - &[tag_ptr.into(), tag_len.into(), array_ptr.into()], - "", - )? - .set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); - Ok(()) + self.builder().build_call( + print_fn, + &[tag_ptr.into(), tag_len.into(), array_ptr.into()], + "", + )?; + Result::Ok(()) } /// Function to help lower the tket result extension. @@ -205,13 +203,11 @@ impl<'c, H: HugrView, AL: ArrayLowering + Clone> ResultEmitter<'c, .build_get_tag(self.builder())?; let b_type = self.bool_t(); let trunc_val = self.builder().build_int_truncate(val, b_type, "")?; - self.builder() - .build_call( - print_fn, - &[tag_ptr.into(), tag_len.into(), trunc_val.into()], - "print_bool", - )? - .set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); + self.builder().build_call( + print_fn, + &[tag_ptr.into(), tag_len.into(), trunc_val.into()], + "print_bool", + )?; } ResultOpDef::Int => { let (tag_ptr, tag_len) = self.generate_global_tag(&args, "INT:").unwrap(); @@ -219,13 +215,11 @@ impl<'c, H: HugrView, AL: ArrayLowering + Clone> ResultEmitter<'c, .inputs .try_into() .map_err(|_| anyhow!("result_int expects one input"))?; - self.builder() - .build_call( - print_fn, - &[tag_ptr.into(), tag_len.into(), val.into()], - "print_int", - )? - .set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); + self.builder().build_call( + print_fn, + &[tag_ptr.into(), tag_len.into(), val.into()], + "print_int", + )?; } ResultOpDef::UInt => { let (tag_ptr, tag_len) = self.generate_global_tag(&args, "INT:").unwrap(); @@ -233,13 +227,11 @@ impl<'c, H: HugrView, AL: ArrayLowering + Clone> ResultEmitter<'c, .inputs .try_into() .map_err(|_| anyhow!("result_uint expects one input"))?; - self.builder() - .build_call( - print_fn, - &[tag_ptr.into(), tag_len.into(), val.into()], - "print_uint", - )? - .set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); + self.builder().build_call( + print_fn, + &[tag_ptr.into(), tag_len.into(), val.into()], + "print_uint", + )?; } ResultOpDef::F64 => { let (tag_ptr, tag_len) = self.generate_global_tag(&args, "FLOAT:").unwrap(); @@ -247,13 +239,11 @@ impl<'c, H: HugrView, AL: ArrayLowering + Clone> ResultEmitter<'c, .inputs .try_into() .map_err(|_| anyhow!("result_float expects one input"))?; - self.builder() - .build_call( - print_fn, - &[tag_ptr.into(), tag_len.into(), val.into()], - "print_int", - )? - .set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); + self.builder().build_call( + print_fn, + &[tag_ptr.into(), tag_len.into(), val.into()], + "print_int", + )?; } ResultOpDef::ArrBool => { let (tag_ptr, tag_len) = self.generate_global_tag(&args, "BOOLARR:").unwrap(); @@ -287,7 +277,7 @@ impl<'c, H: HugrView, AL: ArrayLowering + Clone> ResultEmitter<'c, .map_err(|_| anyhow!("result_arr_float expects one input"))?; self.build_print_array_call(val, op, &ElemType::Float, tag_ptr, tag_len)?; } - }; + } args.outputs.finish(self.builder(), []) } } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@llvm21_2.snap index 2c3116eaf..7346e4787 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@llvm21_2.snap @@ -29,7 +29,7 @@ entry_block: ; preds = %alloca_block store ptr %1, ptr %arr_ptr, align 8, !dbg !11 store ptr %2, ptr %mask_ptr, align 8, !dbg !11 %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1, !dbg !11 - notail call void @print_state_result(ptr @res_test_state.900F7606.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 + call void @print_state_result(ptr @res_test_state.900F7606.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 ret { ptr, i64 } %0 } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@pre-mem2reg@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@pre-mem2reg@llvm21_2.snap index f7cef3e33..b05493169 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@pre-mem2reg@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__debug__test__emit_debug_codegen@pre-mem2reg@llvm21_2.snap @@ -34,7 +34,7 @@ entry_block: ; preds = %alloca_block store ptr %1, ptr %arr_ptr, align 8, !dbg !11 store ptr %2, ptr %mask_ptr, align 8, !dbg !11 %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1, !dbg !11 - notail call void @print_state_result(ptr @res_test_state.900F7606.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 + call void @print_state_result(ptr @res_test_state.900F7606.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 store { ptr, i64 } %"2_01", ptr %"4_0", align 8, !dbg !11 %"4_03" = load { ptr, i64 }, ptr %"4_0", align 8 store { ptr, i64 } %"4_03", ptr %"0", align 8 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_1.snap index 12039bb53..7b458aa5f 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_1.snap @@ -11,7 +11,7 @@ alloca_block: entry_block: ; preds = %alloca_block %read_bool = call i1 @___read_future_bool(i64 %0), !dbg !9 - notail call void @___dec_future_refcount(i64 %0), !dbg !9 + call void @___dec_future_refcount(i64 %0), !dbg !9 %measure = select i1 %read_bool, i1 true, i1 false, !dbg !9 ret i1 %measure } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_2.snap index ee4084f79..18a720983 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_2.snap @@ -10,7 +10,7 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - notail call void @___inc_future_refcount(i64 %0), !dbg !10 + call void @___inc_future_refcount(i64 %0), !dbg !10 %mrv = insertvalue { i64, i64 } poison, i64 %0, 0 %mrv6 = insertvalue { i64, i64 } %mrv, i64 %0, 1 ret { i64, i64 } %mrv6 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_3.snap index 7a2857a72..6ab3a80cd 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_3.snap @@ -10,7 +10,7 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - notail call void @___dec_future_refcount(i64 %0), !dbg !8 + call void @___dec_future_refcount(i64 %0), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_4.snap index 6a38a44df..fc6e4ec7a 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_4.snap @@ -10,7 +10,7 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %read_uint = notail call i64 @___read_future_uint(i64 %0), !dbg !8 + %read_uint = call i64 @___read_future_uint(i64 %0), !dbg !8 call void @___dec_future_refcount(i64 %0), !dbg !8 ret i64 %read_uint } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_5.snap index ee4084f79..18a720983 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_5.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_5.snap @@ -10,7 +10,7 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - notail call void @___inc_future_refcount(i64 %0), !dbg !10 + call void @___inc_future_refcount(i64 %0), !dbg !10 %mrv = insertvalue { i64, i64 } poison, i64 %0, 0 %mrv6 = insertvalue { i64, i64 } %mrv, i64 %0, 1 ret { i64, i64 } %mrv6 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_6.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_6.snap index 7a2857a72..6ab3a80cd 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_6.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@llvm21_6.snap @@ -10,7 +10,7 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - notail call void @___dec_future_refcount(i64 %0), !dbg !8 + call void @___dec_future_refcount(i64 %0), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_1.snap index 1fe561752..4e60fbccf 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_1.snap @@ -16,7 +16,7 @@ entry_block: ; preds = %alloca_block store i64 %0, ptr %"2_0", align 4 %"2_01" = load i64, ptr %"2_0", align 4 %read_bool = call i1 @___read_future_bool(i64 %"2_01"), !dbg !9 - notail call void @___dec_future_refcount(i64 %"2_01"), !dbg !9 + call void @___dec_future_refcount(i64 %"2_01"), !dbg !9 %measure = select i1 %read_bool, i1 true, i1 false, !dbg !9 store i1 %measure, ptr %"4_0", align 1, !dbg !9 %"4_02" = load i1, ptr %"4_0", align 1 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_2.snap index bf5df59f5..26fb8d770 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_2.snap @@ -17,7 +17,7 @@ alloca_block: entry_block: ; preds = %alloca_block store i64 %0, ptr %"2_0", align 4 %"2_01" = load i64, ptr %"2_0", align 4 - notail call void @___inc_future_refcount(i64 %"2_01"), !dbg !10 + call void @___inc_future_refcount(i64 %"2_01"), !dbg !10 store i64 %"2_01", ptr %"4_0", align 4, !dbg !10 store i64 %"2_01", ptr %"4_1", align 4, !dbg !10 %"4_02" = load i64, ptr %"4_0", align 4 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_3.snap index 167e07e49..7b0d3fa7e 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_3.snap @@ -13,7 +13,7 @@ alloca_block: entry_block: ; preds = %alloca_block store i64 %0, ptr %"2_0", align 4 %"2_01" = load i64, ptr %"2_0", align 4 - notail call void @___dec_future_refcount(i64 %"2_01"), !dbg !8 + call void @___dec_future_refcount(i64 %"2_01"), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_4.snap index 155c7b0c2..c99874439 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_4.snap @@ -15,7 +15,7 @@ alloca_block: entry_block: ; preds = %alloca_block store i64 %0, ptr %"2_0", align 4 %"2_01" = load i64, ptr %"2_0", align 4 - %read_uint = notail call i64 @___read_future_uint(i64 %"2_01"), !dbg !8 + %read_uint = call i64 @___read_future_uint(i64 %"2_01"), !dbg !8 call void @___dec_future_refcount(i64 %"2_01"), !dbg !8 store i64 %read_uint, ptr %"4_0", align 4, !dbg !8 %"4_02" = load i64, ptr %"4_0", align 4 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_5.snap index bf5df59f5..26fb8d770 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_5.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_5.snap @@ -17,7 +17,7 @@ alloca_block: entry_block: ; preds = %alloca_block store i64 %0, ptr %"2_0", align 4 %"2_01" = load i64, ptr %"2_0", align 4 - notail call void @___inc_future_refcount(i64 %"2_01"), !dbg !10 + call void @___inc_future_refcount(i64 %"2_01"), !dbg !10 store i64 %"2_01", ptr %"4_0", align 4, !dbg !10 store i64 %"2_01", ptr %"4_1", align 4, !dbg !10 %"4_02" = load i64, ptr %"4_0", align 4 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_6.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_6.snap index 167e07e49..7b0d3fa7e 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_6.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__futures__test__emit_futures_codegen@pre-mem2reg@llvm21_6.snap @@ -13,7 +13,7 @@ alloca_block: entry_block: ; preds = %alloca_block store i64 %0, ptr %"2_0", align 4 %"2_01" = load i64, ptr %"2_0", align 4 - notail call void @___dec_future_refcount(i64 %"2_01"), !dbg !8 + call void @___dec_future_refcount(i64 %"2_01"), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@llvm21_0.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@llvm21_0.snap index 2c43af726..f3cd4a3be 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@llvm21_0.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@llvm21_0.snap @@ -14,7 +14,7 @@ alloca_block: entry_block: ; preds = %alloca_block %2 = extractvalue { i32, ptr } { i32 42, ptr @e_EXIT.2B78BC40.0 }, 0, !dbg !10 %3 = extractvalue { i32, ptr } { i32 42, ptr @e_EXIT.2B78BC40.0 }, 1, !dbg !10 - notail call void @panic(i32 %2, ptr %3), !dbg !10 + call void @panic(i32 %2, ptr %3), !dbg !10 %mrv = insertvalue { i64, i64 } poison, i64 0, 0 %mrv8 = insertvalue { i64, i64 } %mrv, i64 0, 1 ret { i64, i64 } %mrv8 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@pre-mem2reg@llvm21_0.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@pre-mem2reg@llvm21_0.snap index 9673c143a..f8402532e 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@pre-mem2reg@llvm21_0.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__exit_emit@pre-mem2reg@llvm21_0.snap @@ -27,7 +27,7 @@ entry_block: ; preds = %alloca_block %"2_13" = load i64, ptr %"2_1", align 4 %2 = extractvalue { i32, ptr } %"5_01", 0, !dbg !10 %3 = extractvalue { i32, ptr } %"5_01", 1, !dbg !10 - notail call void @panic(i32 %2, ptr %3), !dbg !10 + call void @panic(i32 %2, ptr %3), !dbg !10 store i64 0, ptr %"6_0", align 4, !dbg !10 store i64 0, ptr %"6_1", align 4, !dbg !10 %"6_04" = load i64, ptr %"6_0", align 4 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@llvm21_0.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@llvm21_0.snap index 64a69f31f..fc0f22bfc 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@llvm21_0.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@llvm21_0.snap @@ -15,7 +15,7 @@ entry_block: ; preds = %alloca_block %2 = extractvalue { i32, ptr } { i32 42, ptr @e_PANIC.DF25FD88.0 }, 0, !dbg !10 %shift_code = add i32 %2, 1000, !dbg !10 %3 = extractvalue { i32, ptr } { i32 42, ptr @e_PANIC.DF25FD88.0 }, 1, !dbg !10 - notail call void @panic(i32 %shift_code, ptr %3), !dbg !10 + call void @panic(i32 %shift_code, ptr %3), !dbg !10 %mrv = insertvalue { i64, i64 } poison, i64 0, 0 %mrv8 = insertvalue { i64, i64 } %mrv, i64 0, 1 ret { i64, i64 } %mrv8 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@pre-mem2reg@llvm21_0.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@pre-mem2reg@llvm21_0.snap index 003a3aea0..56260ebd8 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@pre-mem2reg@llvm21_0.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__prelude__test__panic_emit@pre-mem2reg@llvm21_0.snap @@ -28,7 +28,7 @@ entry_block: ; preds = %alloca_block %2 = extractvalue { i32, ptr } %"5_01", 0, !dbg !10 %shift_code = add i32 %2, 1000, !dbg !10 %3 = extractvalue { i32, ptr } %"5_01", 1, !dbg !10 - notail call void @panic(i32 %shift_code, ptr %3), !dbg !10 + call void @panic(i32 %shift_code, ptr %3), !dbg !10 store i64 0, ptr %"6_0", align 4, !dbg !10 store i64 0, ptr %"6_1", align 4, !dbg !10 %"6_04" = load i64, ptr %"6_0", align 4 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_1.snap index 9e1a29399..ee7cf84ea 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_1.snap @@ -10,7 +10,7 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - notail call void @___rz(i64 %0, double %1), !dbg !9 + call void @___rz(i64 %0, double %1), !dbg !9 ret i64 %0 } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_10.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_10.snap index 328cb9524..9465e5103 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_10.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_10.snap @@ -10,8 +10,8 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %lazy_measure_leaked = notail call i64 @___lazy_measure_leaked(i64 %0), !dbg !8 - notail call void @___qfree(i64 %0), !dbg !8 + %lazy_measure_leaked = call i64 @___lazy_measure_leaked(i64 %0), !dbg !8 + call void @___qfree(i64 %0), !dbg !8 ret i64 %lazy_measure_leaked } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_2.snap index 5385e3051..9dc97dbc1 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_2.snap @@ -10,7 +10,7 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - notail call void @___rzz(i64 %0, i64 %1, double %2), !dbg !11 + call void @___rzz(i64 %0, i64 %1, double %2), !dbg !11 %mrv = insertvalue { i64, i64 } poison, i64 %0, 0 %mrv8 = insertvalue { i64, i64 } %mrv, i64 %1, 1 ret { i64, i64 } %mrv8 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_3.snap index a243803f7..5acc325f2 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_3.snap @@ -10,7 +10,7 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - notail call void @___rxy(i64 %0, double %1, double %2), !dbg !9 + call void @___rxy(i64 %0, double %1, double %2), !dbg !9 ret i64 %0 } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_4.snap index 7756cf311..c983b5d66 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_4.snap @@ -10,8 +10,8 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %lazy_measure = notail call i64 @___lazy_measure(i64 %0), !dbg !11 - notail call void @___qfree(i64 %0), !dbg !11 + %lazy_measure = call i64 @___lazy_measure(i64 %0), !dbg !11 + call void @___qfree(i64 %0), !dbg !11 %1 = insertvalue { i1, i64, i1 } { i1 true, i64 poison, i1 poison }, i64 %lazy_measure, 1 ret { i1, i64, i1 } %1 } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_5.snap index 39147f5f2..1050125e5 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_5.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_5.snap @@ -10,8 +10,8 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %lazy_measure = notail call i64 @___lazy_measure(i64 %0), !dbg !8 - notail call void @___qfree(i64 %0), !dbg !8 + %lazy_measure = call i64 @___lazy_measure(i64 %0), !dbg !8 + call void @___qfree(i64 %0), !dbg !8 ret i64 %lazy_measure } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_6.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_6.snap index a50faf7b8..74b7860b9 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_6.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_6.snap @@ -10,12 +10,12 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %qalloc = notail call i64 @___qalloc(), !dbg !11 + %qalloc = call i64 @___qalloc(), !dbg !11 %not_max = icmp ne i64 %qalloc, -1, !dbg !11 br i1 %not_max, label %reset_bb, label %id_bb, !dbg !11 reset_bb: ; preds = %entry_block - notail call void @___reset(i64 %qalloc), !dbg !11 + call void @___reset(i64 %qalloc), !dbg !11 br label %id_bb, !dbg !11 id_bb: ; preds = %entry_block, %reset_bb diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_7.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_7.snap index 4aef3ecaf..ca56683e1 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_7.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_7.snap @@ -10,7 +10,7 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - notail call void @___qfree(i64 %0), !dbg !8 + call void @___qfree(i64 %0), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_8.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_8.snap index c55b287de..a1f01863d 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_8.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_8.snap @@ -10,7 +10,7 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - notail call void @___reset(i64 %0), !dbg !8 + call void @___reset(i64 %0), !dbg !8 ret i64 %0 } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_9.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_9.snap index 2938ce2ef..52beaf24e 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_9.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@llvm21_9.snap @@ -10,8 +10,8 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %lazy_measure = notail call i64 @___lazy_measure(i64 %0), !dbg !13 - notail call void @___reset(i64 %0), !dbg !13 + %lazy_measure = call i64 @___lazy_measure(i64 %0), !dbg !13 + call void @___reset(i64 %0), !dbg !13 %1 = insertvalue { i1, i64, i1 } { i1 true, i64 poison, i1 poison }, i64 %lazy_measure, 1 %mrv = insertvalue { i64, { i1, i64, i1 } } poison, i64 %0, 0 %mrv10 = insertvalue { i64, { i1, i64, i1 } } %mrv, { i1, i64, i1 } %1, 1 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_1.snap index 4d5739733..8b518ff49 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_1.snap @@ -18,7 +18,7 @@ entry_block: ; preds = %alloca_block store double %1, ptr %"2_1", align 8 %"2_01" = load i64, ptr %"2_0", align 4 %"2_12" = load double, ptr %"2_1", align 8 - notail call void @___rz(i64 %"2_01", double %"2_12"), !dbg !9 + call void @___rz(i64 %"2_01", double %"2_12"), !dbg !9 store i64 %"2_01", ptr %"4_0", align 4, !dbg !9 %"4_03" = load i64, ptr %"4_0", align 4 store i64 %"4_03", ptr %"0", align 4 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_10.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_10.snap index 7763e2ecb..e1e647188 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_10.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_10.snap @@ -15,8 +15,8 @@ alloca_block: entry_block: ; preds = %alloca_block store i64 %0, ptr %"2_0", align 4 %"2_01" = load i64, ptr %"2_0", align 4 - %lazy_measure_leaked = notail call i64 @___lazy_measure_leaked(i64 %"2_01"), !dbg !8 - notail call void @___qfree(i64 %"2_01"), !dbg !8 + %lazy_measure_leaked = call i64 @___lazy_measure_leaked(i64 %"2_01"), !dbg !8 + call void @___qfree(i64 %"2_01"), !dbg !8 store i64 %lazy_measure_leaked, ptr %"4_0", align 4, !dbg !8 %"4_02" = load i64, ptr %"4_0", align 4 store i64 %"4_02", ptr %"0", align 4 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_2.snap index 0dde7f356..7930a7849 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_2.snap @@ -23,7 +23,7 @@ entry_block: ; preds = %alloca_block %"2_01" = load i64, ptr %"2_0", align 4 %"2_12" = load i64, ptr %"2_1", align 4 %"2_23" = load double, ptr %"2_2", align 8 - notail call void @___rzz(i64 %"2_01", i64 %"2_12", double %"2_23"), !dbg !11 + call void @___rzz(i64 %"2_01", i64 %"2_12", double %"2_23"), !dbg !11 store i64 %"2_01", ptr %"4_0", align 4, !dbg !11 store i64 %"2_12", ptr %"4_1", align 4, !dbg !11 %"4_04" = load i64, ptr %"4_0", align 4 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_3.snap index 12e664e9e..48bfb5edb 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_3.snap @@ -21,7 +21,7 @@ entry_block: ; preds = %alloca_block %"2_01" = load i64, ptr %"2_0", align 4 %"2_12" = load double, ptr %"2_1", align 8 %"2_23" = load double, ptr %"2_2", align 8 - notail call void @___rxy(i64 %"2_01", double %"2_12", double %"2_23"), !dbg !9 + call void @___rxy(i64 %"2_01", double %"2_12", double %"2_23"), !dbg !9 store i64 %"2_01", ptr %"4_0", align 4, !dbg !9 %"4_04" = load i64, ptr %"4_0", align 4 store i64 %"4_04", ptr %"0", align 4 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_4.snap index f123501be..77e9e41c1 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_4.snap @@ -20,8 +20,8 @@ entry_block: ; preds = %alloca_block %"2_01" = load i64, ptr %"2_0", align 4 store i64 %"2_01", ptr %"6_0", align 4 %"6_02" = load i64, ptr %"6_0", align 4 - %lazy_measure = notail call i64 @___lazy_measure(i64 %"6_02"), !dbg !11 - notail call void @___qfree(i64 %"6_02"), !dbg !11 + %lazy_measure = call i64 @___lazy_measure(i64 %"6_02"), !dbg !11 + call void @___qfree(i64 %"6_02"), !dbg !11 store i64 %lazy_measure, ptr %"8_0", align 4, !dbg !11 %"8_03" = load i64, ptr %"8_0", align 4 %1 = insertvalue { i1, i64, i1 } { i1 true, i64 poison, i1 poison }, i64 %"8_03", 1 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_5.snap index 8c22e828a..4dcd00614 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_5.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_5.snap @@ -15,8 +15,8 @@ alloca_block: entry_block: ; preds = %alloca_block store i64 %0, ptr %"2_0", align 4 %"2_01" = load i64, ptr %"2_0", align 4 - %lazy_measure = notail call i64 @___lazy_measure(i64 %"2_01"), !dbg !8 - notail call void @___qfree(i64 %"2_01"), !dbg !8 + %lazy_measure = call i64 @___lazy_measure(i64 %"2_01"), !dbg !8 + call void @___qfree(i64 %"2_01"), !dbg !8 store i64 %lazy_measure, ptr %"4_0", align 4, !dbg !8 %"4_02" = load i64, ptr %"4_0", align 4 store i64 %"4_02", ptr %"0", align 4 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_6.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_6.snap index 4f802d8e0..c5f3d1d06 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_6.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_6.snap @@ -12,12 +12,12 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %qalloc = notail call i64 @___qalloc(), !dbg !11 + %qalloc = call i64 @___qalloc(), !dbg !11 %not_max = icmp ne i64 %qalloc, -1, !dbg !11 br i1 %not_max, label %reset_bb, label %id_bb, !dbg !11 reset_bb: ; preds = %entry_block - notail call void @___reset(i64 %qalloc), !dbg !11 + call void @___reset(i64 %qalloc), !dbg !11 br label %id_bb, !dbg !11 id_bb: ; preds = %entry_block, %reset_bb diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_7.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_7.snap index 90dfb6101..094c4ec6b 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_7.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_7.snap @@ -13,7 +13,7 @@ alloca_block: entry_block: ; preds = %alloca_block store i64 %0, ptr %"2_0", align 4 %"2_01" = load i64, ptr %"2_0", align 4 - notail call void @___qfree(i64 %"2_01"), !dbg !8 + call void @___qfree(i64 %"2_01"), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_8.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_8.snap index ea9b65dcb..73f258bf1 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_8.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_8.snap @@ -15,7 +15,7 @@ alloca_block: entry_block: ; preds = %alloca_block store i64 %0, ptr %"2_0", align 4 %"2_01" = load i64, ptr %"2_0", align 4 - notail call void @___reset(i64 %"2_01"), !dbg !8 + call void @___reset(i64 %"2_01"), !dbg !8 store i64 %"2_01", ptr %"4_0", align 4, !dbg !8 %"4_02" = load i64, ptr %"4_0", align 4 store i64 %"4_02", ptr %"0", align 4 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_9.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_9.snap index db967776a..5534c4632 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_9.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__qsystem__test__emit_qsystem_codegen@pre-mem2reg@llvm21_9.snap @@ -23,8 +23,8 @@ entry_block: ; preds = %alloca_block %"2_01" = load i64, ptr %"2_0", align 4 store i64 %"2_01", ptr %"6_0", align 4 %"6_02" = load i64, ptr %"6_0", align 4 - %lazy_measure = notail call i64 @___lazy_measure(i64 %"6_02"), !dbg !13 - notail call void @___reset(i64 %"6_02"), !dbg !13 + %lazy_measure = call i64 @___lazy_measure(i64 %"6_02"), !dbg !13 + call void @___reset(i64 %"6_02"), !dbg !13 store i64 %"6_02", ptr %"8_0", align 4, !dbg !13 store i64 %lazy_measure, ptr %"8_1", align 4, !dbg !13 %"8_13" = load i64, ptr %"8_1", align 4 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21.snap index bbd887f04..856728ff4 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21.snap @@ -10,7 +10,7 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - notail call void @random_advance(i64 %1), !dbg !10 + call void @random_advance(i64 %1), !dbg !10 ret {} %0 } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_1.snap index 31808042a..0df5c38fc 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_1.snap @@ -10,7 +10,7 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %rint = notail call i32 @random_int(), !dbg !12 + %rint = call i32 @random_int(), !dbg !12 %mrv = insertvalue { i32, {} } poison, i32 %rint, 0 %mrv6 = insertvalue { i32, {} } %mrv, {} zeroinitializer, 1 ret { i32, {} } %mrv6 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_2.snap index bcf2c9f75..2ab14e357 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_2.snap @@ -10,7 +10,7 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %rfloat = notail call double @random_float(), !dbg !12 + %rfloat = call double @random_float(), !dbg !12 %mrv = insertvalue { double, {} } poison, double %rfloat, 0 %mrv6 = insertvalue { double, {} } %mrv, {} zeroinitializer, 1 ret { double, {} } %mrv6 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_3.snap index e88e3aa7b..9966edf6b 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_3.snap @@ -10,7 +10,7 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %rintb = notail call i32 @random_rng(i32 %1), !dbg !12 + %rintb = call i32 @random_rng(i32 %1), !dbg !12 %mrv = insertvalue { i32, {} } poison, i32 %rintb, 0 %mrv7 = insertvalue { i32, {} } %mrv, {} zeroinitializer, 1 ret { i32, {} } %mrv7 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_4.snap index 102a49383..a1e8ab880 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@llvm21_4.snap @@ -10,7 +10,7 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - notail call void @random_seed(i64 %0), !dbg !9 + call void @random_seed(i64 %0), !dbg !9 ret i1 true } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21.snap index 4a1680fd8..5a2a4d785 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21.snap @@ -18,7 +18,7 @@ entry_block: ; preds = %alloca_block store i64 %1, ptr %"2_1", align 4 %"2_01" = load {}, ptr %"2_0", align 1 %"2_12" = load i64, ptr %"2_1", align 4 - notail call void @random_advance(i64 %"2_12"), !dbg !10 + call void @random_advance(i64 %"2_12"), !dbg !10 store {} %"2_01", ptr %"4_0", align 1, !dbg !10 %"4_03" = load {}, ptr %"4_0", align 1 store {} %"4_03", ptr %"0", align 1 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_1.snap index cc9a118e1..8c2c35715 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_1.snap @@ -17,7 +17,7 @@ alloca_block: entry_block: ; preds = %alloca_block store {} %0, ptr %"2_0", align 1 %"2_01" = load {}, ptr %"2_0", align 1 - %rint = notail call i32 @random_int(), !dbg !12 + %rint = call i32 @random_int(), !dbg !12 store i32 %rint, ptr %"4_0", align 4, !dbg !12 store {} zeroinitializer, ptr %"4_1", align 1, !dbg !12 %"4_02" = load i32, ptr %"4_0", align 4 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_2.snap index 77bb17bd7..937c2d0b1 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_2.snap @@ -17,7 +17,7 @@ alloca_block: entry_block: ; preds = %alloca_block store {} %0, ptr %"2_0", align 1 %"2_01" = load {}, ptr %"2_0", align 1 - %rfloat = notail call double @random_float(), !dbg !12 + %rfloat = call double @random_float(), !dbg !12 store double %rfloat, ptr %"4_0", align 8, !dbg !12 store {} zeroinitializer, ptr %"4_1", align 1, !dbg !12 %"4_02" = load double, ptr %"4_0", align 8 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_3.snap index d178329e8..7156bedd6 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_3.snap @@ -20,7 +20,7 @@ entry_block: ; preds = %alloca_block store i32 %1, ptr %"2_1", align 4 %"2_01" = load {}, ptr %"2_0", align 1 %"2_12" = load i32, ptr %"2_1", align 4 - %rintb = notail call i32 @random_rng(i32 %"2_12"), !dbg !12 + %rintb = call i32 @random_rng(i32 %"2_12"), !dbg !12 store i32 %rintb, ptr %"4_0", align 4, !dbg !12 store {} zeroinitializer, ptr %"4_1", align 1, !dbg !12 %"4_03" = load i32, ptr %"4_0", align 4 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_4.snap index 4fbb9a99e..018ec07f6 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__random__test__emit_random_codegen@pre-mem2reg@llvm21_4.snap @@ -15,7 +15,7 @@ alloca_block: entry_block: ; preds = %alloca_block store i64 %0, ptr %"2_0", align 4 %"2_01" = load i64, ptr %"2_0", align 4 - notail call void @random_seed(i64 %"2_01"), !dbg !9 + call void @random_seed(i64 %"2_01"), !dbg !9 store i1 true, ptr %"4_0", align 1, !dbg !9 %"4_02" = load i1, ptr %"4_0", align 1 store i1 %"4_02", ptr %"0", align 1 diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_1.snap index 2f05a98f8..475552f1f 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_1.snap @@ -14,7 +14,7 @@ alloca_block: entry_block: ; preds = %alloca_block %tag_len = load i8, ptr @res_test_bool.427F8271.0, align 1, !dbg !8 %tag_len2 = zext i8 %tag_len to i64, !dbg !8 - notail call void @print_bool(ptr @res_test_bool.427F8271.0, i64 %tag_len2, i1 %0), !dbg !8 + call void @print_bool(ptr @res_test_bool.427F8271.0, i64 %tag_len2, i1 %0), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_11.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_11.snap index 6b9733a30..f096b4034 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_11.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_11.snap @@ -29,7 +29,7 @@ entry_block: ; preds = %alloca_block store ptr %1, ptr %arr_ptr, align 8, !dbg !11 store ptr %2, ptr %mask_ptr, align 8, !dbg !11 %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1, !dbg !11 - notail call void @print_float_arr(ptr @res_test_arr_f.038B27BE.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 + call void @print_float_arr(ptr @res_test_arr_f.038B27BE.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_12.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_12.snap index aaa9280f5..31a2b180f 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_12.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_12.snap @@ -14,7 +14,7 @@ alloca_block: entry_block: ; preds = %alloca_block %tag_len = load i8, ptr @"res_\E6\B5\8B\E8\AF\95\E5\AD\97\E7\AC\A6\E4\B8\B2.935D2D1A.0", align 1, !dbg !8 %tag_len2 = zext i8 %tag_len to i64, !dbg !8 - notail call void @print_int(ptr @"res_\E6\B5\8B\E8\AF\95\E5\AD\97\E7\AC\A6\E4\B8\B2.935D2D1A.0", i64 %tag_len2, i64 %0), !dbg !8 + call void @print_int(ptr @"res_\E6\B5\8B\E8\AF\95\E5\AD\97\E7\AC\A6\E4\B8\B2.935D2D1A.0", i64 %tag_len2, i64 %0), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_13.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_13.snap index 522f1cb5c..039c8605a 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_13.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_13.snap @@ -14,7 +14,7 @@ alloca_block: entry_block: ; preds = %alloca_block %tag_len = load i8, ptr @"res_test!@#$%^.2547CEEA.0", align 1, !dbg !8 %tag_len2 = zext i8 %tag_len to i64, !dbg !8 - notail call void @print_uint(ptr @"res_test!@#$%^.2547CEEA.0", i64 %tag_len2, i64 %0), !dbg !8 + call void @print_uint(ptr @"res_test!@#$%^.2547CEEA.0", i64 %tag_len2, i64 %0), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_15.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_15.snap index bdbfec8ff..acdca3bb3 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_15.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_15.snap @@ -14,7 +14,7 @@ alloca_block: entry_block: ; preds = %alloca_block %tag_len = load i8, ptr @"res_ spaces .F46B5D1D.0", align 1, !dbg !8 %tag_len2 = zext i8 %tag_len to i64, !dbg !8 - notail call void @print_bool(ptr @"res_ spaces .F46B5D1D.0", i64 %tag_len2, i1 %0), !dbg !8 + call void @print_bool(ptr @"res_ spaces .F46B5D1D.0", i64 %tag_len2, i1 %0), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_16.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_16.snap index 17439cfd8..ef6fc9d52 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_16.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_16.snap @@ -14,7 +14,7 @@ alloca_block: entry_block: ; preds = %alloca_block %tag_len = load i8, ptr @"res_\F0\9F\9A\80\F0\9F\91\A8\E2\80\8D\F0\9F\91\A9\E2\80\8D\F0\9F\91\A7\E2\80\8D\F0\9F\91\A6\F0\9F\8C\8D.F7EE3FAA.0", align 1, !dbg !8 %tag_len2 = zext i8 %tag_len to i64, !dbg !8 - notail call void @print_bool(ptr @"res_\F0\9F\9A\80\F0\9F\91\A8\E2\80\8D\F0\9F\91\A9\E2\80\8D\F0\9F\91\A7\E2\80\8D\F0\9F\91\A6\F0\9F\8C\8D.F7EE3FAA.0", i64 %tag_len2, i1 %0), !dbg !8 + call void @print_bool(ptr @"res_\F0\9F\9A\80\F0\9F\91\A8\E2\80\8D\F0\9F\91\A9\E2\80\8D\F0\9F\91\A7\E2\80\8D\F0\9F\91\A6\F0\9F\8C\8D.F7EE3FAA.0", i64 %tag_len2, i1 %0), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_2.snap index aceafc43f..95ab43fdc 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_2.snap @@ -14,7 +14,7 @@ alloca_block: entry_block: ; preds = %alloca_block %tag_len = load i8, ptr @res_test_int.258C85C2.0, align 1, !dbg !8 %tag_len2 = zext i8 %tag_len to i64, !dbg !8 - notail call void @print_int(ptr @res_test_int.258C85C2.0, i64 %tag_len2, i64 %0), !dbg !8 + call void @print_int(ptr @res_test_int.258C85C2.0, i64 %tag_len2, i64 %0), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_3.snap index d075fb557..327974f36 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_3.snap @@ -14,7 +14,7 @@ alloca_block: entry_block: ; preds = %alloca_block %tag_len = load i8, ptr @res_test_uint.DE04EADD.0, align 1, !dbg !8 %tag_len2 = zext i8 %tag_len to i64, !dbg !8 - notail call void @print_uint(ptr @res_test_uint.DE04EADD.0, i64 %tag_len2, i64 %0), !dbg !8 + call void @print_uint(ptr @res_test_uint.DE04EADD.0, i64 %tag_len2, i64 %0), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_4.snap index 943d3d686..f621c3063 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_4.snap @@ -14,7 +14,7 @@ alloca_block: entry_block: ; preds = %alloca_block %tag_len = load i8, ptr @res_test_f64.A24BDAE1.0, align 1, !dbg !8 %tag_len2 = zext i8 %tag_len to i64, !dbg !8 - notail call void @print_float(ptr @res_test_f64.A24BDAE1.0, i64 %tag_len2, double %0), !dbg !8 + call void @print_float(ptr @res_test_f64.A24BDAE1.0, i64 %tag_len2, double %0), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_5.snap index 62ec5e7c8..86092d382 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_5.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_5.snap @@ -29,7 +29,7 @@ entry_block: ; preds = %alloca_block store ptr %1, ptr %arr_ptr, align 8, !dbg !11 store ptr %2, ptr %mask_ptr, align 8, !dbg !11 %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1, !dbg !11 - notail call void @print_bool_arr(ptr @res_test_arr_b.866EEC87.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 + call void @print_bool_arr(ptr @res_test_arr_b.866EEC87.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_7.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_7.snap index 6738be3d7..11f55fa08 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_7.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_7.snap @@ -29,7 +29,7 @@ entry_block: ; preds = %alloca_block store ptr %1, ptr %arr_ptr, align 8, !dbg !11 store ptr %2, ptr %mask_ptr, align 8, !dbg !11 %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1, !dbg !11 - notail call void @print_int_arr(ptr @res_test_arr_i.DFD30452.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 + call void @print_int_arr(ptr @res_test_arr_i.DFD30452.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_9.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_9.snap index 17ca16472..949a9f07d 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_9.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@llvm21_9.snap @@ -29,7 +29,7 @@ entry_block: ; preds = %alloca_block store ptr %1, ptr %arr_ptr, align 8, !dbg !11 store ptr %2, ptr %mask_ptr, align 8, !dbg !11 %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1, !dbg !11 - notail call void @print_uint_arr(ptr @res_test_arr_u.3D1C515C.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 + call void @print_uint_arr(ptr @res_test_arr_u.3D1C515C.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_1.snap index 405c74c50..18c07a017 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_1.snap @@ -17,7 +17,7 @@ entry_block: ; preds = %alloca_block %"2_01" = load i1, ptr %"2_0", align 1 %tag_len = load i8, ptr @res_test_bool.427F8271.0, align 1, !dbg !8 %tag_len2 = zext i8 %tag_len to i64, !dbg !8 - notail call void @print_bool(ptr @res_test_bool.427F8271.0, i64 %tag_len2, i1 %"2_01"), !dbg !8 + call void @print_bool(ptr @res_test_bool.427F8271.0, i64 %tag_len2, i1 %"2_01"), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_11.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_11.snap index d0525407f..5f043c576 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_11.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_11.snap @@ -32,7 +32,7 @@ entry_block: ; preds = %alloca_block store ptr %1, ptr %arr_ptr, align 8, !dbg !11 store ptr %2, ptr %mask_ptr, align 8, !dbg !11 %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1, !dbg !11 - notail call void @print_float_arr(ptr @res_test_arr_f.038B27BE.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 + call void @print_float_arr(ptr @res_test_arr_f.038B27BE.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_12.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_12.snap index 7025c2583..fbeb0fbad 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_12.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_12.snap @@ -17,7 +17,7 @@ entry_block: ; preds = %alloca_block %"2_01" = load i64, ptr %"2_0", align 4 %tag_len = load i8, ptr @"res_\E6\B5\8B\E8\AF\95\E5\AD\97\E7\AC\A6\E4\B8\B2.935D2D1A.0", align 1, !dbg !8 %tag_len2 = zext i8 %tag_len to i64, !dbg !8 - notail call void @print_int(ptr @"res_\E6\B5\8B\E8\AF\95\E5\AD\97\E7\AC\A6\E4\B8\B2.935D2D1A.0", i64 %tag_len2, i64 %"2_01"), !dbg !8 + call void @print_int(ptr @"res_\E6\B5\8B\E8\AF\95\E5\AD\97\E7\AC\A6\E4\B8\B2.935D2D1A.0", i64 %tag_len2, i64 %"2_01"), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_13.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_13.snap index 2c9d5378a..539964e3e 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_13.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_13.snap @@ -17,7 +17,7 @@ entry_block: ; preds = %alloca_block %"2_01" = load i64, ptr %"2_0", align 4 %tag_len = load i8, ptr @"res_test!@#$%^.2547CEEA.0", align 1, !dbg !8 %tag_len2 = zext i8 %tag_len to i64, !dbg !8 - notail call void @print_uint(ptr @"res_test!@#$%^.2547CEEA.0", i64 %tag_len2, i64 %"2_01"), !dbg !8 + call void @print_uint(ptr @"res_test!@#$%^.2547CEEA.0", i64 %tag_len2, i64 %"2_01"), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_15.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_15.snap index f2ebec41e..700dbb9fb 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_15.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_15.snap @@ -17,7 +17,7 @@ entry_block: ; preds = %alloca_block %"2_01" = load i1, ptr %"2_0", align 1 %tag_len = load i8, ptr @"res_ spaces .F46B5D1D.0", align 1, !dbg !8 %tag_len2 = zext i8 %tag_len to i64, !dbg !8 - notail call void @print_bool(ptr @"res_ spaces .F46B5D1D.0", i64 %tag_len2, i1 %"2_01"), !dbg !8 + call void @print_bool(ptr @"res_ spaces .F46B5D1D.0", i64 %tag_len2, i1 %"2_01"), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_16.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_16.snap index 486b722e3..dd2762c04 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_16.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_16.snap @@ -17,7 +17,7 @@ entry_block: ; preds = %alloca_block %"2_01" = load i1, ptr %"2_0", align 1 %tag_len = load i8, ptr @"res_\F0\9F\9A\80\F0\9F\91\A8\E2\80\8D\F0\9F\91\A9\E2\80\8D\F0\9F\91\A7\E2\80\8D\F0\9F\91\A6\F0\9F\8C\8D.F7EE3FAA.0", align 1, !dbg !8 %tag_len2 = zext i8 %tag_len to i64, !dbg !8 - notail call void @print_bool(ptr @"res_\F0\9F\9A\80\F0\9F\91\A8\E2\80\8D\F0\9F\91\A9\E2\80\8D\F0\9F\91\A7\E2\80\8D\F0\9F\91\A6\F0\9F\8C\8D.F7EE3FAA.0", i64 %tag_len2, i1 %"2_01"), !dbg !8 + call void @print_bool(ptr @"res_\F0\9F\9A\80\F0\9F\91\A8\E2\80\8D\F0\9F\91\A9\E2\80\8D\F0\9F\91\A7\E2\80\8D\F0\9F\91\A6\F0\9F\8C\8D.F7EE3FAA.0", i64 %tag_len2, i1 %"2_01"), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_2.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_2.snap index 3ca232c37..db9aa8652 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_2.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_2.snap @@ -17,7 +17,7 @@ entry_block: ; preds = %alloca_block %"2_01" = load i64, ptr %"2_0", align 4 %tag_len = load i8, ptr @res_test_int.258C85C2.0, align 1, !dbg !8 %tag_len2 = zext i8 %tag_len to i64, !dbg !8 - notail call void @print_int(ptr @res_test_int.258C85C2.0, i64 %tag_len2, i64 %"2_01"), !dbg !8 + call void @print_int(ptr @res_test_int.258C85C2.0, i64 %tag_len2, i64 %"2_01"), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_3.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_3.snap index 95757357c..b5a87bc1b 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_3.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_3.snap @@ -17,7 +17,7 @@ entry_block: ; preds = %alloca_block %"2_01" = load i64, ptr %"2_0", align 4 %tag_len = load i8, ptr @res_test_uint.DE04EADD.0, align 1, !dbg !8 %tag_len2 = zext i8 %tag_len to i64, !dbg !8 - notail call void @print_uint(ptr @res_test_uint.DE04EADD.0, i64 %tag_len2, i64 %"2_01"), !dbg !8 + call void @print_uint(ptr @res_test_uint.DE04EADD.0, i64 %tag_len2, i64 %"2_01"), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_4.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_4.snap index 66a3b69ea..87aaa44d3 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_4.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_4.snap @@ -17,7 +17,7 @@ entry_block: ; preds = %alloca_block %"2_01" = load double, ptr %"2_0", align 8 %tag_len = load i8, ptr @res_test_f64.A24BDAE1.0, align 1, !dbg !8 %tag_len2 = zext i8 %tag_len to i64, !dbg !8 - notail call void @print_float(ptr @res_test_f64.A24BDAE1.0, i64 %tag_len2, double %"2_01"), !dbg !8 + call void @print_float(ptr @res_test_f64.A24BDAE1.0, i64 %tag_len2, double %"2_01"), !dbg !8 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_5.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_5.snap index 43cce6226..3de6762f2 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_5.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_5.snap @@ -32,7 +32,7 @@ entry_block: ; preds = %alloca_block store ptr %1, ptr %arr_ptr, align 8, !dbg !11 store ptr %2, ptr %mask_ptr, align 8, !dbg !11 %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1, !dbg !11 - notail call void @print_bool_arr(ptr @res_test_arr_b.866EEC87.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 + call void @print_bool_arr(ptr @res_test_arr_b.866EEC87.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_7.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_7.snap index d104b170f..73ea632e8 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_7.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_7.snap @@ -32,7 +32,7 @@ entry_block: ; preds = %alloca_block store ptr %1, ptr %arr_ptr, align 8, !dbg !11 store ptr %2, ptr %mask_ptr, align 8, !dbg !11 %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1, !dbg !11 - notail call void @print_int_arr(ptr @res_test_arr_i.DFD30452.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 + call void @print_int_arr(ptr @res_test_arr_i.DFD30452.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_9.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_9.snap index ad45416e1..3ad711ffd 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_9.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__result__test__emit_result_codegen@pre-mem2reg@llvm21_9.snap @@ -32,7 +32,7 @@ entry_block: ; preds = %alloca_block store ptr %1, ptr %arr_ptr, align 8, !dbg !11 store ptr %2, ptr %mask_ptr, align 8, !dbg !11 %3 = load <{ i32, i32, ptr, ptr }>, ptr %out_arr_alloca, align 1, !dbg !11 - notail call void @print_uint_arr(ptr @res_test_arr_u.3D1C515C.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 + call void @print_uint_arr(ptr @res_test_arr_u.3D1C515C.0, i64 %tag_len2, ptr %out_arr_alloca), !dbg !11 ret void } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@llvm21_1.snap index 3439f922a..aa20e70d5 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@llvm21_1.snap @@ -10,7 +10,7 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %shot = notail call i64 @get_current_shot(), !dbg !8 + %shot = call i64 @get_current_shot(), !dbg !8 ret i64 %shot } diff --git a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@pre-mem2reg@llvm21_1.snap b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@pre-mem2reg@llvm21_1.snap index d3c11e58e..3406ddd07 100644 --- a/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@pre-mem2reg@llvm21_1.snap +++ b/tket-qsystem/src/llvm/snapshots/tket_qsystem__llvm__utils__test__emit_utils_codegen@pre-mem2reg@llvm21_1.snap @@ -12,7 +12,7 @@ alloca_block: br label %entry_block entry_block: ; preds = %alloca_block - %shot = notail call i64 @get_current_shot(), !dbg !8 + %shot = call i64 @get_current_shot(), !dbg !8 store i64 %shot, ptr %"4_0", align 4, !dbg !8 %"4_01" = load i64, ptr %"4_0", align 4 store i64 %"4_01", ptr %"0", align 4 diff --git a/tket-qsystem/src/llvm/utils.rs b/tket-qsystem/src/llvm/utils.rs index 659c5bc60..79029147b 100644 --- a/tket-qsystem/src/llvm/utils.rs +++ b/tket-qsystem/src/llvm/utils.rs @@ -6,7 +6,6 @@ use anyhow::Result; use hugr::llvm::custom::CodegenExtension; use hugr::llvm::emit::EmitOpArgs; use hugr::llvm::emit::func::EmitFuncContext; -use hugr::llvm::inkwell::values::LLVMTailCallKind; use tket::hugr::ops::ExtensionOp; use tket::hugr::{HugrView, Node}; @@ -41,10 +40,12 @@ fn emit_utils_op>( .i64_type() .fn_type(&[], false), )?; - let call = ctx.builder().build_call(fn_get_cur_shot, &[], "shot")?; - call.set_tail_call_kind(LLVMTailCallKind::LLVMTailCallKindNoTail); - args.outputs - .finish(ctx.builder(), [call.try_as_basic_value().unwrap_basic()]) + let result = ctx + .builder() + .build_call(fn_get_cur_shot, &[], "shot")? + .try_as_basic_value() + .unwrap_basic(); + args.outputs.finish(ctx.builder(), [result]) } } }