aboutsummaryrefslogtreecommitdiffstats
path: root/test/libyul/yulOptimizerTests/rematerialiser/large_constant_used_once.yul
diff options
context:
space:
mode:
Diffstat (limited to 'test/libyul/yulOptimizerTests/rematerialiser/large_constant_used_once.yul')
-rw-r--r--test/libyul/yulOptimizerTests/rematerialiser/large_constant_used_once.yul13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/libyul/yulOptimizerTests/rematerialiser/large_constant_used_once.yul b/test/libyul/yulOptimizerTests/rematerialiser/large_constant_used_once.yul
new file mode 100644
index 00000000..b8a861aa
--- /dev/null
+++ b/test/libyul/yulOptimizerTests/rematerialiser/large_constant_used_once.yul
@@ -0,0 +1,13 @@
+{
+ // Constants cost depending on their magnitude.
+ // Do not rematerialize large constants,
+ // unless they are used exactly once.
+ let a := 0xffffffffffffffffffffff
+ mstore(0, a)
+}
+// ----
+// rematerialiser
+// {
+// let a := 0xffffffffffffffffffffff
+// mstore(0, 0xffffffffffffffffffffff)
+// }