func (fr *frame) createZExtOrTrunc(v llvm.Value, t llvm.Type, name string) llvm.Value { switch n := v.Type().IntTypeWidth() - t.IntTypeWidth(); { case n < 0: v = fr.builder.CreateZExt(v, fr.target.IntPtrType(), name) case n > 0: v = fr.builder.CreateTrunc(v, fr.target.IntPtrType(), name) } return v }