From fc0b0ae1780b39b14a226276cf051d2966d629a8 Mon Sep 17 00:00:00 2001 From: David Given Date: Wed, 5 Sep 2018 23:53:08 +0200 Subject: [PATCH] (Slightly) better errors on phi congruence group mismatches. --- mach/proto/mcg/pass_phigroups.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mach/proto/mcg/pass_phigroups.c b/mach/proto/mcg/pass_phigroups.c index dfff73faa..e57378ad4 100644 --- a/mach/proto/mcg/pass_phigroups.c +++ b/mach/proto/mcg/pass_phigroups.c @@ -36,8 +36,10 @@ static void recursively_associate_group(struct phicongruence* c, struct vreg* vr struct constraint* constraint = pmap_findleft(&vreg->defined->constraints, vreg); if (c->type == 0) c->type = vreg->type; - - assert(c->type == vreg->type); + + if (c->type != vreg->type) + fatal("tried to add register %%%d of type 0x%x to a phi congruence group of type 0x%x", + vreg->id, vreg->type, c->type); array_appendu(&c->definitions, vreg->defined); } -- 2.34.1