From ae5eb7c65d8770795f33cbb27de1380b885b53d6 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Tue, 16 Jun 2009 02:54:09 +0000 Subject: Add (very) basic constant folding for Mul. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@73460 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Expr/Parser/ConstantFolding.pc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test') diff --git a/test/Expr/Parser/ConstantFolding.pc b/test/Expr/Parser/ConstantFolding.pc index 95bc361a..3a311a60 100644 --- a/test/Expr/Parser/ConstantFolding.pc +++ b/test/Expr/Parser/ConstantFolding.pc @@ -145,3 +145,13 @@ array a[64] : w32 -> w8 = symbolic # RUN: grep \"(query .. false .(Add w8 10\" %t2 # RUN: grep \"(Sub w8 (Read w8 0 a) (Read w8 1 a)\" %t2 (query [] false [(Sub w8 (Read w8 0 a) (Sub w8 (Read w8 1 a) 10))]) + +# Check -- X * 0 ==> 0 +# RUN: grep -A 2 \"# Query 28\" %t > %t2 +# RUN: grep \"(query .. false .(w8 0).\" %t2 +(query [] false [(Mul w8 0 (Read w8 0 a))]) + +# Check -- X * 1 ==> X +# RUN: grep -A 2 \"# Query 29\" %t > %t2 +# RUN: grep \"(query .. false .(Read w8 0 a).\" %t2 +(query [] false [(Mul w8 1 (Read w8 0 a))]) -- cgit 1.4.1