(RotateLeft(64|32|16|8) (RotateLeft(64|32|16|8) x c) d) && c.Type.Size() == 1 && d.Type.Size() == 1 => (RotateLeft(64|32|16|8) x (Add8 <c.Type> c d))
// Loading constant values from dictionaries and itabs.
-(Load <t> (OffPtr [off] (Addr {s} sb) ) _) && t.IsUintptr() && isFixedSym(s, off) => (Addr {fixedSym(b.Func, s, off)} sb)
-(Load <t> (OffPtr [off] (Convert (Addr {s} sb) _) ) _) && t.IsUintptr() && isFixedSym(s, off) => (Addr {fixedSym(b.Func, s, off)} sb)
-(Load <t> (OffPtr [off] (ITab (IMake (Addr {s} sb) _))) _) && t.IsUintptr() && isFixedSym(s, off) => (Addr {fixedSym(b.Func, s, off)} sb)
-(Load <t> (OffPtr [off] (ITab (IMake (Convert (Addr {s} sb) _) _))) _) && t.IsUintptr() && isFixedSym(s, off) => (Addr {fixedSym(b.Func, s, off)} sb)
+(Load <typ.BytePtr> (OffPtr [off] (Addr {s} sb) ) _) && isFixedSym(s, off) => (Addr {fixedSym(b.Func, s, off)} sb)
+(Load <typ.BytePtr> (OffPtr [off] (Convert (Addr {s} sb) _) ) _) && isFixedSym(s, off) => (Addr {fixedSym(b.Func, s, off)} sb)
+(Load <typ.BytePtr> (OffPtr [off] (ITab (IMake (Addr {s} sb) _))) _) && isFixedSym(s, off) => (Addr {fixedSym(b.Func, s, off)} sb)
+(Load <typ.BytePtr> (OffPtr [off] (ITab (IMake (Convert (Addr {s} sb) _) _))) _) && isFixedSym(s, off) => (Addr {fixedSym(b.Func, s, off)} sb)
+(Load <typ.Uintptr> (OffPtr [off] (Addr {s} sb) ) _) && isFixedSym(s, off) => (Addr {fixedSym(b.Func, s, off)} sb)
+(Load <typ.Uintptr> (OffPtr [off] (Convert (Addr {s} sb) _) ) _) && isFixedSym(s, off) => (Addr {fixedSym(b.Func, s, off)} sb)
+(Load <typ.Uintptr> (OffPtr [off] (ITab (IMake (Addr {s} sb) _))) _) && isFixedSym(s, off) => (Addr {fixedSym(b.Func, s, off)} sb)
+(Load <typ.Uintptr> (OffPtr [off] (ITab (IMake (Convert (Addr {s} sb) _) _))) _) && isFixedSym(s, off) => (Addr {fixedSym(b.Func, s, off)} sb)
// Loading constant values from runtime._type.hash.
(Load <t> (OffPtr [off] (Addr {sym} _) ) _) && t.IsInteger() && t.Size() == 4 && isFixed32(config, sym, off) => (Const32 [fixed32(config, sym, off)])
v_0 := v.Args[0]
b := v.Block
config := b.Func.Config
+ typ := &b.Func.Config.Types
// match: (Load <t1> p1 (Store {t2} p2 x _))
// cond: isSamePtr(p1, p2) && t1.Compare(x.Type) == types.CMPeq && t1.Size() == t2.Size()
// result: x
v.AddArg(v0)
return true
}
- // match: (Load <t> (OffPtr [off] (Addr {s} sb) ) _)
- // cond: t.IsUintptr() && isFixedSym(s, off)
+ // match: (Load <typ.BytePtr> (OffPtr [off] (Addr {s} sb) ) _)
+ // cond: isFixedSym(s, off)
// result: (Addr {fixedSym(b.Func, s, off)} sb)
for {
- t := v.Type
- if v_0.Op != OpOffPtr {
+ if v.Type != typ.BytePtr || v_0.Op != OpOffPtr {
break
}
off := auxIntToInt64(v_0.AuxInt)
}
s := auxToSym(v_0_0.Aux)
sb := v_0_0.Args[0]
- if !(t.IsUintptr() && isFixedSym(s, off)) {
+ if !(isFixedSym(s, off)) {
break
}
v.reset(OpAddr)
v.AddArg(sb)
return true
}
- // match: (Load <t> (OffPtr [off] (Convert (Addr {s} sb) _) ) _)
- // cond: t.IsUintptr() && isFixedSym(s, off)
+ // match: (Load <typ.BytePtr> (OffPtr [off] (Convert (Addr {s} sb) _) ) _)
+ // cond: isFixedSym(s, off)
// result: (Addr {fixedSym(b.Func, s, off)} sb)
for {
- t := v.Type
- if v_0.Op != OpOffPtr {
+ if v.Type != typ.BytePtr || v_0.Op != OpOffPtr {
break
}
off := auxIntToInt64(v_0.AuxInt)
}
s := auxToSym(v_0_0_0.Aux)
sb := v_0_0_0.Args[0]
- if !(t.IsUintptr() && isFixedSym(s, off)) {
+ if !(isFixedSym(s, off)) {
break
}
v.reset(OpAddr)
v.AddArg(sb)
return true
}
- // match: (Load <t> (OffPtr [off] (ITab (IMake (Addr {s} sb) _))) _)
- // cond: t.IsUintptr() && isFixedSym(s, off)
+ // match: (Load <typ.BytePtr> (OffPtr [off] (ITab (IMake (Addr {s} sb) _))) _)
+ // cond: isFixedSym(s, off)
// result: (Addr {fixedSym(b.Func, s, off)} sb)
for {
- t := v.Type
- if v_0.Op != OpOffPtr {
+ if v.Type != typ.BytePtr || v_0.Op != OpOffPtr {
break
}
off := auxIntToInt64(v_0.AuxInt)
}
s := auxToSym(v_0_0_0_0.Aux)
sb := v_0_0_0_0.Args[0]
- if !(t.IsUintptr() && isFixedSym(s, off)) {
+ if !(isFixedSym(s, off)) {
break
}
v.reset(OpAddr)
v.AddArg(sb)
return true
}
- // match: (Load <t> (OffPtr [off] (ITab (IMake (Convert (Addr {s} sb) _) _))) _)
- // cond: t.IsUintptr() && isFixedSym(s, off)
+ // match: (Load <typ.BytePtr> (OffPtr [off] (ITab (IMake (Convert (Addr {s} sb) _) _))) _)
+ // cond: isFixedSym(s, off)
// result: (Addr {fixedSym(b.Func, s, off)} sb)
for {
- t := v.Type
- if v_0.Op != OpOffPtr {
+ if v.Type != typ.BytePtr || v_0.Op != OpOffPtr {
+ break
+ }
+ off := auxIntToInt64(v_0.AuxInt)
+ v_0_0 := v_0.Args[0]
+ if v_0_0.Op != OpITab {
+ break
+ }
+ v_0_0_0 := v_0_0.Args[0]
+ if v_0_0_0.Op != OpIMake {
+ break
+ }
+ v_0_0_0_0 := v_0_0_0.Args[0]
+ if v_0_0_0_0.Op != OpConvert {
+ break
+ }
+ v_0_0_0_0_0 := v_0_0_0_0.Args[0]
+ if v_0_0_0_0_0.Op != OpAddr {
+ break
+ }
+ s := auxToSym(v_0_0_0_0_0.Aux)
+ sb := v_0_0_0_0_0.Args[0]
+ if !(isFixedSym(s, off)) {
+ break
+ }
+ v.reset(OpAddr)
+ v.Aux = symToAux(fixedSym(b.Func, s, off))
+ v.AddArg(sb)
+ return true
+ }
+ // match: (Load <typ.Uintptr> (OffPtr [off] (Addr {s} sb) ) _)
+ // cond: isFixedSym(s, off)
+ // result: (Addr {fixedSym(b.Func, s, off)} sb)
+ for {
+ if v.Type != typ.Uintptr || v_0.Op != OpOffPtr {
+ break
+ }
+ off := auxIntToInt64(v_0.AuxInt)
+ v_0_0 := v_0.Args[0]
+ if v_0_0.Op != OpAddr {
+ break
+ }
+ s := auxToSym(v_0_0.Aux)
+ sb := v_0_0.Args[0]
+ if !(isFixedSym(s, off)) {
+ break
+ }
+ v.reset(OpAddr)
+ v.Aux = symToAux(fixedSym(b.Func, s, off))
+ v.AddArg(sb)
+ return true
+ }
+ // match: (Load <typ.Uintptr> (OffPtr [off] (Convert (Addr {s} sb) _) ) _)
+ // cond: isFixedSym(s, off)
+ // result: (Addr {fixedSym(b.Func, s, off)} sb)
+ for {
+ if v.Type != typ.Uintptr || v_0.Op != OpOffPtr {
+ break
+ }
+ off := auxIntToInt64(v_0.AuxInt)
+ v_0_0 := v_0.Args[0]
+ if v_0_0.Op != OpConvert {
+ break
+ }
+ v_0_0_0 := v_0_0.Args[0]
+ if v_0_0_0.Op != OpAddr {
+ break
+ }
+ s := auxToSym(v_0_0_0.Aux)
+ sb := v_0_0_0.Args[0]
+ if !(isFixedSym(s, off)) {
+ break
+ }
+ v.reset(OpAddr)
+ v.Aux = symToAux(fixedSym(b.Func, s, off))
+ v.AddArg(sb)
+ return true
+ }
+ // match: (Load <typ.Uintptr> (OffPtr [off] (ITab (IMake (Addr {s} sb) _))) _)
+ // cond: isFixedSym(s, off)
+ // result: (Addr {fixedSym(b.Func, s, off)} sb)
+ for {
+ if v.Type != typ.Uintptr || v_0.Op != OpOffPtr {
+ break
+ }
+ off := auxIntToInt64(v_0.AuxInt)
+ v_0_0 := v_0.Args[0]
+ if v_0_0.Op != OpITab {
+ break
+ }
+ v_0_0_0 := v_0_0.Args[0]
+ if v_0_0_0.Op != OpIMake {
+ break
+ }
+ v_0_0_0_0 := v_0_0_0.Args[0]
+ if v_0_0_0_0.Op != OpAddr {
+ break
+ }
+ s := auxToSym(v_0_0_0_0.Aux)
+ sb := v_0_0_0_0.Args[0]
+ if !(isFixedSym(s, off)) {
+ break
+ }
+ v.reset(OpAddr)
+ v.Aux = symToAux(fixedSym(b.Func, s, off))
+ v.AddArg(sb)
+ return true
+ }
+ // match: (Load <typ.Uintptr> (OffPtr [off] (ITab (IMake (Convert (Addr {s} sb) _) _))) _)
+ // cond: isFixedSym(s, off)
+ // result: (Addr {fixedSym(b.Func, s, off)} sb)
+ for {
+ if v.Type != typ.Uintptr || v_0.Op != OpOffPtr {
break
}
off := auxIntToInt64(v_0.AuxInt)
}
s := auxToSym(v_0_0_0_0_0.Aux)
sb := v_0_0_0_0_0.Args[0]
- if !(t.IsUintptr() && isFixedSym(s, off)) {
+ if !(isFixedSym(s, off)) {
break
}
v.reset(OpAddr)