github.com/bir3/gocompiler@v0.9.2202/src/cmd/compile/internal/ssa/rewriteAMD64latelower.go (about)

     1  // Code generated from _gen/AMD64latelower.rules using 'go generate'; DO NOT EDIT.
     2  
     3  package ssa
     4  
     5  import "github.com/bir3/gocompiler/src/internal/buildcfg"
     6  
     7  func rewriteValueAMD64latelower(v *Value) bool {
     8  	switch v.Op {
     9  	case OpAMD64SARL:
    10  		return rewriteValueAMD64latelower_OpAMD64SARL(v)
    11  	case OpAMD64SARQ:
    12  		return rewriteValueAMD64latelower_OpAMD64SARQ(v)
    13  	case OpAMD64SHLL:
    14  		return rewriteValueAMD64latelower_OpAMD64SHLL(v)
    15  	case OpAMD64SHLQ:
    16  		return rewriteValueAMD64latelower_OpAMD64SHLQ(v)
    17  	case OpAMD64SHRL:
    18  		return rewriteValueAMD64latelower_OpAMD64SHRL(v)
    19  	case OpAMD64SHRQ:
    20  		return rewriteValueAMD64latelower_OpAMD64SHRQ(v)
    21  	}
    22  	return false
    23  }
    24  func rewriteValueAMD64latelower_OpAMD64SARL(v *Value) bool {
    25  	v_1 := v.Args[1]
    26  	v_0 := v.Args[0]
    27  	// match: (SARL x y)
    28  	// cond: buildcfg.GOAMD64 >= 3
    29  	// result: (SARXL x y)
    30  	for {
    31  		x := v_0
    32  		y := v_1
    33  		if !(buildcfg.GOAMD64 >= 3) {
    34  			break
    35  		}
    36  		v.reset(OpAMD64SARXL)
    37  		v.AddArg2(x, y)
    38  		return true
    39  	}
    40  	return false
    41  }
    42  func rewriteValueAMD64latelower_OpAMD64SARQ(v *Value) bool {
    43  	v_1 := v.Args[1]
    44  	v_0 := v.Args[0]
    45  	// match: (SARQ x y)
    46  	// cond: buildcfg.GOAMD64 >= 3
    47  	// result: (SARXQ x y)
    48  	for {
    49  		x := v_0
    50  		y := v_1
    51  		if !(buildcfg.GOAMD64 >= 3) {
    52  			break
    53  		}
    54  		v.reset(OpAMD64SARXQ)
    55  		v.AddArg2(x, y)
    56  		return true
    57  	}
    58  	return false
    59  }
    60  func rewriteValueAMD64latelower_OpAMD64SHLL(v *Value) bool {
    61  	v_1 := v.Args[1]
    62  	v_0 := v.Args[0]
    63  	// match: (SHLL x y)
    64  	// cond: buildcfg.GOAMD64 >= 3
    65  	// result: (SHLXL x y)
    66  	for {
    67  		x := v_0
    68  		y := v_1
    69  		if !(buildcfg.GOAMD64 >= 3) {
    70  			break
    71  		}
    72  		v.reset(OpAMD64SHLXL)
    73  		v.AddArg2(x, y)
    74  		return true
    75  	}
    76  	return false
    77  }
    78  func rewriteValueAMD64latelower_OpAMD64SHLQ(v *Value) bool {
    79  	v_1 := v.Args[1]
    80  	v_0 := v.Args[0]
    81  	// match: (SHLQ x y)
    82  	// cond: buildcfg.GOAMD64 >= 3
    83  	// result: (SHLXQ x y)
    84  	for {
    85  		x := v_0
    86  		y := v_1
    87  		if !(buildcfg.GOAMD64 >= 3) {
    88  			break
    89  		}
    90  		v.reset(OpAMD64SHLXQ)
    91  		v.AddArg2(x, y)
    92  		return true
    93  	}
    94  	return false
    95  }
    96  func rewriteValueAMD64latelower_OpAMD64SHRL(v *Value) bool {
    97  	v_1 := v.Args[1]
    98  	v_0 := v.Args[0]
    99  	// match: (SHRL x y)
   100  	// cond: buildcfg.GOAMD64 >= 3
   101  	// result: (SHRXL x y)
   102  	for {
   103  		x := v_0
   104  		y := v_1
   105  		if !(buildcfg.GOAMD64 >= 3) {
   106  			break
   107  		}
   108  		v.reset(OpAMD64SHRXL)
   109  		v.AddArg2(x, y)
   110  		return true
   111  	}
   112  	return false
   113  }
   114  func rewriteValueAMD64latelower_OpAMD64SHRQ(v *Value) bool {
   115  	v_1 := v.Args[1]
   116  	v_0 := v.Args[0]
   117  	// match: (SHRQ x y)
   118  	// cond: buildcfg.GOAMD64 >= 3
   119  	// result: (SHRXQ x y)
   120  	for {
   121  		x := v_0
   122  		y := v_1
   123  		if !(buildcfg.GOAMD64 >= 3) {
   124  			break
   125  		}
   126  		v.reset(OpAMD64SHRXQ)
   127  		v.AddArg2(x, y)
   128  		return true
   129  	}
   130  	return false
   131  }
   132  func rewriteBlockAMD64latelower(b *Block) bool {
   133  	return false
   134  }