github.com/gagliardetto/golang-go@v0.0.0-20201020153340-53909ea70814/cmd/compile/internal/ssa/rewriteAMD64splitload.go (about)

     1  // Code generated from gen/AMD64splitload.rules; DO NOT EDIT.
     2  // generated with: cd gen; go run *.go
     3  
     4  package ssa
     5  
     6  func rewriteValueAMD64splitload(v *Value) bool {
     7  	switch v.Op {
     8  	case OpAMD64CMPBconstload:
     9  		return rewriteValueAMD64splitload_OpAMD64CMPBconstload_0(v)
    10  	case OpAMD64CMPBload:
    11  		return rewriteValueAMD64splitload_OpAMD64CMPBload_0(v)
    12  	case OpAMD64CMPLconstload:
    13  		return rewriteValueAMD64splitload_OpAMD64CMPLconstload_0(v)
    14  	case OpAMD64CMPLload:
    15  		return rewriteValueAMD64splitload_OpAMD64CMPLload_0(v)
    16  	case OpAMD64CMPQconstload:
    17  		return rewriteValueAMD64splitload_OpAMD64CMPQconstload_0(v)
    18  	case OpAMD64CMPQload:
    19  		return rewriteValueAMD64splitload_OpAMD64CMPQload_0(v)
    20  	case OpAMD64CMPWconstload:
    21  		return rewriteValueAMD64splitload_OpAMD64CMPWconstload_0(v)
    22  	case OpAMD64CMPWload:
    23  		return rewriteValueAMD64splitload_OpAMD64CMPWload_0(v)
    24  	}
    25  	return false
    26  }
    27  func rewriteValueAMD64splitload_OpAMD64CMPBconstload_0(v *Value) bool {
    28  	b := v.Block
    29  	typ := &b.Func.Config.Types
    30  	// match: (CMPBconstload {sym} [vo] ptr mem)
    31  	// result: (CMPBconst (MOVBload {sym} [offOnly(vo)] ptr mem) [valOnly(vo)])
    32  	for {
    33  		vo := v.AuxInt
    34  		sym := v.Aux
    35  		mem := v.Args[1]
    36  		ptr := v.Args[0]
    37  		v.reset(OpAMD64CMPBconst)
    38  		v.AuxInt = valOnly(vo)
    39  		v0 := b.NewValue0(v.Pos, OpAMD64MOVBload, typ.UInt8)
    40  		v0.AuxInt = offOnly(vo)
    41  		v0.Aux = sym
    42  		v0.AddArg(ptr)
    43  		v0.AddArg(mem)
    44  		v.AddArg(v0)
    45  		return true
    46  	}
    47  }
    48  func rewriteValueAMD64splitload_OpAMD64CMPBload_0(v *Value) bool {
    49  	b := v.Block
    50  	typ := &b.Func.Config.Types
    51  	// match: (CMPBload {sym} [off] ptr x mem)
    52  	// result: (CMPB (MOVBload {sym} [off] ptr mem) x)
    53  	for {
    54  		off := v.AuxInt
    55  		sym := v.Aux
    56  		mem := v.Args[2]
    57  		ptr := v.Args[0]
    58  		x := v.Args[1]
    59  		v.reset(OpAMD64CMPB)
    60  		v0 := b.NewValue0(v.Pos, OpAMD64MOVBload, typ.UInt8)
    61  		v0.AuxInt = off
    62  		v0.Aux = sym
    63  		v0.AddArg(ptr)
    64  		v0.AddArg(mem)
    65  		v.AddArg(v0)
    66  		v.AddArg(x)
    67  		return true
    68  	}
    69  }
    70  func rewriteValueAMD64splitload_OpAMD64CMPLconstload_0(v *Value) bool {
    71  	b := v.Block
    72  	typ := &b.Func.Config.Types
    73  	// match: (CMPLconstload {sym} [vo] ptr mem)
    74  	// result: (CMPLconst (MOVLload {sym} [offOnly(vo)] ptr mem) [valOnly(vo)])
    75  	for {
    76  		vo := v.AuxInt
    77  		sym := v.Aux
    78  		mem := v.Args[1]
    79  		ptr := v.Args[0]
    80  		v.reset(OpAMD64CMPLconst)
    81  		v.AuxInt = valOnly(vo)
    82  		v0 := b.NewValue0(v.Pos, OpAMD64MOVLload, typ.UInt32)
    83  		v0.AuxInt = offOnly(vo)
    84  		v0.Aux = sym
    85  		v0.AddArg(ptr)
    86  		v0.AddArg(mem)
    87  		v.AddArg(v0)
    88  		return true
    89  	}
    90  }
    91  func rewriteValueAMD64splitload_OpAMD64CMPLload_0(v *Value) bool {
    92  	b := v.Block
    93  	typ := &b.Func.Config.Types
    94  	// match: (CMPLload {sym} [off] ptr x mem)
    95  	// result: (CMPL (MOVLload {sym} [off] ptr mem) x)
    96  	for {
    97  		off := v.AuxInt
    98  		sym := v.Aux
    99  		mem := v.Args[2]
   100  		ptr := v.Args[0]
   101  		x := v.Args[1]
   102  		v.reset(OpAMD64CMPL)
   103  		v0 := b.NewValue0(v.Pos, OpAMD64MOVLload, typ.UInt32)
   104  		v0.AuxInt = off
   105  		v0.Aux = sym
   106  		v0.AddArg(ptr)
   107  		v0.AddArg(mem)
   108  		v.AddArg(v0)
   109  		v.AddArg(x)
   110  		return true
   111  	}
   112  }
   113  func rewriteValueAMD64splitload_OpAMD64CMPQconstload_0(v *Value) bool {
   114  	b := v.Block
   115  	typ := &b.Func.Config.Types
   116  	// match: (CMPQconstload {sym} [vo] ptr mem)
   117  	// result: (CMPQconst (MOVQload {sym} [offOnly(vo)] ptr mem) [valOnly(vo)])
   118  	for {
   119  		vo := v.AuxInt
   120  		sym := v.Aux
   121  		mem := v.Args[1]
   122  		ptr := v.Args[0]
   123  		v.reset(OpAMD64CMPQconst)
   124  		v.AuxInt = valOnly(vo)
   125  		v0 := b.NewValue0(v.Pos, OpAMD64MOVQload, typ.UInt64)
   126  		v0.AuxInt = offOnly(vo)
   127  		v0.Aux = sym
   128  		v0.AddArg(ptr)
   129  		v0.AddArg(mem)
   130  		v.AddArg(v0)
   131  		return true
   132  	}
   133  }
   134  func rewriteValueAMD64splitload_OpAMD64CMPQload_0(v *Value) bool {
   135  	b := v.Block
   136  	typ := &b.Func.Config.Types
   137  	// match: (CMPQload {sym} [off] ptr x mem)
   138  	// result: (CMPQ (MOVQload {sym} [off] ptr mem) x)
   139  	for {
   140  		off := v.AuxInt
   141  		sym := v.Aux
   142  		mem := v.Args[2]
   143  		ptr := v.Args[0]
   144  		x := v.Args[1]
   145  		v.reset(OpAMD64CMPQ)
   146  		v0 := b.NewValue0(v.Pos, OpAMD64MOVQload, typ.UInt64)
   147  		v0.AuxInt = off
   148  		v0.Aux = sym
   149  		v0.AddArg(ptr)
   150  		v0.AddArg(mem)
   151  		v.AddArg(v0)
   152  		v.AddArg(x)
   153  		return true
   154  	}
   155  }
   156  func rewriteValueAMD64splitload_OpAMD64CMPWconstload_0(v *Value) bool {
   157  	b := v.Block
   158  	typ := &b.Func.Config.Types
   159  	// match: (CMPWconstload {sym} [vo] ptr mem)
   160  	// result: (CMPWconst (MOVWload {sym} [offOnly(vo)] ptr mem) [valOnly(vo)])
   161  	for {
   162  		vo := v.AuxInt
   163  		sym := v.Aux
   164  		mem := v.Args[1]
   165  		ptr := v.Args[0]
   166  		v.reset(OpAMD64CMPWconst)
   167  		v.AuxInt = valOnly(vo)
   168  		v0 := b.NewValue0(v.Pos, OpAMD64MOVWload, typ.UInt16)
   169  		v0.AuxInt = offOnly(vo)
   170  		v0.Aux = sym
   171  		v0.AddArg(ptr)
   172  		v0.AddArg(mem)
   173  		v.AddArg(v0)
   174  		return true
   175  	}
   176  }
   177  func rewriteValueAMD64splitload_OpAMD64CMPWload_0(v *Value) bool {
   178  	b := v.Block
   179  	typ := &b.Func.Config.Types
   180  	// match: (CMPWload {sym} [off] ptr x mem)
   181  	// result: (CMPW (MOVWload {sym} [off] ptr mem) x)
   182  	for {
   183  		off := v.AuxInt
   184  		sym := v.Aux
   185  		mem := v.Args[2]
   186  		ptr := v.Args[0]
   187  		x := v.Args[1]
   188  		v.reset(OpAMD64CMPW)
   189  		v0 := b.NewValue0(v.Pos, OpAMD64MOVWload, typ.UInt16)
   190  		v0.AuxInt = off
   191  		v0.Aux = sym
   192  		v0.AddArg(ptr)
   193  		v0.AddArg(mem)
   194  		v.AddArg(v0)
   195  		v.AddArg(x)
   196  		return true
   197  	}
   198  }
   199  func rewriteBlockAMD64splitload(b *Block) bool {
   200  	switch b.Kind {
   201  	}
   202  	return false
   203  }