The GEP constructor does not assert that the source and destination types match. Of course, this is incorrect and causes random failures somewhere down the line.
Could I add general sanity checks to the GEP constructor?
In general, is an Instruction allowed to be in an inconsistent state? If so, is there some well known method to “verify” whether an instruction is consistent or not?