From 79381c16695e2dd06b9d023f1c43e2eb9b2f841c Mon Sep 17 00:00:00 2001 From: Alex Fischman Date: Mon, 3 Jun 2024 21:37:31 -0700 Subject: [PATCH] snapshots twice --- .../files__block-diamond-optimize.snap | 26 ++-- .../files__gamma_condition_and-optimize.snap | 16 --- tests/snapshots/files__loop_if-optimize.snap | 129 ------------------ tests/snapshots/files__max-optimize.snap | 6 - tests/snapshots/files__min-optimize.snap | 6 - .../files__range_check-optimize.snap | 50 ------- .../files__range_splitting-optimize.snap | 54 -------- tests/snapshots/files__sqrt-optimize.snap | 116 ++-------------- 8 files changed, 21 insertions(+), 382 deletions(-) diff --git a/tests/snapshots/files__block-diamond-optimize.snap b/tests/snapshots/files__block-diamond-optimize.snap index d730eb3a..9263fd9b 100644 --- a/tests/snapshots/files__block-diamond-optimize.snap +++ b/tests/snapshots/files__block-diamond-optimize.snap @@ -4,30 +4,30 @@ expression: visualization.result --- @main(v0: int) { .b1_: - c2_: int = const 1; - c3_: int = const 2; - v4_: bool = lt v0 c3_; - v5_: bool = not v4_; - c6_: int = const 0; + c2_: int = const 2; + v3_: bool = lt v0 c2_; + v4_: bool = not v3_; + c5_: int = const 0; + c6_: int = const 1; c7_: int = const 5; - v8_: int = id c2_; - v9_: int = id c2_; - v10_: int = id c3_; - br v4_ .b11_ .b12_; + v8_: int = id c6_; + v9_: int = id c6_; + v10_: int = id c2_; + br v3_ .b11_ .b12_; .b11_: c13_: int = const 4; v8_: int = id c13_; - v9_: int = id c2_; - v10_: int = id c3_; + v9_: int = id c6_; + v10_: int = id c2_; .b12_: v14_: int = id v8_; v15_: int = id v9_; - br v5_ .b16_ .b17_; + br v4_ .b16_ .b17_; .b16_: v18_: int = add v10_ v8_; v14_: int = id v18_; v15_: int = id v9_; .b17_: - v19_: int = add c2_ v14_; + v19_: int = add c6_ v14_; print v19_; } diff --git a/tests/snapshots/files__gamma_condition_and-optimize.snap b/tests/snapshots/files__gamma_condition_and-optimize.snap index 75ae2b3d..e55e8d25 100644 --- a/tests/snapshots/files__gamma_condition_and-optimize.snap +++ b/tests/snapshots/files__gamma_condition_and-optimize.snap @@ -5,24 +5,8 @@ expression: visualization.result @main(v0: int) { .b1_: c2_: int = const 0; -<<<<<<< HEAD -<<<<<<< HEAD v3_: bool = lt v0 c2_; v4_: bool = lt c2_ v0; -||||||| parent of 96126495 (Fix loop-peel contexts) - v3_: bool = lt v0 c2_; - v4_: bool = gt v0 c2_; -======= - v3_: bool = gt v0 c2_; - v4_: bool = lt v0 c2_; ->>>>>>> 96126495 (Fix loop-peel contexts) -||||||| parent of 602cb9e5 (Snapshots once more) - v3_: bool = gt v0 c2_; - v4_: bool = lt v0 c2_; -======= - v3_: bool = lt v0 c2_; - v4_: bool = lt c2_ v0; ->>>>>>> 602cb9e5 (Snapshots once more) c5_: int = const 1; c6_: int = const 3; v7_: int = id c6_; diff --git a/tests/snapshots/files__loop_if-optimize.snap b/tests/snapshots/files__loop_if-optimize.snap index 046787ed..d76faab3 100644 --- a/tests/snapshots/files__loop_if-optimize.snap +++ b/tests/snapshots/files__loop_if-optimize.snap @@ -20,140 +20,11 @@ expression: visualization.result v6_: int = id v12_; v7_: bool = id v5_; v8_: int = id v13_; - c14_: bool = const true; - v15_: int = id v6_; - v16_: bool = id c14_; - v17_: int = id v8_; -.b18_: - v19_: bool = not v5_; - v2_: int = id v6_; - v3_: int = id v8_; - br v19_ .b4_ .b20_; .b9_: -<<<<<<< HEAD - c14_: bool = const true; - v15_: int = id v6_; - v16_: bool = id c14_; - v17_: int = id v8_; - c21_: bool = const false; - v15_: int = id v6_; - v16_: bool = id c21_; - v17_: int = id v8_; -<<<<<<< HEAD - jmp .b18_; -.b20_: -||||||| parent of 6b47c776 (More snapshots) -.b19_: - v21_: bool = not v5_; - v2_: int = id v6_; - v3_: int = id v8_; - br v21_ .b4_ .b22_; -.b22_: -======= -.b19_: - v21_: bool = not v5_; -||||||| parent of 45ef9325 (snapshots again again) - c14_: bool = const true; - v15_: int = id v6_; - v16_: bool = id c14_; - v17_: int = id v8_; - br v5_ .b18_ .b19_; -.b18_: - c20_: bool = const false; - v15_: int = id v6_; - v16_: bool = id c20_; - v17_: int = id v8_; -.b19_: - v21_: bool = not v5_; -======= v14_: bool = not v5_; ->>>>>>> 45ef9325 (snapshots again again) v2_: int = id v6_; v3_: int = id v8_; -<<<<<<< HEAD - br v21_ .b4_ .b22_; -.b22_: -||||||| parent of c8413e1a (More snapshots) - br v5_ .v6_ .v7_; -.v7_: - v8_: int = const 1; - v9_: int = add v2_ v8_; - v10_: int = add v3_ v8_; -.v6_: - v11_: int = phi v9_ v2_ .v7_ .v4_; - v12_: int = phi v10_ v3_ .v7_ .v4_; - br v5_ .v13_ .v14_; -.v13_: - v15_: bool = const false; -.v16_: - v18_: bool = phi v17_ v15_ .v14_ .v13_; - v19_: bool = not v5_; - v2_: int = id v11_; - v3_: int = id v12_; - br v19_ .v4_ .v20_; -.v14_: - v17_: bool = const true; - jmp .v16_; -.v20_: -======= - br v5_ .v6_ .v7_; -.v7_: - v8_: int = const 1; - v9_: int = add v2_ v8_; - v10_: int = add v3_ v8_; -.v6_: - v11_: int = phi v9_ v2_ .v7_ .v4_; - v12_: int = phi v10_ v3_ .v7_ .v4_; - v13_: bool = not v5_; - v2_: int = id v11_; - v3_: int = id v12_; - br v13_ .v4_ .v14_; -.v14_: ->>>>>>> c8413e1a (More snapshots) ->>>>>>> 6b47c776 (More snapshots) -||||||| parent of 45ef9325 (snapshots again again) - br v21_ .b4_ .b22_; -.b22_: -||||||| parent of c8413e1a (More snapshots) - br v5_ .v6_ .v7_; -.v7_: - v8_: int = const 1; - v9_: int = add v2_ v8_; - v10_: int = add v3_ v8_; -.v6_: - v11_: int = phi v9_ v2_ .v7_ .v4_; - v12_: int = phi v10_ v3_ .v7_ .v4_; - br v5_ .v13_ .v14_; -.v13_: - v15_: bool = const false; -.v16_: - v18_: bool = phi v17_ v15_ .v14_ .v13_; - v19_: bool = not v5_; - v2_: int = id v11_; - v3_: int = id v12_; - br v19_ .v4_ .v20_; -.v14_: - v17_: bool = const true; - jmp .v16_; -.v20_: -======= - br v5_ .v6_ .v7_; -.v7_: - v8_: int = const 1; - v9_: int = add v2_ v8_; - v10_: int = add v3_ v8_; -.v6_: - v11_: int = phi v9_ v2_ .v7_ .v4_; - v12_: int = phi v10_ v3_ .v7_ .v4_; - v13_: bool = not v5_; - v2_: int = id v11_; - v3_: int = id v12_; - br v13_ .v4_ .v14_; -.v14_: ->>>>>>> c8413e1a (More snapshots) -======= br v14_ .b4_ .b15_; .b15_: ->>>>>>> 45ef9325 (snapshots again again) print v2_; } diff --git a/tests/snapshots/files__max-optimize.snap b/tests/snapshots/files__max-optimize.snap index 2f6ffb69..fe61f723 100644 --- a/tests/snapshots/files__max-optimize.snap +++ b/tests/snapshots/files__max-optimize.snap @@ -5,11 +5,5 @@ expression: visualization.result @main(v0: int, v1: int) { .b2_: v3_: int = smax v1 v0; - v4_: bool = lt v1 v0; - v5_: int = id v1; - br v4_ .b6_ .b7_; -.b6_: - v5_: int = id v0; -.b7_: print v3_; } diff --git a/tests/snapshots/files__min-optimize.snap b/tests/snapshots/files__min-optimize.snap index 790aceb5..a86e2bbf 100644 --- a/tests/snapshots/files__min-optimize.snap +++ b/tests/snapshots/files__min-optimize.snap @@ -5,11 +5,5 @@ expression: visualization.result @main(v0: int, v1: int) { .b2_: v3_: int = smin v0 v1; - v4_: bool = lt v0 v1; - v5_: int = id v1; - br v4_ .b6_ .b7_; -.b6_: - v5_: int = id v0; -.b7_: print v3_; } diff --git a/tests/snapshots/files__range_check-optimize.snap b/tests/snapshots/files__range_check-optimize.snap index 59ea91a1..1127b71c 100644 --- a/tests/snapshots/files__range_check-optimize.snap +++ b/tests/snapshots/files__range_check-optimize.snap @@ -9,55 +9,6 @@ expression: visualization.result .b3_: c4_: int = const 5; v5_: bool = lt v2_ c4_; -<<<<<<< HEAD - c6_: int = const 5; - v7_: bool = lt v2_ c6_; - br v7_ .b8_ .b9_; -.b8_: - c10_: int = const 1; - print c10_; - v11_: int = id v2_; -.b12_: - c13_: int = const 1; - v14_: int = add c13_ v2_; - v15_: int = id v14_; - br v5_ .b16_ .b17_; -.b16_: - v15_: int = id v14_; - v2_: int = id v15_; - jmp .b3_; -.b9_: - c18_: int = const 2; - print c18_; - v11_: int = id v2_; - jmp .b12_; -.b17_: - v2_: int = id v15_; -||||||| parent of 45ef9325 (snapshots again again) - c6_: int = const 5; - v7_: bool = lt v2_ c6_; - br v7_ .b8_ .b9_; -.b8_: - c10_: int = const 1; - print c10_; - v11_: int = id v2_; -.b12_: - c13_: int = const 1; - v14_: int = add c13_ v2_; - v15_: int = id v14_; - br v5_ .b16_ .b17_; -.b16_: - v15_: int = id v14_; -.b17_: - v2_: int = id v15_; - br v5_ .b3_ .b18_; -.b9_: - c19_: int = const 2; - print c19_; - v11_: int = id v2_; - jmp .b12_; -.b18_: -======= br v5_ .b6_ .b7_; .b6_: c8_: int = const 1; @@ -76,6 +27,5 @@ expression: visualization.result v9_: int = id v2_; jmp .b10_; .b15_: ->>>>>>> 45ef9325 (snapshots again again) print v2_; } diff --git a/tests/snapshots/files__range_splitting-optimize.snap b/tests/snapshots/files__range_splitting-optimize.snap index fda32db8..37eab833 100644 --- a/tests/snapshots/files__range_splitting-optimize.snap +++ b/tests/snapshots/files__range_splitting-optimize.snap @@ -7,44 +7,6 @@ expression: visualization.result c1_: int = const 0; v2_: int = id c1_; .b3_: -<<<<<<< HEAD - c4_: int = const 1; - v5_: int = add c4_ v2_; - c6_: int = const 5; - v7_: bool = lt v5_ c6_; - v8_: bool = lt v2_ c6_; - br v8_ .b9_ .b10_; -.b9_: - c11_: int = const 1; - print c11_; - v12_: int = id v2_; -.b13_: - v14_: int = id v5_; - br v7_ .b15_ .b16_; -.b15_: - v14_: int = id v5_; - v2_: int = id v14_; - jmp .b3_; -||||||| parent of 45ef9325 (snapshots again again) - c4_: int = const 1; - v5_: int = add c4_ v2_; - c6_: int = const 5; - v7_: bool = lt v5_ c6_; - v8_: bool = lt v2_ c6_; - br v8_ .b9_ .b10_; -.b9_: - c11_: int = const 1; - print c11_; - v12_: int = id v2_; -.b13_: - v14_: int = id v5_; - br v7_ .b15_ .b16_; -.b15_: - v14_: int = id v5_; -.b16_: - v2_: int = id v14_; - br v7_ .b3_ .b17_; -======= c4_: int = const 5; v5_: bool = lt v2_ c4_; br v5_ .b6_ .b7_; @@ -52,22 +14,7 @@ expression: visualization.result c8_: int = const 1; print c8_; v9_: int = id v2_; ->>>>>>> 45ef9325 (snapshots again again) .b10_: -<<<<<<< HEAD - c17_: int = const 2; - print c17_; - v12_: int = id v2_; - jmp .b13_; -.b16_: - v2_: int = id v14_; -||||||| parent of 45ef9325 (snapshots again again) - c18_: int = const 2; - print c18_; - v12_: int = id v2_; - jmp .b13_; -.b17_: -======= c11_: int = const 1; v12_: int = add c11_ v2_; v13_: bool = lt v12_ c4_; @@ -79,6 +26,5 @@ expression: visualization.result v9_: int = id v2_; jmp .b10_; .b14_: ->>>>>>> 45ef9325 (snapshots again again) print v2_; } diff --git a/tests/snapshots/files__sqrt-optimize.snap b/tests/snapshots/files__sqrt-optimize.snap index a25c5780..c0f3bcce 100644 --- a/tests/snapshots/files__sqrt-optimize.snap +++ b/tests/snapshots/files__sqrt-optimize.snap @@ -36,8 +36,8 @@ expression: visualization.result v28_: float = fadd v21_ v27_; v29_: float = fdiv v28_ v24_; v30_: float = fdiv v29_ v21_; - v31_: bool = fge v30_ v23_; - v32_: bool = fle v30_ v22_; + v31_: bool = fle v30_ v22_; + v32_: bool = fge v30_ v23_; v33_: bool = and v31_ v32_; v34_: bool = not v33_; v20_: float = id v20_; @@ -53,112 +53,12 @@ expression: visualization.result .b14_: v8_: float = id v13_; v9_: bool = id v12_; -<<<<<<< HEAD - br v9_ .b11_ .b47_; -.b47_: -<<<<<<< HEAD + br v9_ .b11_ .b36_; +.b36_: ret; .b11_: - v48_: float = fdiv v8_ v8_; - print v48_; - jmp .b47_; -.b49_: -||||||| parent of 90c66ca4 (more more more mroe more snapshots) - v49_: float = fdiv v8_ v8_; - print v49_; -.b48_: -.b50_: -======= - v49_: float = fdiv v8_ v8_; - print v49_; -.b48_: -.b50_: -||||||| parent of fd63f8b9 (more more more mroe more snapshots) - br v38_ .v24_ .v39_; -.v39_: - print v19_; -.v12_: - v40_: float = phi v18_ v2_ .v39_ .v9_; -.v10_: - v41_: float = phi v2_ v40_ .v5_ .v12_; - v42_: bool = phi v8_ v11_ .v5_ .v12_; - br v42_ .v43_ .v44_; -.v43_: - v45_: float = fdiv v41_ v41_; - print v45_; -.v44_: - jmp .v6_; -.v33_: - v36_: bool = const true; - jmp .v35_; -.v6_: -======= - br v32_ .v24_ .v33_; -.v33_: - print v19_; -.v12_: - v34_: float = phi v18_ v2_ .v33_ .v9_; -.v10_: - v35_: float = phi v2_ v34_ .v5_ .v12_; - v36_: bool = phi v8_ v11_ .v5_ .v12_; - br v36_ .v37_ .v38_; -.v37_: - v39_: float = fdiv v35_ v35_; - print v39_; -.v38_: -.v6_: ->>>>>>> fd63f8b9 (more more more mroe more snapshots) ->>>>>>> 90c66ca4 (more more more mroe more snapshots) -||||||| parent of 45ef9325 (snapshots again again) -.b11_: - br v9_ .b47_ .b48_; -.b47_: - v49_: float = fdiv v8_ v8_; - print v49_; -.b48_: -.b50_: -||||||| parent of fd63f8b9 (more more more mroe more snapshots) - br v38_ .v24_ .v39_; -.v39_: - print v19_; -.v12_: - v40_: float = phi v18_ v2_ .v39_ .v9_; -.v10_: - v41_: float = phi v2_ v40_ .v5_ .v12_; - v42_: bool = phi v8_ v11_ .v5_ .v12_; - br v42_ .v43_ .v44_; -.v43_: - v45_: float = fdiv v41_ v41_; - print v45_; -.v44_: - jmp .v6_; -.v33_: - v36_: bool = const true; - jmp .v35_; -.v6_: -======= - br v32_ .v24_ .v33_; -.v33_: - print v19_; -.v12_: - v34_: float = phi v18_ v2_ .v33_ .v9_; -.v10_: - v35_: float = phi v2_ v34_ .v5_ .v12_; - v36_: bool = phi v8_ v11_ .v5_ .v12_; - br v36_ .v37_ .v38_; -.v37_: - v39_: float = fdiv v35_ v35_; - print v39_; -.v38_: -.v6_: ->>>>>>> fd63f8b9 (more more more mroe more snapshots) -======= -.b11_: - br v9_ .b36_ .b37_; -.b36_: - v38_: float = fdiv v8_ v8_; - print v38_; -.b37_: -.b39_: ->>>>>>> 45ef9325 (snapshots again again) + v37_: float = fdiv v8_ v8_; + print v37_; + jmp .b36_; +.b38_: }