summaryrefslogtreecommitdiffstats
path: root/stdlib/optimize.tl
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2023-03-21 20:51:13 -0700
committerKaz Kylheku <kaz@kylheku.com>2023-03-21 20:51:13 -0700
commit1adc9a307ca9009a9cd39b7ed109cd9ecb597200 (patch)
tree66fc89a2ca5bdd4e301415c82f8f270d81c65b15 /stdlib/optimize.tl
parent6a5d5e45f262794753fb2fa698bbf66fb6d7cc3b (diff)
downloadtxr-1adc9a307ca9009a9cd39b7ed109cd9ecb597200.tar.gz
txr-1adc9a307ca9009a9cd39b7ed109cd9ecb597200.tar.bz2
txr-1adc9a307ca9009a9cd39b7ed109cd9ecb597200.zip
compiler: bug: unmatchable pattern in optimizer.
This was uncovered by unused variable warnings. * stdlib/optimize.tl (basic-blocks peephole-block): The pattern trying to detect wasteful register moves is incorrect; the reg1 term is intended to be the @reg1 variable. It is matched literally and so will not match because the symbol reg1 does not literally occur in the VM code.
Diffstat (limited to 'stdlib/optimize.tl')
-rw-r--r--stdlib/optimize.tl2
1 files changed, 1 insertions, 1 deletions
diff --git a/stdlib/optimize.tl b/stdlib/optimize.tl
index 329bae03..7681bca1 100644
--- a/stdlib/optimize.tl
+++ b/stdlib/optimize.tl
@@ -397,7 +397,7 @@
;; wasteful moves
(((mov @reg0 @nil) (mov @reg0 @nil) . @nil)
(cdr insns))
- (((mov @reg0 @reg1) (mov reg1 @reg0) . @rest)
+ (((mov @reg0 @reg1) (mov @reg1 @reg0) . @rest)
(pushnew bl bb.rescan)
(set bb.recalc t)
^(,(car insns) ,*rest))