From 274cff35ec85c149c9fbcccbc135349509baa31c Mon Sep 17 00:00:00 2001 From: Ajax Date: Thu, 1 Jun 2017 17:33:13 +0200 Subject: Add a new simplification: {@X[base + i] 0 X, @Y[base + i + X] X (X + Y)} => @(X+Y)[base + i] --- test/expression/simplifications.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/expression/simplifications.py') diff --git a/test/expression/simplifications.py b/test/expression/simplifications.py index 60c328dc..efabddb5 100644 --- a/test/expression/simplifications.py +++ b/test/expression/simplifications.py @@ -314,6 +314,11 @@ to_test = [(ExprInt(1, 32) - ExprInt(1, 32), ExprInt(0, 32)), (ExprOp("imod", ExprInt(0x0123, 16), ExprInt(0xfffb, 16))[:8], ExprInt(0x01, 8)), + (ExprCompose(ExprInt(0x0123, 16), ExprMem(a + ExprInt(0x40, a.size), 16), + ExprMem(a + ExprInt(0x42, a.size), 16), ExprInt(0x0321, 16)), + ExprCompose(ExprInt(0x0123, 16), ExprMem(a + ExprInt(0x40, a.size), 32), + ExprInt(0x0321, 16))), + ] for e, e_check in to_test[:]: -- cgit 1.4.1