summary refs log tree commit diff
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-07-22 05:33:45 -0400
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-09-15 23:01:29 -0400
commit7202c7dedfcd274130cd15549e620a9b8513ef3f (patch)
treebd7227e72991a5e917cad04e4f8c9f0cda7cc69b
parent1891a810e82268260891352afd6b0bd2757b02cd (diff)
downloadroux-7202c7dedfcd274130cd15549e620a9b8513ef3f.tar.gz
simplify tests for hd
-rw-r--r--lisc/spill.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/lisc/spill.c b/lisc/spill.c
index 6e63689..26b1c5a 100644
--- a/lisc/spill.c
+++ b/lisc/spill.c
@@ -234,13 +234,11 @@ spill(Fn *fn)
 		k = 4 - !req(b->jmp.arg, R);
 		v = (Bits){{0}};
 		hd = 0;
-		if (s1) {
-			if (s1->id <= n)
-				hd = s1;
-			if (s2 && s2->id <= n)
-			if (!hd || s2->id >= hd->id)
-				hd = s2;
-		}
+		if (s1 && s1->id <= n)
+			hd = s1;
+		if (s2 && s2->id <= n)
+		if (!hd || s2->id >= hd->id)
+			hd = s2;
 		if (hd) {
 			/* back-edge */
 			pl = hd->nlive;