From 02ba7ba672eb91873726530d46ecf10babc7d4b9 Mon Sep 17 00:00:00 2001 From: Nicholas Coughlin Date: Tue, 23 Jul 2024 10:21:14 +1000 Subject: [PATCH] Re-enable last minute slice removal --- libASL/transforms.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libASL/transforms.ml b/libASL/transforms.ml index c8cba591..ed72b231 100644 --- a/libASL/transforms.ml +++ b/libASL/transforms.ml @@ -1380,9 +1380,9 @@ module RedundantSlice = struct (* Last chance to convert dynamic slices into shift & static slice *) | Expr_Slices(x, [Slice_LoWd(l,w)]) when non_const l -> (match option_or (infer_type x) (self#var_type' x) with - (*| Some (Type_Bits xw) -> + | Some (Type_Bits xw) -> let e = Expr_TApply (FIdent ("LSR", 0), [xw], [x; l]) in - Expr_Slices(e, [Slice_LoWd (Expr_LitInt "0", w)])*) + Expr_Slices(e, [Slice_LoWd (Expr_LitInt "0", w)]) | _ -> e) | Expr_Slices(e', [Slice_LoWd (Expr_LitInt "0", wd)]) -> let try_match (opt: ty option): expr =