summaryrefslogtreecommitdiff
path: root/6
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-10-18 23:40:07 -0700
committerOri Bernstein <ori@eigenstate.org>2015-10-19 01:49:22 -0700
commitf6ec48552387bc96585113826b011206909faf98 (patch)
treecc20fc0fe44b0d0f7612107abfd57d95e24124f0 /6
parent14d4a8e93c6804eb049eec51a5102c9d8b10c1c5 (diff)
downloadmc-f6ec48552387bc96585113826b011206909faf98.tar.gz
Make improved pattern matching work for unions.
Diffstat (limited to '6')
-rw-r--r--6/simp.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/6/simp.c b/6/simp.c
index 06a744a..74c8c83 100644
--- a/6/simp.c
+++ b/6/simp.c
@@ -1218,8 +1218,14 @@ static Node *simpucon(Simp *s, Node *n, Node *dst)
static Node *simpuget(Simp *s, Node *n, Node *dst)
{
- die("No uget simplification yet");
- return NULL;
+ Node *u, *p;
+
+ if (!dst)
+ dst = temp(s, n);
+ u = n->expr.args[0];
+ p = addk(addr(s, u, exprtype(n)), Wordsz);
+ assign(s, dst, load(p));
+ return dst;
}
/* simplifies