diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2018-07-31 23:55:59 +0200 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2018-08-01 00:00:52 +0200 |
| commit | 70f233934b2b46e927d96a3eb74a491e13eb3ec0 (patch) | |
| tree | 857b41ad76beb625b098c64f0eaa06286dadc4e3 /test/ir/reduce_graph.py | |
| parent | af9952c4c494a1c2848f167cb376139f5b884c07 (diff) | |
| download | miasm-70f233934b2b46e927d96a3eb74a491e13eb3ec0.tar.gz miasm-70f233934b2b46e927d96a3eb74a491e13eb3ec0.zip | |
Test: add regression test (bad block ref)
Diffstat (limited to 'test/ir/reduce_graph.py')
| -rw-r--r-- | test/ir/reduce_graph.py | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/test/ir/reduce_graph.py b/test/ir/reduce_graph.py index 03674600..68a3aea8 100644 --- a/test/ir/reduce_graph.py +++ b/test/ir/reduce_graph.py @@ -567,6 +567,58 @@ for irb in [G7_RES_IRB0, G7_RES_IRB1]: +########## G8 ########## +# Input + +G8 = IRA.new_ircfg() + +G8_IRB0 = gen_irblock( + LBL0, + [ + [ + ExprAff(IRDst, ExprLoc(LBL1, 32)), + ] + ] +) + +G8_IRB1 = gen_irblock( + LBL1, + [ + [ + ExprAff(A, C), + ExprAff(IRDst, ExprLoc(LBL1, 32)), + ] + ] +) + + +for irb in [G8_IRB0, G8_IRB1]: + G8.add_irblock(irb) + + +# Result +G8_RES = IRA.new_ircfg() + + + +G8_RES_IRB0 = gen_irblock( + LBL0, + [ + [ + ExprAff(A, C), + ExprAff(IRDst, ExprLoc(LBL0, 32)), + ] + ] +) + + +for irb in [G8_RES_IRB0]: + G8_RES.add_irblock(irb) + + + + + ################# Tests @@ -579,6 +631,7 @@ for i, (g_test, g_ref) in enumerate( (G5, G5_RES), (G6, G6_RES), (G7, G7_RES), + (G8, G8_RES), ], 1): heads = g_test.heads() |