This repository has been archived by the owner on Jan 8, 2024. It is now read-only.
forked from Chia-Network/clvm_tools_rs
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more tests with different inline arrangements
- Loading branch information
1 parent
b7eae95
commit 2884260
Showing
4 changed files
with
93 additions
and
0 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
resources/tests/strict/cse_doesnt_dominate_superior_let_iodi.clsp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
(mod (X) | ||
(include *standard-cl-23*) | ||
|
||
(defun-inline L (Z X) (* (+ Z 1) (+ Z 1) (+ Z 1) (+ X 1) (+ X 1) (+ X 1))) | ||
|
||
;; (+ X 1) should be an eliminated subexpression but it doesn't dominate the | ||
;; condition. | ||
(defun-inline F1 (X) | ||
(let ((Z X)) | ||
(if X | ||
(L Z X) | ||
17 | ||
) | ||
) | ||
) | ||
|
||
(defun F (X) (F1 X)) | ||
|
||
(F X) | ||
) |
18 changes: 18 additions & 0 deletions
18
resources/tests/strict/cse_doesnt_dominate_superior_let_odi.clsp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
(mod (X) | ||
(include *standard-cl-23*) | ||
|
||
;; (+ X 1) should be an eliminated subexpression but it doesn't dominate the | ||
;; condition. | ||
(defun-inline F1 (X) | ||
(let ((Z X)) | ||
(if X | ||
(* (+ Z 1) (+ Z 1) (+ Z 1) (+ X 1) (+ X 1) (+ X 1)) | ||
17 | ||
) | ||
) | ||
) | ||
|
||
(defun F (X) (F1 X)) | ||
|
||
(F X) | ||
) |
16 changes: 16 additions & 0 deletions
16
resources/tests/strict/cse_doesnt_dominate_superior_let_outside_in_defun.clsp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
(mod (X) | ||
(include *standard-cl-23*) | ||
|
||
;; (+ X 1) should be an eliminated subexpression but it doesn't dominate the | ||
;; condition. | ||
(defun F (X) | ||
(let ((Z X)) | ||
(if X | ||
(* (+ Z 1) (+ Z 1) (+ Z 1) (+ X 1) (+ X 1) (+ X 1)) | ||
17 | ||
) | ||
) | ||
) | ||
|
||
(F X) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters