about summary refs log tree commit diff stats
path: root/test/ir/reduce_graph.py
diff options
context:
space:
mode:
authorCamille Mougey <commial@gmail.com>2019-02-19 14:51:01 +0100
committerGitHub <noreply@github.com>2019-02-19 14:51:01 +0100
commit8d3d5b1efb37aae373a9f1d4b50cd17ab79df60c (patch)
tree8f544e51fa7972dd94037ca32df656a74ec9b987 /test/ir/reduce_graph.py
parentb07de002f011e1fb6fe62e6ebb8b033c3ca44090 (diff)
parentc656fcbf006bc3d5dca8ccb273dd5441e053b51c (diff)
downloadmiasm-8d3d5b1efb37aae373a9f1d4b50cd17ab79df60c.tar.gz
miasm-8d3d5b1efb37aae373a9f1d4b50cd17ab79df60c.zip
Merge pull request #976 from serpilliere/passes_simplifier
Passes simplifier
Diffstat (limited to 'test/ir/reduce_graph.py')
-rw-r--r--test/ir/reduce_graph.py41
1 files changed, 35 insertions, 6 deletions
diff --git a/test/ir/reduce_graph.py b/test/ir/reduce_graph.py
index 29a3501f..75ff3410 100644
--- a/test/ir/reduce_graph.py
+++ b/test/ir/reduce_graph.py
@@ -321,17 +321,27 @@ G4_RES_IRB0 = gen_irblock(
     LBL0,
     [
         [
+            ExprAssign(IRDst, ExprLoc(LBL1, 32)),
+        ]
+    ]
+)
+
+
+G4_RES_IRB1 = gen_irblock(
+    LBL1,
+    [
+        [
             ExprAssign(A, C),
         ],
         [
             ExprAssign(D, A),
-            ExprAssign(IRDst, ExprLoc(LBL0, 32)),
+            ExprAssign(IRDst, ExprLoc(LBL1, 32)),
         ]
     ]
 )
 
 
-for irb in [G4_RES_IRB0 ]:
+for irb in [G4_RES_IRB0, G4_RES_IRB1 ]:
     G4_RES.add_irblock(irb)
 
 
@@ -389,15 +399,25 @@ for irb in [G5_IRB0, G5_IRB1, G5_IRB2, G5_IRB3]:
 # Result
 G5_RES = IRA.new_ircfg()
 
+
 G5_RES_IRB0 = gen_irblock(
     LBL0,
     [
         [
+            ExprAssign(IRDst, ExprLoc(LBL1, 32)),
+        ]
+    ]
+)
+
+G5_RES_IRB1 = gen_irblock(
+    LBL1,
+    [
+        [
             ExprAssign(A, C),
         ],
         [
             ExprAssign(D, A),
-            ExprAssign(IRDst, ExprCond(C, ExprLoc(LBL0, 32), ExprLoc(LBL3, 32))),
+            ExprAssign(IRDst, ExprCond(C, ExprLoc(LBL1, 32), ExprLoc(LBL3, 32))),
         ]
     ]
 )
@@ -413,7 +433,7 @@ G5_RES_IRB3 = gen_irblock(
     ]
 )
 
-for irb in [G5_RES_IRB0, G5_RES_IRB3 ]:
+for irb in [G5_RES_IRB0, G5_RES_IRB1, G5_RES_IRB3 ]:
     G5_RES.add_irblock(irb)
 
 
@@ -605,14 +625,23 @@ G8_RES_IRB0 = gen_irblock(
     LBL0,
     [
         [
+            ExprAssign(IRDst, ExprLoc(LBL1, 32)),
+        ]
+    ]
+)
+
+G8_RES_IRB1 = gen_irblock(
+    LBL1,
+    [
+        [
             ExprAssign(A, C),
-            ExprAssign(IRDst, ExprLoc(LBL0, 32)),
+            ExprAssign(IRDst, ExprLoc(LBL1, 32)),
         ]
     ]
 )
 
 
-for irb in [G8_RES_IRB0]:
+for irb in [G8_RES_IRB0, G8_RES_IRB1]:
     G8_RES.add_irblock(irb)