aboutsummaryrefslogtreecommitdiff
path: root/src/main/stanza/passes.stanza
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/stanza/passes.stanza')
-rw-r--r--src/main/stanza/passes.stanza4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/stanza/passes.stanza b/src/main/stanza/passes.stanza
index 41ca40c4..0470d521 100644
--- a/src/main/stanza/passes.stanza
+++ b/src/main/stanza/passes.stanza
@@ -2428,13 +2428,15 @@ defn const-prop-e (e:Expression) -> Expression :
BITS-SELECT-OP :
match(args(e)[0]) :
(x:UIntValue) :
- val b = bits(value(x),consts(e)[0],consts(e)[1])
+ val b = bits(value(x),consts(e)[0] + 1,consts(e)[1])
UIntValue(b,width(type(e) as UIntType))
+ (x) : e
BIT-SELECT-OP :
match(args(e)[0]) :
(x:UIntValue) :
val i = bit(value(x),consts(e)[0])
UIntValue(i,width(type(e) as UIntType))
+ (x) : e
else : e
(e) : e