about summary refs log tree commit diff homepage
path: root/test/Expr/Parser
diff options
context:
space:
mode:
authorDan Liew <daniel.liew@imperial.ac.uk>2014-01-12 19:00:08 +0000
committerDan Liew <daniel.liew@imperial.ac.uk>2014-01-20 13:21:31 +0000
commit9555ad14b188f66eff900df79840d8995af13ff2 (patch)
tree9ffae42f1960f30f268096e71455c1092100e2f8 /test/Expr/Parser
parent193733044666af86e295c1f9957dbd21caa5612b (diff)
downloadklee-9555ad14b188f66eff900df79840d8995af13ff2.tar.gz
Fixed Expr/Parser/ConstantFolding.pc test for llvm-lit (this probably
breaks DejaGNU tests). The issue is that in Tcl the quote needs escaping
but for llvm-lit we don't need to do this.

We should move to using the LLVM FileCheck tool instead of grep!
Diffstat (limited to 'test/Expr/Parser')
-rw-r--r--test/Expr/Parser/ConstantFolding.pc172
1 files changed, 86 insertions, 86 deletions
diff --git a/test/Expr/Parser/ConstantFolding.pc b/test/Expr/Parser/ConstantFolding.pc
index 2c8a4c52..a02920db 100644
--- a/test/Expr/Parser/ConstantFolding.pc
+++ b/test/Expr/Parser/ConstantFolding.pc
@@ -2,196 +2,196 @@
 
 array a[64] : w32 -> w8 = symbolic
 
-# RUN: grep -A 2 \"# Query 1$\" %t > %t2
-# RUN: grep \"(query .. false)\" %t2
+# RUN: grep -A 2 "# Query 1$" %t > %t2
+# RUN: grep "(query .. false)" %t2
 (query [] (Not (Ult (w32 0) (w32 1))))
 
 # Check -- 0 + X ==> X
-# RUN: grep -A 2 \"# Query 2$\" %t > %t2
-# RUN: grep \"(query .. false .(Read w8 0 a).)\" %t2
+# RUN: grep -A 2 "# Query 2$" %t > %t2
+# RUN: grep "(query .. false .(Read w8 0 a).)" %t2
 (query [] false [(Add w8 0 (Read w8 0 a))])
-# RUN: grep -A 2 \"# Query 3$\" %t > %t2
-# RUN: grep \"(query .. false .(Read w8 0 a).)\" %t2
+# RUN: grep -A 2 "# Query 3$" %t > %t2
+# RUN: grep "(query .. false .(Read w8 0 a).)" %t2
 (query [] false [(Add w8 (Read w8 0 a) 0)])
 
 # Check -- C_0 + (C_1 + X) ==> (C_0 + C_1) + X
-# RUN: grep -A 2 \"# Query 4$\" %t > %t2
-# RUN: grep \"(query .. false .(Add w8 30 (Read w8 0 a)).)\" %t2
+# RUN: grep -A 2 "# Query 4$" %t > %t2
+# RUN: grep "(query .. false .(Add w8 30 (Read w8 0 a)).)" %t2
 (query [] false [(Add w8 10 (Add w8 20 (Read w8 0 a)))])
 
 # Check -- C_0 + (X + C_1) ==> (C_0 + C_1) + X
-# RUN: grep -A 2 \"# Query 5$\" %t > %t2
-# RUN: grep \"(query .. false .(Add w8 30 (Read w8 0 a)).)\" %t2
+# RUN: grep -A 2 "# Query 5$" %t > %t2
+# RUN: grep "(query .. false .(Add w8 30 (Read w8 0 a)).)" %t2
 (query [] false [(Add w8 10 (Add w8 (Read w8 0 a) 20))])
 
 # Check -- C_0 + (C_1 - X) ==> (C_0 + C_1) - X
-# RUN: grep -A 2 \"# Query 6$\" %t > %t2
-# RUN: grep \"(query .. false .(Sub w8 30 (Read w8 0 a)).)\" %t2
+# RUN: grep -A 2 "# Query 6$" %t > %t2
+# RUN: grep "(query .. false .(Sub w8 30 (Read w8 0 a)).)" %t2
 (query [] false [(Add w8 10 (Sub w8 20 (Read w8 0 a)))])
 
 # Check -- C_0 + (X - C_1) ==> (C_0 - C_1) + X
-# RUN: grep -A 2 \"# Query 7$\" %t > %t2
-# RUN: grep \"(query .. false .(Add w8 246 (Read w8 0 a)).)\" %t2
+# RUN: grep -A 2 "# Query 7$" %t > %t2
+# RUN: grep "(query .. false .(Add w8 246 (Read w8 0 a)).)" %t2
 (query [] false [(Add w8 10 (Sub w8 (Read w8 0 a) 20))])
 
 # Check -- (X + Y) + Z ==> X + (Y + Z)
-# RUN: grep -A 3 \"# Query 8$\" %t > %t2
-# RUN: grep \"(query .. false .(Add w8 (Read w8 0 a)\" %t2
-# RUN: grep                          \"(Add w8 (Read w8 1 a) (Read w8 2 a)\" %t2
+# RUN: grep -A 3 "# Query 8$" %t > %t2
+# RUN: grep "(query .. false .(Add w8 (Read w8 0 a)" %t2
+# RUN: grep                          "(Add w8 (Read w8 1 a) (Read w8 2 a)" %t2
 (query [] false [(Add w8 (Add w8 (Read w8 0 a) (Read w8 1 a)) (Read w8 2 a))])
 
 # Check -- (X - Y) + Z ==> X + (Z - Y)
-# RUN: grep -A 3 \"# Query 9$\" %t > %t2
-# RUN: grep \"(query .. false .(Add w8 (Read w8 0 a)\" %t2
-# RUN: grep                          \"(Sub w8 (Read w8 2 a) (Read w8 1 a)\" %t2
+# RUN: grep -A 3 "# Query 9$" %t > %t2
+# RUN: grep "(query .. false .(Add w8 (Read w8 0 a)" %t2
+# RUN: grep                          "(Sub w8 (Read w8 2 a) (Read w8 1 a)" %t2
 (query [] false [(Add w8 (Sub w8 (Read w8 0 a) (Read w8 1 a)) (Read w8 2 a))])
 
 # Check -- X + (C + Y) ==> C + (X + Y)
-# RUN: grep -A 3 \"# Query 10$\" %t > %t2
-# RUN: grep \"(query .. false .(Add w8 10\" %t2
-# RUN: grep                          \"(Add w8 (Read w8 0 a) (Read w8 1 a)\" %t2
+# RUN: grep -A 3 "# Query 10$" %t > %t2
+# RUN: grep "(query .. false .(Add w8 10" %t2
+# RUN: grep                          "(Add w8 (Read w8 0 a) (Read w8 1 a)" %t2
 (query [] false [(Add w8 (Read w8 0 a) (Add w8 10 (Read w8 1 a)))])
 
 # Check -- X + (Y + C) ==> C + (X + Y)
-# RUN: grep -A 3 \"# Query 11$\" %t > %t2
-# RUN: grep \"(query .. false .(Add w8 10\" %t2
-# RUN: grep                          \"(Add w8 (Read w8 0 a) (Read w8 1 a)\" %t2
+# RUN: grep -A 3 "# Query 11$" %t > %t2
+# RUN: grep "(query .. false .(Add w8 10" %t2
+# RUN: grep                          "(Add w8 (Read w8 0 a) (Read w8 1 a)" %t2
 (query [] false [(Add w8 (Read w8 0 a) (Add w8 (Read w8 1 a) 10))])
 
 # Check -- X + (C - Y) ==> C + (X - Y)
-# RUN: grep -A 3 \"# Query 12$\" %t > %t2
-# RUN: grep \"(query .. false .(Add w8 10\" %t2
-# RUN: grep                          \"(Sub w8 (Read w8 0 a) (Read w8 1 a)\" %t2
+# RUN: grep -A 3 "# Query 12$" %t > %t2
+# RUN: grep "(query .. false .(Add w8 10" %t2
+# RUN: grep                          "(Sub w8 (Read w8 0 a) (Read w8 1 a)" %t2
 (query [] false [(Add w8 (Read w8 0 a) (Sub w8 10 (Read w8 1 a)))])
 
 # Check -- X + (Y - C) ==> -C + (X + Y)
-# RUN: grep -A 3 \"# Query 13$\" %t > %t2
-# RUN: grep \"(query .. false .(Add w8 246\" %t2
-# RUN: grep                          \"(Add w8 (Read w8 0 a) (Read w8 1 a)\" %t2
+# RUN: grep -A 3 "# Query 13$" %t > %t2
+# RUN: grep "(query .. false .(Add w8 246" %t2
+# RUN: grep                          "(Add w8 (Read w8 0 a) (Read w8 1 a)" %t2
 (query [] false [(Add w8 (Read w8 0 a) (Sub w8 (Read w8 1 a) 10))])
 
 # Check -- C_0 - (C_1 + X) ==> (C_0 - C1) - X
-# RUN: grep -A 2 \"# Query 14$\" %t > %t2
-# RUN: grep \"(query .. false .(Sub w8 10 (Read w8 0 a))\" %t2
+# RUN: grep -A 2 "# Query 14$" %t > %t2
+# RUN: grep "(query .. false .(Sub w8 10 (Read w8 0 a))" %t2
 (query [] false [(Sub w8 20 (Add w8 10 (Read w8 0 a)))])
 
 # Check -- C_0 - (X + C_1) ==> (C_0 + C1) + X
-# RUN: grep -A 2 \"# Query 15$\" %t > %t2
-# RUN: grep \"(query .. false .(Sub w8 10 (Read w8 0 a))\" %t2
+# RUN: grep -A 2 "# Query 15$" %t > %t2
+# RUN: grep "(query .. false .(Sub w8 10 (Read w8 0 a))" %t2
 (query [] false [(Sub w8 20 (Add w8 (Read w8 0 a) 10))])
 
 # Check -- C_0 - (C_1 - X) ==> (C_0 - C1) + X
-# RUN: grep -A 2 \"# Query 16$\" %t > %t2
-# RUN: grep \"(query .. false .(Add w8 10 (Read w8 0 a))\" %t2
+# RUN: grep -A 2 "# Query 16$" %t > %t2
+# RUN: grep "(query .. false .(Add w8 10 (Read w8 0 a))" %t2
 (query [] false [(Sub w8 20 (Sub w8 10 (Read w8 0 a)))])
 
 # Check -- C_0 - (X - C_1) ==> (C_0 + C1) - X
-# RUN: grep -A 2 \"# Query 17$\" %t > %t2
-# RUN: grep \"(query .. false .(Sub w8 30 (Read w8 0 a))\" %t2
+# RUN: grep -A 2 "# Query 17$" %t > %t2
+# RUN: grep "(query .. false .(Sub w8 30 (Read w8 0 a))" %t2
 (query [] false [(Sub w8 20 (Sub w8 (Read w8 0 a) 10))])
 
 # Check -- (C_0 + X) - C_1 ==> (C_0 - C1) + X
-# RUN: grep -A 2 \"# Query 18$\" %t > %t2
-# RUN: grep \"(query .. false .(Add w8 246 (Read w8 0 a))\" %t2
+# RUN: grep -A 2 "# Query 18$" %t > %t2
+# RUN: grep "(query .. false .(Add w8 246 (Read w8 0 a))" %t2
 (query [] false [(Sub w8 (Add w8 10 (Read w8 0 a)) 20)])
 
 # Check -- (X + C_0) - C_1 ==> (C_0 - C1) + X
-# RUN: grep -A 2 \"# Query 19$\" %t > %t2
-# RUN: grep \"(query .. false .(Add w8 246 (Read w8 0 a))\" %t2
+# RUN: grep -A 2 "# Query 19$" %t > %t2
+# RUN: grep "(query .. false .(Add w8 246 (Read w8 0 a))" %t2
 (query [] false [(Sub w8 (Add w8 (Read w8 0 a) 10) 20)])
 
 # Check -- (C_0 - X) - C_1 ==> (C_0 - C1) - X
-# RUN: grep -A 2 \"# Query 20$\" %t > %t2
-# RUN: grep \"(query .. false .(Sub w8 246 (Read w8 0 a))\" %t2
+# RUN: grep -A 2 "# Query 20$" %t > %t2
+# RUN: grep "(query .. false .(Sub w8 246 (Read w8 0 a))" %t2
 (query [] false [(Sub w8 (Sub w8 10 (Read w8 0 a)) 20)])
 
 # Check -- (X - C_0) - C_1 ==> -(C_0 + C1) + X
-# RUN: grep -A 2 \"# Query 21$\" %t > %t2
-# RUN: grep \"(query .. false .(Add w8 226 (Read w8 0 a))\" %t2
+# RUN: grep -A 2 "# Query 21$" %t > %t2
+# RUN: grep "(query .. false .(Add w8 226 (Read w8 0 a))" %t2
 (query [] false [(Sub w8 (Sub w8 (Read w8 0 a) 10) 20)])
 
 # Check -- (X + Y) - Z ==> X + (Y - Z)
-# RUN: grep -A 3 \"# Query 22$\" %t > %t2
-# RUN: grep \"(query .. false .(Add w8 (Read w8 0 a)\" %t2
-# RUN: grep                          \"(Sub w8 (Read w8 1 a) (Read w8 2 a)\" %t2
+# RUN: grep -A 3 "# Query 22$" %t > %t2
+# RUN: grep "(query .. false .(Add w8 (Read w8 0 a)" %t2
+# RUN: grep                          "(Sub w8 (Read w8 1 a) (Read w8 2 a)" %t2
 (query [] false [(Sub w8 (Add w8 (Read w8 0 a) (Read w8 1 a)) (Read w8 2 a))])
 
 # Check -- (X - Y) - Z ==> X - (Y + Z)
-# RUN: grep -A 3 \"# Query 23$\" %t > %t2
-# RUN: grep \"(query .. false .(Sub w8 (Read w8 0 a)\" %t2
-# RUN: grep                          \"(Add w8 (Read w8 1 a) (Read w8 2 a)\" %t2
+# RUN: grep -A 3 "# Query 23$" %t > %t2
+# RUN: grep "(query .. false .(Sub w8 (Read w8 0 a)" %t2
+# RUN: grep                          "(Add w8 (Read w8 1 a) (Read w8 2 a)" %t2
 (query [] false [(Sub w8 (Sub w8 (Read w8 0 a) (Read w8 1 a)) (Read w8 2 a))])
 
 # Check -- X - (C + Y) ==> -C + (X - Y)
-# RUN: grep -A 3 \"# Query 24$\" %t > %t2
-# RUN: grep \"(query .. false .(Add w8 246\" %t2
-# RUN: grep                          \"(Sub w8 (Read w8 0 a) (Read w8 1 a)\" %t2
+# RUN: grep -A 3 "# Query 24$" %t > %t2
+# RUN: grep "(query .. false .(Add w8 246" %t2
+# RUN: grep                          "(Sub w8 (Read w8 0 a) (Read w8 1 a)" %t2
 (query [] false [(Sub w8 (Read w8 0 a) (Add w8 10 (Read w8 1 a)))])
 
 # Check -- X - (Y + C) ==> -C + (X - Y)
-# RUN: grep -A 3 \"# Query 25$\" %t > %t2
-# RUN: grep \"(query .. false .(Add w8 246\" %t2
-# RUN: grep                          \"(Sub w8 (Read w8 0 a) (Read w8 1 a)\" %t2
+# RUN: grep -A 3 "# Query 25$" %t > %t2
+# RUN: grep "(query .. false .(Add w8 246" %t2
+# RUN: grep                          "(Sub w8 (Read w8 0 a) (Read w8 1 a)" %t2
 (query [] false [(Sub w8 (Read w8 0 a) (Add w8 (Read w8 1 a) 10))])
 
 # Check -- X - (C - Y) ==> -C + (X + Y)
-# RUN: grep -A 3 \"# Query 26$\" %t > %t2
-# RUN: grep \"(query .. false .(Add w8 246\" %t2
-# RUN: grep                          \"(Add w8 (Read w8 0 a) (Read w8 1 a)\" %t2
+# RUN: grep -A 3 "# Query 26$" %t > %t2
+# RUN: grep "(query .. false .(Add w8 246" %t2
+# RUN: grep                          "(Add w8 (Read w8 0 a) (Read w8 1 a)" %t2
 (query [] false [(Sub w8 (Read w8 0 a) (Sub w8 10 (Read w8 1 a)))])
 
 # Check -- X - (Y - C) ==> C + (X - Y)
-# RUN: grep -A 3 \"# Query 27$\" %t > %t2
-# RUN: grep \"(query .. false .(Add w8 10\" %t2
-# RUN: grep                          \"(Sub w8 (Read w8 0 a) (Read w8 1 a)\" %t2
+# RUN: grep -A 3 "# Query 27$" %t > %t2
+# 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
+# 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
+# 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))])
 
 # Check -- X & 0 ==> 0
-# RUN: grep -A 2 \"# Query 30$\" %t > %t2
-# RUN: grep \"(query .. false .(w8 0).\" %t2
+# RUN: grep -A 2 "# Query 30$" %t > %t2
+# RUN: grep "(query .. false .(w8 0)." %t2
 (query [] false [(And w8 0 (Read w8 0 a))])
 
 # Check -- X & 0b1...1 ==> X
-# RUN: grep -A 2 \"# Query 31$\" %t > %t2
-# RUN: grep \"(query .. false .(Read w8 0 a).\" %t2
+# RUN: grep -A 2 "# Query 31$" %t > %t2
+# RUN: grep "(query .. false .(Read w8 0 a)." %t2
 (query [] false [(And w8 255 (Read w8 0 a))])
 
 # Check -- X | 0 ==> X
-# RUN: grep -A 2 \"# Query 32$\" %t > %t2
-# RUN: grep \"(query .. false .(Read w8 0 a).\" %t2
+# RUN: grep -A 2 "# Query 32$" %t > %t2
+# RUN: grep "(query .. false .(Read w8 0 a)." %t2
 (query [] false [(Or w8 0 (Read w8 0 a))])
 
 # Check -- X | 0b1...1 ==> X
-# RUN: grep -A 2 \"# Query 33$\" %t > %t2
-# RUN: grep \"(query .. false .(w8 255).\" %t2
+# RUN: grep -A 2 "# Query 33$" %t > %t2
+# RUN: grep "(query .. false .(w8 255)." %t2
 (query [] false [(Or w8 255 (Read w8 0 a))])
 
 # Check -- X ^ 0b1...1 ==> X
-# RUN: grep -A 2 \"# Query 34$\" %t > %t2
-# RUN: grep \"(query .. false .(Read w8 0 a).\" %t2
+# RUN: grep -A 2 "# Query 34$" %t > %t2
+# RUN: grep "(query .. false .(Read w8 0 a)." %t2
 (query [] false [(Xor w8 0 (Read w8 0 a))])
 
 # Check -- true == X ==> X
-# RUN: grep -A 2 \"# Query 35$\" %t > %t2
-# RUN: grep \"(query .. false .(Eq 0 (Read w8 0 a)).\" %t2
+# RUN: grep -A 2 "# Query 35$" %t > %t2
+# RUN: grep "(query .. false .(Eq 0 (Read w8 0 a))." %t2
 (query [] false [(Eq true (Eq 0 (Read w8 0 a)))])
 
 # Check -- !!X ==> X
-# RUN: grep -A 2 \"# Query 36$\" %t > %t2
-# RUN: grep \"(query .. false .(Eq 0 (Read w8 0 a)).\" %t2
+# RUN: grep -A 2 "# Query 36$" %t > %t2
+# RUN: grep "(query .. false .(Eq 0 (Read w8 0 a))." %t2
 (query [] false [(Not (Not (Eq 0 (Read w8 0 a))))])
 
 # Check -- !Const
-# RUN: grep -A 2 \"# Query 37$\" %t > %t2
-# RUN: grep \"(query .. false .true.\" %t2
+# RUN: grep -A 2 "# Query 37$" %t > %t2
+# RUN: grep "(query .. false .true." %t2
 (query [] false [(Eq (Not w32 0xdeadbeef) 0x21524110)])