From fcc7aafa64338bdbac356dd509acd20f35563ef5 Mon Sep 17 00:00:00 2001 From: Stan Cox Date: Wed, 21 May 2008 09:22:17 -0400 Subject: Optimize compound and binary expression assignments. --- testsuite/systemtap.base/optim_arridx.exp | 2 ++ testsuite/systemtap.base/optim_arridx.stp | 6 ++++++ 2 files changed, 8 insertions(+) (limited to 'testsuite/systemtap.base') diff --git a/testsuite/systemtap.base/optim_arridx.exp b/testsuite/systemtap.base/optim_arridx.exp index 447ad1f4..b7c5c360 100644 --- a/testsuite/systemtap.base/optim_arridx.exp +++ b/testsuite/systemtap.base/optim_arridx.exp @@ -45,6 +45,8 @@ for (1; (bb) < (10); (bb)++) (cc) += (bb) for ((dd) = (1); (dd) < (10); 1) (dd) += (1) if (1) (ee) = (1) +(cc) = ((dd) = (5)) +(cc) = ((4) + ((cc) = (1))) printf("%d %d %d %d %d", aa, bb, cc, dd, ee) exit() } diff --git a/testsuite/systemtap.base/optim_arridx.stp b/testsuite/systemtap.base/optim_arridx.stp index 4551bb3e..20710c7f 100644 --- a/testsuite/systemtap.base/optim_arridx.stp +++ b/testsuite/systemtap.base/optim_arridx.stp @@ -34,6 +34,12 @@ probe begin { if (elide_global_b = 1) ee = 1 + // compound assignment + cc = elide_gg=dd=5 + + // binary expression + cc = ((elide_hh = 4) + (cc = 1)) + printf("%d %d %d %d %d", aa, bb, cc, dd, ee) exit () } -- cgit