commit 1b1a7f618ce9fc6b455e3c30213a8ec8feaab1dc
parent 61309852742548b496d222cf4e3f2c5e1569e6dd
Author: Quentin Carbonneaux <quentin@c9x.me>
Date:   Tue, 14 May 2019 18:43:39 +0200
fix a bad bug in copy detection
The code used to see add 0, 10 as
a copy of 0.
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/copy.c b/copy.c
@@ -27,11 +27,11 @@ iscopy(Ins *i, Ref r, Fn *fn)
 	case Ocopy:
 		return 1;
 	case Omul:
-		return iscon(i->arg[0], 1, fn) || iscon(i->arg[1], 1, fn);
+		return iscon(i->arg[1], 1, fn);
 	case Odiv:
 		return iscon(i->arg[1], 1, fn);
 	case Oadd:
-		return iscon(i->arg[0], 0, fn) || iscon(i->arg[1], 0, fn);
+		return iscon(i->arg[1], 0, fn);
 	default:
 		break;
 	}