// Assume everything will work out, so set up our return value.
// Anything interesting that happens from here is a fatal.
x := s.expr(n.Left())
+ if to == from {
+ return x
+ }
// Special case for not confusing GC and liveness.
// We don't want pointers accidentally classified
s.stmtList(cond.Init())
s.condBranch(cond.Left(), no, yes, -likely)
return
+ case ir.OCONVNOP:
+ s.stmtList(cond.Init())
+ s.condBranch(cond.Left(), yes, no, likely)
+ return
}
c := s.expr(cond)
b := s.endBlock()
return s.newValue1I(ssa.OpOffPtr, t, n.Offset(),
s.entryNewValue0(ssa.OpGetClosurePtr, s.f.Config.Types.BytePtr))
case ir.OCONVNOP:
+ if n.Type() == n.Left().Type() {
+ return s.addr(n.Left())
+ }
addr := s.addr(n.Left())
return s.newValue1(ssa.OpCopy, t, addr) // ensure that addr has the right type
case ir.OCALLFUNC, ir.OCALLINTER, ir.OCALLMETH:
case ir.OCONV, ir.OCONVNOP:
n.SetLeft(walkexpr(n.Left(), init))
+ if n.Op() == ir.OCONVNOP && n.Type() == n.Left().Type() {
+ return n.Left()
+ }
if n.Op() == ir.OCONVNOP && checkPtr(Curfn, 1) {
if n.Type().IsPtr() && n.Left().Type().IsUnsafePtr() { // unsafe.Pointer to *T
n = walkCheckPtrAlignment(n, init, nil)