}
if (cond.isPure()) {
// we can optimise away the test only if cond is pure (i.e. no side effects)
Type t=cond.getType();
if (t.cannotBeFalsey()) return doThen;
if (t.cannotBeTruthy()) return doElse;
}
if ((cond==this.cond)&&(doThen==this.doThen)&&(doElse==this.doElse)) return this;
return new If(cond,doThen,doElse);