| // Code generated from gen/S390X.rules; DO NOT EDIT. |
| // generated with: cd gen; go run *.go |
| |
| package ssa |
| |
| import "fmt" |
| import "math" |
| import "cmd/internal/obj" |
| import "cmd/internal/objabi" |
| import "cmd/compile/internal/types" |
| |
| var _ = fmt.Println // in case not otherwise used |
| var _ = math.MinInt8 // in case not otherwise used |
| var _ = obj.ANOP // in case not otherwise used |
| var _ = objabi.GOROOT // in case not otherwise used |
| var _ = types.TypeMem // in case not otherwise used |
| |
| func rewriteValueS390X(v *Value) bool { |
| switch v.Op { |
| case OpAdd16: |
| return rewriteValueS390X_OpAdd16_0(v) |
| case OpAdd32: |
| return rewriteValueS390X_OpAdd32_0(v) |
| case OpAdd32F: |
| return rewriteValueS390X_OpAdd32F_0(v) |
| case OpAdd64: |
| return rewriteValueS390X_OpAdd64_0(v) |
| case OpAdd64F: |
| return rewriteValueS390X_OpAdd64F_0(v) |
| case OpAdd8: |
| return rewriteValueS390X_OpAdd8_0(v) |
| case OpAddPtr: |
| return rewriteValueS390X_OpAddPtr_0(v) |
| case OpAddr: |
| return rewriteValueS390X_OpAddr_0(v) |
| case OpAnd16: |
| return rewriteValueS390X_OpAnd16_0(v) |
| case OpAnd32: |
| return rewriteValueS390X_OpAnd32_0(v) |
| case OpAnd64: |
| return rewriteValueS390X_OpAnd64_0(v) |
| case OpAnd8: |
| return rewriteValueS390X_OpAnd8_0(v) |
| case OpAndB: |
| return rewriteValueS390X_OpAndB_0(v) |
| case OpAtomicAdd32: |
| return rewriteValueS390X_OpAtomicAdd32_0(v) |
| case OpAtomicAdd64: |
| return rewriteValueS390X_OpAtomicAdd64_0(v) |
| case OpAtomicCompareAndSwap32: |
| return rewriteValueS390X_OpAtomicCompareAndSwap32_0(v) |
| case OpAtomicCompareAndSwap64: |
| return rewriteValueS390X_OpAtomicCompareAndSwap64_0(v) |
| case OpAtomicExchange32: |
| return rewriteValueS390X_OpAtomicExchange32_0(v) |
| case OpAtomicExchange64: |
| return rewriteValueS390X_OpAtomicExchange64_0(v) |
| case OpAtomicLoad32: |
| return rewriteValueS390X_OpAtomicLoad32_0(v) |
| case OpAtomicLoad64: |
| return rewriteValueS390X_OpAtomicLoad64_0(v) |
| case OpAtomicLoadPtr: |
| return rewriteValueS390X_OpAtomicLoadPtr_0(v) |
| case OpAtomicStore32: |
| return rewriteValueS390X_OpAtomicStore32_0(v) |
| case OpAtomicStore64: |
| return rewriteValueS390X_OpAtomicStore64_0(v) |
| case OpAtomicStorePtrNoWB: |
| return rewriteValueS390X_OpAtomicStorePtrNoWB_0(v) |
| case OpAvg64u: |
| return rewriteValueS390X_OpAvg64u_0(v) |
| case OpBitLen64: |
| return rewriteValueS390X_OpBitLen64_0(v) |
| case OpBswap32: |
| return rewriteValueS390X_OpBswap32_0(v) |
| case OpBswap64: |
| return rewriteValueS390X_OpBswap64_0(v) |
| case OpCeil: |
| return rewriteValueS390X_OpCeil_0(v) |
| case OpClosureCall: |
| return rewriteValueS390X_OpClosureCall_0(v) |
| case OpCom16: |
| return rewriteValueS390X_OpCom16_0(v) |
| case OpCom32: |
| return rewriteValueS390X_OpCom32_0(v) |
| case OpCom64: |
| return rewriteValueS390X_OpCom64_0(v) |
| case OpCom8: |
| return rewriteValueS390X_OpCom8_0(v) |
| case OpConst16: |
| return rewriteValueS390X_OpConst16_0(v) |
| case OpConst32: |
| return rewriteValueS390X_OpConst32_0(v) |
| case OpConst32F: |
| return rewriteValueS390X_OpConst32F_0(v) |
| case OpConst64: |
| return rewriteValueS390X_OpConst64_0(v) |
| case OpConst64F: |
| return rewriteValueS390X_OpConst64F_0(v) |
| case OpConst8: |
| return rewriteValueS390X_OpConst8_0(v) |
| case OpConstBool: |
| return rewriteValueS390X_OpConstBool_0(v) |
| case OpConstNil: |
| return rewriteValueS390X_OpConstNil_0(v) |
| case OpCtz32: |
| return rewriteValueS390X_OpCtz32_0(v) |
| case OpCtz32NonZero: |
| return rewriteValueS390X_OpCtz32NonZero_0(v) |
| case OpCtz64: |
| return rewriteValueS390X_OpCtz64_0(v) |
| case OpCtz64NonZero: |
| return rewriteValueS390X_OpCtz64NonZero_0(v) |
| case OpCvt32Fto32: |
| return rewriteValueS390X_OpCvt32Fto32_0(v) |
| case OpCvt32Fto64: |
| return rewriteValueS390X_OpCvt32Fto64_0(v) |
| case OpCvt32Fto64F: |
| return rewriteValueS390X_OpCvt32Fto64F_0(v) |
| case OpCvt32to32F: |
| return rewriteValueS390X_OpCvt32to32F_0(v) |
| case OpCvt32to64F: |
| return rewriteValueS390X_OpCvt32to64F_0(v) |
| case OpCvt64Fto32: |
| return rewriteValueS390X_OpCvt64Fto32_0(v) |
| case OpCvt64Fto32F: |
| return rewriteValueS390X_OpCvt64Fto32F_0(v) |
| case OpCvt64Fto64: |
| return rewriteValueS390X_OpCvt64Fto64_0(v) |
| case OpCvt64to32F: |
| return rewriteValueS390X_OpCvt64to32F_0(v) |
| case OpCvt64to64F: |
| return rewriteValueS390X_OpCvt64to64F_0(v) |
| case OpDiv16: |
| return rewriteValueS390X_OpDiv16_0(v) |
| case OpDiv16u: |
| return rewriteValueS390X_OpDiv16u_0(v) |
| case OpDiv32: |
| return rewriteValueS390X_OpDiv32_0(v) |
| case OpDiv32F: |
| return rewriteValueS390X_OpDiv32F_0(v) |
| case OpDiv32u: |
| return rewriteValueS390X_OpDiv32u_0(v) |
| case OpDiv64: |
| return rewriteValueS390X_OpDiv64_0(v) |
| case OpDiv64F: |
| return rewriteValueS390X_OpDiv64F_0(v) |
| case OpDiv64u: |
| return rewriteValueS390X_OpDiv64u_0(v) |
| case OpDiv8: |
| return rewriteValueS390X_OpDiv8_0(v) |
| case OpDiv8u: |
| return rewriteValueS390X_OpDiv8u_0(v) |
| case OpEq16: |
| return rewriteValueS390X_OpEq16_0(v) |
| case OpEq32: |
| return rewriteValueS390X_OpEq32_0(v) |
| case OpEq32F: |
| return rewriteValueS390X_OpEq32F_0(v) |
| case OpEq64: |
| return rewriteValueS390X_OpEq64_0(v) |
| case OpEq64F: |
| return rewriteValueS390X_OpEq64F_0(v) |
| case OpEq8: |
| return rewriteValueS390X_OpEq8_0(v) |
| case OpEqB: |
| return rewriteValueS390X_OpEqB_0(v) |
| case OpEqPtr: |
| return rewriteValueS390X_OpEqPtr_0(v) |
| case OpFloor: |
| return rewriteValueS390X_OpFloor_0(v) |
| case OpGeq16: |
| return rewriteValueS390X_OpGeq16_0(v) |
| case OpGeq16U: |
| return rewriteValueS390X_OpGeq16U_0(v) |
| case OpGeq32: |
| return rewriteValueS390X_OpGeq32_0(v) |
| case OpGeq32F: |
| return rewriteValueS390X_OpGeq32F_0(v) |
| case OpGeq32U: |
| return rewriteValueS390X_OpGeq32U_0(v) |
| case OpGeq64: |
| return rewriteValueS390X_OpGeq64_0(v) |
| case OpGeq64F: |
| return rewriteValueS390X_OpGeq64F_0(v) |
| case OpGeq64U: |
| return rewriteValueS390X_OpGeq64U_0(v) |
| case OpGeq8: |
| return rewriteValueS390X_OpGeq8_0(v) |
| case OpGeq8U: |
| return rewriteValueS390X_OpGeq8U_0(v) |
| case OpGetCallerPC: |
| return rewriteValueS390X_OpGetCallerPC_0(v) |
| case OpGetCallerSP: |
| return rewriteValueS390X_OpGetCallerSP_0(v) |
| case OpGetClosurePtr: |
| return rewriteValueS390X_OpGetClosurePtr_0(v) |
| case OpGetG: |
| return rewriteValueS390X_OpGetG_0(v) |
| case OpGreater16: |
| return rewriteValueS390X_OpGreater16_0(v) |
| case OpGreater16U: |
| return rewriteValueS390X_OpGreater16U_0(v) |
| case OpGreater32: |
| return rewriteValueS390X_OpGreater32_0(v) |
| case OpGreater32F: |
| return rewriteValueS390X_OpGreater32F_0(v) |
| case OpGreater32U: |
| return rewriteValueS390X_OpGreater32U_0(v) |
| case OpGreater64: |
| return rewriteValueS390X_OpGreater64_0(v) |
| case OpGreater64F: |
| return rewriteValueS390X_OpGreater64F_0(v) |
| case OpGreater64U: |
| return rewriteValueS390X_OpGreater64U_0(v) |
| case OpGreater8: |
| return rewriteValueS390X_OpGreater8_0(v) |
| case OpGreater8U: |
| return rewriteValueS390X_OpGreater8U_0(v) |
| case OpHmul32: |
| return rewriteValueS390X_OpHmul32_0(v) |
| case OpHmul32u: |
| return rewriteValueS390X_OpHmul32u_0(v) |
| case OpHmul64: |
| return rewriteValueS390X_OpHmul64_0(v) |
| case OpHmul64u: |
| return rewriteValueS390X_OpHmul64u_0(v) |
| case OpITab: |
| return rewriteValueS390X_OpITab_0(v) |
| case OpInterCall: |
| return rewriteValueS390X_OpInterCall_0(v) |
| case OpIsInBounds: |
| return rewriteValueS390X_OpIsInBounds_0(v) |
| case OpIsNonNil: |
| return rewriteValueS390X_OpIsNonNil_0(v) |
| case OpIsSliceInBounds: |
| return rewriteValueS390X_OpIsSliceInBounds_0(v) |
| case OpLeq16: |
| return rewriteValueS390X_OpLeq16_0(v) |
| case OpLeq16U: |
| return rewriteValueS390X_OpLeq16U_0(v) |
| case OpLeq32: |
| return rewriteValueS390X_OpLeq32_0(v) |
| case OpLeq32F: |
| return rewriteValueS390X_OpLeq32F_0(v) |
| case OpLeq32U: |
| return rewriteValueS390X_OpLeq32U_0(v) |
| case OpLeq64: |
| return rewriteValueS390X_OpLeq64_0(v) |
| case OpLeq64F: |
| return rewriteValueS390X_OpLeq64F_0(v) |
| case OpLeq64U: |
| return rewriteValueS390X_OpLeq64U_0(v) |
| case OpLeq8: |
| return rewriteValueS390X_OpLeq8_0(v) |
| case OpLeq8U: |
| return rewriteValueS390X_OpLeq8U_0(v) |
| case OpLess16: |
| return rewriteValueS390X_OpLess16_0(v) |
| case OpLess16U: |
| return rewriteValueS390X_OpLess16U_0(v) |
| case OpLess32: |
| return rewriteValueS390X_OpLess32_0(v) |
| case OpLess32F: |
| return rewriteValueS390X_OpLess32F_0(v) |
| case OpLess32U: |
| return rewriteValueS390X_OpLess32U_0(v) |
| case OpLess64: |
| return rewriteValueS390X_OpLess64_0(v) |
| case OpLess64F: |
| return rewriteValueS390X_OpLess64F_0(v) |
| case OpLess64U: |
| return rewriteValueS390X_OpLess64U_0(v) |
| case OpLess8: |
| return rewriteValueS390X_OpLess8_0(v) |
| case OpLess8U: |
| return rewriteValueS390X_OpLess8U_0(v) |
| case OpLoad: |
| return rewriteValueS390X_OpLoad_0(v) |
| case OpLocalAddr: |
| return rewriteValueS390X_OpLocalAddr_0(v) |
| case OpLsh16x16: |
| return rewriteValueS390X_OpLsh16x16_0(v) |
| case OpLsh16x32: |
| return rewriteValueS390X_OpLsh16x32_0(v) |
| case OpLsh16x64: |
| return rewriteValueS390X_OpLsh16x64_0(v) |
| case OpLsh16x8: |
| return rewriteValueS390X_OpLsh16x8_0(v) |
| case OpLsh32x16: |
| return rewriteValueS390X_OpLsh32x16_0(v) |
| case OpLsh32x32: |
| return rewriteValueS390X_OpLsh32x32_0(v) |
| case OpLsh32x64: |
| return rewriteValueS390X_OpLsh32x64_0(v) |
| case OpLsh32x8: |
| return rewriteValueS390X_OpLsh32x8_0(v) |
| case OpLsh64x16: |
| return rewriteValueS390X_OpLsh64x16_0(v) |
| case OpLsh64x32: |
| return rewriteValueS390X_OpLsh64x32_0(v) |
| case OpLsh64x64: |
| return rewriteValueS390X_OpLsh64x64_0(v) |
| case OpLsh64x8: |
| return rewriteValueS390X_OpLsh64x8_0(v) |
| case OpLsh8x16: |
| return rewriteValueS390X_OpLsh8x16_0(v) |
| case OpLsh8x32: |
| return rewriteValueS390X_OpLsh8x32_0(v) |
| case OpLsh8x64: |
| return rewriteValueS390X_OpLsh8x64_0(v) |
| case OpLsh8x8: |
| return rewriteValueS390X_OpLsh8x8_0(v) |
| case OpMod16: |
| return rewriteValueS390X_OpMod16_0(v) |
| case OpMod16u: |
| return rewriteValueS390X_OpMod16u_0(v) |
| case OpMod32: |
| return rewriteValueS390X_OpMod32_0(v) |
| case OpMod32u: |
| return rewriteValueS390X_OpMod32u_0(v) |
| case OpMod64: |
| return rewriteValueS390X_OpMod64_0(v) |
| case OpMod64u: |
| return rewriteValueS390X_OpMod64u_0(v) |
| case OpMod8: |
| return rewriteValueS390X_OpMod8_0(v) |
| case OpMod8u: |
| return rewriteValueS390X_OpMod8u_0(v) |
| case OpMove: |
| return rewriteValueS390X_OpMove_0(v) || rewriteValueS390X_OpMove_10(v) |
| case OpMul16: |
| return rewriteValueS390X_OpMul16_0(v) |
| case OpMul32: |
| return rewriteValueS390X_OpMul32_0(v) |
| case OpMul32F: |
| return rewriteValueS390X_OpMul32F_0(v) |
| case OpMul64: |
| return rewriteValueS390X_OpMul64_0(v) |
| case OpMul64F: |
| return rewriteValueS390X_OpMul64F_0(v) |
| case OpMul8: |
| return rewriteValueS390X_OpMul8_0(v) |
| case OpNeg16: |
| return rewriteValueS390X_OpNeg16_0(v) |
| case OpNeg32: |
| return rewriteValueS390X_OpNeg32_0(v) |
| case OpNeg32F: |
| return rewriteValueS390X_OpNeg32F_0(v) |
| case OpNeg64: |
| return rewriteValueS390X_OpNeg64_0(v) |
| case OpNeg64F: |
| return rewriteValueS390X_OpNeg64F_0(v) |
| case OpNeg8: |
| return rewriteValueS390X_OpNeg8_0(v) |
| case OpNeq16: |
| return rewriteValueS390X_OpNeq16_0(v) |
| case OpNeq32: |
| return rewriteValueS390X_OpNeq32_0(v) |
| case OpNeq32F: |
| return rewriteValueS390X_OpNeq32F_0(v) |
| case OpNeq64: |
| return rewriteValueS390X_OpNeq64_0(v) |
| case OpNeq64F: |
| return rewriteValueS390X_OpNeq64F_0(v) |
| case OpNeq8: |
| return rewriteValueS390X_OpNeq8_0(v) |
| case OpNeqB: |
| return rewriteValueS390X_OpNeqB_0(v) |
| case OpNeqPtr: |
| return rewriteValueS390X_OpNeqPtr_0(v) |
| case OpNilCheck: |
| return rewriteValueS390X_OpNilCheck_0(v) |
| case OpNot: |
| return rewriteValueS390X_OpNot_0(v) |
| case OpOffPtr: |
| return rewriteValueS390X_OpOffPtr_0(v) |
| case OpOr16: |
| return rewriteValueS390X_OpOr16_0(v) |
| case OpOr32: |
| return rewriteValueS390X_OpOr32_0(v) |
| case OpOr64: |
| return rewriteValueS390X_OpOr64_0(v) |
| case OpOr8: |
| return rewriteValueS390X_OpOr8_0(v) |
| case OpOrB: |
| return rewriteValueS390X_OpOrB_0(v) |
| case OpPopCount16: |
| return rewriteValueS390X_OpPopCount16_0(v) |
| case OpPopCount32: |
| return rewriteValueS390X_OpPopCount32_0(v) |
| case OpPopCount64: |
| return rewriteValueS390X_OpPopCount64_0(v) |
| case OpPopCount8: |
| return rewriteValueS390X_OpPopCount8_0(v) |
| case OpRotateLeft32: |
| return rewriteValueS390X_OpRotateLeft32_0(v) |
| case OpRotateLeft64: |
| return rewriteValueS390X_OpRotateLeft64_0(v) |
| case OpRound: |
| return rewriteValueS390X_OpRound_0(v) |
| case OpRound32F: |
| return rewriteValueS390X_OpRound32F_0(v) |
| case OpRound64F: |
| return rewriteValueS390X_OpRound64F_0(v) |
| case OpRoundToEven: |
| return rewriteValueS390X_OpRoundToEven_0(v) |
| case OpRsh16Ux16: |
| return rewriteValueS390X_OpRsh16Ux16_0(v) |
| case OpRsh16Ux32: |
| return rewriteValueS390X_OpRsh16Ux32_0(v) |
| case OpRsh16Ux64: |
| return rewriteValueS390X_OpRsh16Ux64_0(v) |
| case OpRsh16Ux8: |
| return rewriteValueS390X_OpRsh16Ux8_0(v) |
| case OpRsh16x16: |
| return rewriteValueS390X_OpRsh16x16_0(v) |
| case OpRsh16x32: |
| return rewriteValueS390X_OpRsh16x32_0(v) |
| case OpRsh16x64: |
| return rewriteValueS390X_OpRsh16x64_0(v) |
| case OpRsh16x8: |
| return rewriteValueS390X_OpRsh16x8_0(v) |
| case OpRsh32Ux16: |
| return rewriteValueS390X_OpRsh32Ux16_0(v) |
| case OpRsh32Ux32: |
| return rewriteValueS390X_OpRsh32Ux32_0(v) |
| case OpRsh32Ux64: |
| return rewriteValueS390X_OpRsh32Ux64_0(v) |
| case OpRsh32Ux8: |
| return rewriteValueS390X_OpRsh32Ux8_0(v) |
| case OpRsh32x16: |
| return rewriteValueS390X_OpRsh32x16_0(v) |
| case OpRsh32x32: |
| return rewriteValueS390X_OpRsh32x32_0(v) |
| case OpRsh32x64: |
| return rewriteValueS390X_OpRsh32x64_0(v) |
| case OpRsh32x8: |
| return rewriteValueS390X_OpRsh32x8_0(v) |
| case OpRsh64Ux16: |
| return rewriteValueS390X_OpRsh64Ux16_0(v) |
| case OpRsh64Ux32: |
| return rewriteValueS390X_OpRsh64Ux32_0(v) |
| case OpRsh64Ux64: |
| return rewriteValueS390X_OpRsh64Ux64_0(v) |
| case OpRsh64Ux8: |
| return rewriteValueS390X_OpRsh64Ux8_0(v) |
| case OpRsh64x16: |
| return rewriteValueS390X_OpRsh64x16_0(v) |
| case OpRsh64x32: |
| return rewriteValueS390X_OpRsh64x32_0(v) |
| case OpRsh64x64: |
| return rewriteValueS390X_OpRsh64x64_0(v) |
| case OpRsh64x8: |
| return rewriteValueS390X_OpRsh64x8_0(v) |
| case OpRsh8Ux16: |
| return rewriteValueS390X_OpRsh8Ux16_0(v) |
| case OpRsh8Ux32: |
| return rewriteValueS390X_OpRsh8Ux32_0(v) |
| case OpRsh8Ux64: |
| return rewriteValueS390X_OpRsh8Ux64_0(v) |
| case OpRsh8Ux8: |
| return rewriteValueS390X_OpRsh8Ux8_0(v) |
| case OpRsh8x16: |
| return rewriteValueS390X_OpRsh8x16_0(v) |
| case OpRsh8x32: |
| return rewriteValueS390X_OpRsh8x32_0(v) |
| case OpRsh8x64: |
| return rewriteValueS390X_OpRsh8x64_0(v) |
| case OpRsh8x8: |
| return rewriteValueS390X_OpRsh8x8_0(v) |
| case OpS390XADD: |
| return rewriteValueS390X_OpS390XADD_0(v) || rewriteValueS390X_OpS390XADD_10(v) |
| case OpS390XADDW: |
| return rewriteValueS390X_OpS390XADDW_0(v) || rewriteValueS390X_OpS390XADDW_10(v) |
| case OpS390XADDWconst: |
| return rewriteValueS390X_OpS390XADDWconst_0(v) |
| case OpS390XADDWload: |
| return rewriteValueS390X_OpS390XADDWload_0(v) |
| case OpS390XADDconst: |
| return rewriteValueS390X_OpS390XADDconst_0(v) |
| case OpS390XADDload: |
| return rewriteValueS390X_OpS390XADDload_0(v) |
| case OpS390XAND: |
| return rewriteValueS390X_OpS390XAND_0(v) || rewriteValueS390X_OpS390XAND_10(v) |
| case OpS390XANDW: |
| return rewriteValueS390X_OpS390XANDW_0(v) || rewriteValueS390X_OpS390XANDW_10(v) |
| case OpS390XANDWconst: |
| return rewriteValueS390X_OpS390XANDWconst_0(v) |
| case OpS390XANDWload: |
| return rewriteValueS390X_OpS390XANDWload_0(v) |
| case OpS390XANDconst: |
| return rewriteValueS390X_OpS390XANDconst_0(v) |
| case OpS390XANDload: |
| return rewriteValueS390X_OpS390XANDload_0(v) |
| case OpS390XCMP: |
| return rewriteValueS390X_OpS390XCMP_0(v) |
| case OpS390XCMPU: |
| return rewriteValueS390X_OpS390XCMPU_0(v) |
| case OpS390XCMPUconst: |
| return rewriteValueS390X_OpS390XCMPUconst_0(v) || rewriteValueS390X_OpS390XCMPUconst_10(v) |
| case OpS390XCMPW: |
| return rewriteValueS390X_OpS390XCMPW_0(v) |
| case OpS390XCMPWU: |
| return rewriteValueS390X_OpS390XCMPWU_0(v) |
| case OpS390XCMPWUconst: |
| return rewriteValueS390X_OpS390XCMPWUconst_0(v) |
| case OpS390XCMPWconst: |
| return rewriteValueS390X_OpS390XCMPWconst_0(v) |
| case OpS390XCMPconst: |
| return rewriteValueS390X_OpS390XCMPconst_0(v) || rewriteValueS390X_OpS390XCMPconst_10(v) |
| case OpS390XCPSDR: |
| return rewriteValueS390X_OpS390XCPSDR_0(v) |
| case OpS390XFADD: |
| return rewriteValueS390X_OpS390XFADD_0(v) |
| case OpS390XFADDS: |
| return rewriteValueS390X_OpS390XFADDS_0(v) |
| case OpS390XFMOVDload: |
| return rewriteValueS390X_OpS390XFMOVDload_0(v) |
| case OpS390XFMOVDloadidx: |
| return rewriteValueS390X_OpS390XFMOVDloadidx_0(v) |
| case OpS390XFMOVDstore: |
| return rewriteValueS390X_OpS390XFMOVDstore_0(v) |
| case OpS390XFMOVDstoreidx: |
| return rewriteValueS390X_OpS390XFMOVDstoreidx_0(v) |
| case OpS390XFMOVSload: |
| return rewriteValueS390X_OpS390XFMOVSload_0(v) |
| case OpS390XFMOVSloadidx: |
| return rewriteValueS390X_OpS390XFMOVSloadidx_0(v) |
| case OpS390XFMOVSstore: |
| return rewriteValueS390X_OpS390XFMOVSstore_0(v) |
| case OpS390XFMOVSstoreidx: |
| return rewriteValueS390X_OpS390XFMOVSstoreidx_0(v) |
| case OpS390XFNEG: |
| return rewriteValueS390X_OpS390XFNEG_0(v) |
| case OpS390XFNEGS: |
| return rewriteValueS390X_OpS390XFNEGS_0(v) |
| case OpS390XFSUB: |
| return rewriteValueS390X_OpS390XFSUB_0(v) |
| case OpS390XFSUBS: |
| return rewriteValueS390X_OpS390XFSUBS_0(v) |
| case OpS390XLDGR: |
| return rewriteValueS390X_OpS390XLDGR_0(v) |
| case OpS390XLEDBR: |
| return rewriteValueS390X_OpS390XLEDBR_0(v) |
| case OpS390XLGDR: |
| return rewriteValueS390X_OpS390XLGDR_0(v) |
| case OpS390XLoweredRound32F: |
| return rewriteValueS390X_OpS390XLoweredRound32F_0(v) |
| case OpS390XLoweredRound64F: |
| return rewriteValueS390X_OpS390XLoweredRound64F_0(v) |
| case OpS390XMOVBZload: |
| return rewriteValueS390X_OpS390XMOVBZload_0(v) |
| case OpS390XMOVBZloadidx: |
| return rewriteValueS390X_OpS390XMOVBZloadidx_0(v) |
| case OpS390XMOVBZreg: |
| return rewriteValueS390X_OpS390XMOVBZreg_0(v) || rewriteValueS390X_OpS390XMOVBZreg_10(v) |
| case OpS390XMOVBload: |
| return rewriteValueS390X_OpS390XMOVBload_0(v) |
| case OpS390XMOVBloadidx: |
| return rewriteValueS390X_OpS390XMOVBloadidx_0(v) |
| case OpS390XMOVBreg: |
| return rewriteValueS390X_OpS390XMOVBreg_0(v) |
| case OpS390XMOVBstore: |
| return rewriteValueS390X_OpS390XMOVBstore_0(v) || rewriteValueS390X_OpS390XMOVBstore_10(v) |
| case OpS390XMOVBstoreconst: |
| return rewriteValueS390X_OpS390XMOVBstoreconst_0(v) |
| case OpS390XMOVBstoreidx: |
| return rewriteValueS390X_OpS390XMOVBstoreidx_0(v) || rewriteValueS390X_OpS390XMOVBstoreidx_10(v) || rewriteValueS390X_OpS390XMOVBstoreidx_20(v) || rewriteValueS390X_OpS390XMOVBstoreidx_30(v) |
| case OpS390XMOVDEQ: |
| return rewriteValueS390X_OpS390XMOVDEQ_0(v) |
| case OpS390XMOVDGE: |
| return rewriteValueS390X_OpS390XMOVDGE_0(v) |
| case OpS390XMOVDGT: |
| return rewriteValueS390X_OpS390XMOVDGT_0(v) |
| case OpS390XMOVDLE: |
| return rewriteValueS390X_OpS390XMOVDLE_0(v) |
| case OpS390XMOVDLT: |
| return rewriteValueS390X_OpS390XMOVDLT_0(v) |
| case OpS390XMOVDNE: |
| return rewriteValueS390X_OpS390XMOVDNE_0(v) |
| case OpS390XMOVDaddridx: |
| return rewriteValueS390X_OpS390XMOVDaddridx_0(v) |
| case OpS390XMOVDload: |
| return rewriteValueS390X_OpS390XMOVDload_0(v) |
| case OpS390XMOVDloadidx: |
| return rewriteValueS390X_OpS390XMOVDloadidx_0(v) |
| case OpS390XMOVDnop: |
| return rewriteValueS390X_OpS390XMOVDnop_0(v) || rewriteValueS390X_OpS390XMOVDnop_10(v) |
| case OpS390XMOVDreg: |
| return rewriteValueS390X_OpS390XMOVDreg_0(v) || rewriteValueS390X_OpS390XMOVDreg_10(v) |
| case OpS390XMOVDstore: |
| return rewriteValueS390X_OpS390XMOVDstore_0(v) |
| case OpS390XMOVDstoreconst: |
| return rewriteValueS390X_OpS390XMOVDstoreconst_0(v) |
| case OpS390XMOVDstoreidx: |
| return rewriteValueS390X_OpS390XMOVDstoreidx_0(v) |
| case OpS390XMOVHBRstore: |
| return rewriteValueS390X_OpS390XMOVHBRstore_0(v) |
| case OpS390XMOVHBRstoreidx: |
| return rewriteValueS390X_OpS390XMOVHBRstoreidx_0(v) || rewriteValueS390X_OpS390XMOVHBRstoreidx_10(v) |
| case OpS390XMOVHZload: |
| return rewriteValueS390X_OpS390XMOVHZload_0(v) |
| case OpS390XMOVHZloadidx: |
| return rewriteValueS390X_OpS390XMOVHZloadidx_0(v) |
| case OpS390XMOVHZreg: |
| return rewriteValueS390X_OpS390XMOVHZreg_0(v) || rewriteValueS390X_OpS390XMOVHZreg_10(v) |
| case OpS390XMOVHload: |
| return rewriteValueS390X_OpS390XMOVHload_0(v) |
| case OpS390XMOVHloadidx: |
| return rewriteValueS390X_OpS390XMOVHloadidx_0(v) |
| case OpS390XMOVHreg: |
| return rewriteValueS390X_OpS390XMOVHreg_0(v) || rewriteValueS390X_OpS390XMOVHreg_10(v) |
| case OpS390XMOVHstore: |
| return rewriteValueS390X_OpS390XMOVHstore_0(v) || rewriteValueS390X_OpS390XMOVHstore_10(v) |
| case OpS390XMOVHstoreconst: |
| return rewriteValueS390X_OpS390XMOVHstoreconst_0(v) |
| case OpS390XMOVHstoreidx: |
| return rewriteValueS390X_OpS390XMOVHstoreidx_0(v) || rewriteValueS390X_OpS390XMOVHstoreidx_10(v) |
| case OpS390XMOVWBRstore: |
| return rewriteValueS390X_OpS390XMOVWBRstore_0(v) |
| case OpS390XMOVWBRstoreidx: |
| return rewriteValueS390X_OpS390XMOVWBRstoreidx_0(v) |
| case OpS390XMOVWZload: |
| return rewriteValueS390X_OpS390XMOVWZload_0(v) |
| case OpS390XMOVWZloadidx: |
| return rewriteValueS390X_OpS390XMOVWZloadidx_0(v) |
| case OpS390XMOVWZreg: |
| return rewriteValueS390X_OpS390XMOVWZreg_0(v) || rewriteValueS390X_OpS390XMOVWZreg_10(v) |
| case OpS390XMOVWload: |
| return rewriteValueS390X_OpS390XMOVWload_0(v) |
| case OpS390XMOVWloadidx: |
| return rewriteValueS390X_OpS390XMOVWloadidx_0(v) |
| case OpS390XMOVWreg: |
| return rewriteValueS390X_OpS390XMOVWreg_0(v) || rewriteValueS390X_OpS390XMOVWreg_10(v) |
| case OpS390XMOVWstore: |
| return rewriteValueS390X_OpS390XMOVWstore_0(v) || rewriteValueS390X_OpS390XMOVWstore_10(v) |
| case OpS390XMOVWstoreconst: |
| return rewriteValueS390X_OpS390XMOVWstoreconst_0(v) |
| case OpS390XMOVWstoreidx: |
| return rewriteValueS390X_OpS390XMOVWstoreidx_0(v) || rewriteValueS390X_OpS390XMOVWstoreidx_10(v) |
| case OpS390XMULLD: |
| return rewriteValueS390X_OpS390XMULLD_0(v) |
| case OpS390XMULLDconst: |
| return rewriteValueS390X_OpS390XMULLDconst_0(v) |
| case OpS390XMULLDload: |
| return rewriteValueS390X_OpS390XMULLDload_0(v) |
| case OpS390XMULLW: |
| return rewriteValueS390X_OpS390XMULLW_0(v) |
| case OpS390XMULLWconst: |
| return rewriteValueS390X_OpS390XMULLWconst_0(v) |
| case OpS390XMULLWload: |
| return rewriteValueS390X_OpS390XMULLWload_0(v) |
| case OpS390XNEG: |
| return rewriteValueS390X_OpS390XNEG_0(v) |
| case OpS390XNEGW: |
| return rewriteValueS390X_OpS390XNEGW_0(v) |
| case OpS390XNOT: |
| return rewriteValueS390X_OpS390XNOT_0(v) |
| case OpS390XNOTW: |
| return rewriteValueS390X_OpS390XNOTW_0(v) |
| case OpS390XOR: |
| return rewriteValueS390X_OpS390XOR_0(v) || rewriteValueS390X_OpS390XOR_10(v) || rewriteValueS390X_OpS390XOR_20(v) || rewriteValueS390X_OpS390XOR_30(v) || rewriteValueS390X_OpS390XOR_40(v) || rewriteValueS390X_OpS390XOR_50(v) || rewriteValueS390X_OpS390XOR_60(v) || rewriteValueS390X_OpS390XOR_70(v) || rewriteValueS390X_OpS390XOR_80(v) || rewriteValueS390X_OpS390XOR_90(v) || rewriteValueS390X_OpS390XOR_100(v) || rewriteValueS390X_OpS390XOR_110(v) || rewriteValueS390X_OpS390XOR_120(v) || rewriteValueS390X_OpS390XOR_130(v) || rewriteValueS390X_OpS390XOR_140(v) || rewriteValueS390X_OpS390XOR_150(v) |
| case OpS390XORW: |
| return rewriteValueS390X_OpS390XORW_0(v) || rewriteValueS390X_OpS390XORW_10(v) || rewriteValueS390X_OpS390XORW_20(v) || rewriteValueS390X_OpS390XORW_30(v) || rewriteValueS390X_OpS390XORW_40(v) || rewriteValueS390X_OpS390XORW_50(v) || rewriteValueS390X_OpS390XORW_60(v) || rewriteValueS390X_OpS390XORW_70(v) || rewriteValueS390X_OpS390XORW_80(v) || rewriteValueS390X_OpS390XORW_90(v) |
| case OpS390XORWconst: |
| return rewriteValueS390X_OpS390XORWconst_0(v) |
| case OpS390XORWload: |
| return rewriteValueS390X_OpS390XORWload_0(v) |
| case OpS390XORconst: |
| return rewriteValueS390X_OpS390XORconst_0(v) |
| case OpS390XORload: |
| return rewriteValueS390X_OpS390XORload_0(v) |
| case OpS390XRLL: |
| return rewriteValueS390X_OpS390XRLL_0(v) |
| case OpS390XRLLG: |
| return rewriteValueS390X_OpS390XRLLG_0(v) |
| case OpS390XSLD: |
| return rewriteValueS390X_OpS390XSLD_0(v) || rewriteValueS390X_OpS390XSLD_10(v) |
| case OpS390XSLW: |
| return rewriteValueS390X_OpS390XSLW_0(v) || rewriteValueS390X_OpS390XSLW_10(v) |
| case OpS390XSRAD: |
| return rewriteValueS390X_OpS390XSRAD_0(v) || rewriteValueS390X_OpS390XSRAD_10(v) |
| case OpS390XSRADconst: |
| return rewriteValueS390X_OpS390XSRADconst_0(v) |
| case OpS390XSRAW: |
| return rewriteValueS390X_OpS390XSRAW_0(v) || rewriteValueS390X_OpS390XSRAW_10(v) |
| case OpS390XSRAWconst: |
| return rewriteValueS390X_OpS390XSRAWconst_0(v) |
| case OpS390XSRD: |
| return rewriteValueS390X_OpS390XSRD_0(v) || rewriteValueS390X_OpS390XSRD_10(v) |
| case OpS390XSRDconst: |
| return rewriteValueS390X_OpS390XSRDconst_0(v) |
| case OpS390XSRW: |
| return rewriteValueS390X_OpS390XSRW_0(v) || rewriteValueS390X_OpS390XSRW_10(v) |
| case OpS390XSTM2: |
| return rewriteValueS390X_OpS390XSTM2_0(v) |
| case OpS390XSTMG2: |
| return rewriteValueS390X_OpS390XSTMG2_0(v) |
| case OpS390XSUB: |
| return rewriteValueS390X_OpS390XSUB_0(v) |
| case OpS390XSUBW: |
| return rewriteValueS390X_OpS390XSUBW_0(v) |
| case OpS390XSUBWconst: |
| return rewriteValueS390X_OpS390XSUBWconst_0(v) |
| case OpS390XSUBWload: |
| return rewriteValueS390X_OpS390XSUBWload_0(v) |
| case OpS390XSUBconst: |
| return rewriteValueS390X_OpS390XSUBconst_0(v) |
| case OpS390XSUBload: |
| return rewriteValueS390X_OpS390XSUBload_0(v) |
| case OpS390XSumBytes2: |
| return rewriteValueS390X_OpS390XSumBytes2_0(v) |
| case OpS390XSumBytes4: |
| return rewriteValueS390X_OpS390XSumBytes4_0(v) |
| case OpS390XSumBytes8: |
| return rewriteValueS390X_OpS390XSumBytes8_0(v) |
| case OpS390XXOR: |
| return rewriteValueS390X_OpS390XXOR_0(v) || rewriteValueS390X_OpS390XXOR_10(v) |
| case OpS390XXORW: |
| return rewriteValueS390X_OpS390XXORW_0(v) || rewriteValueS390X_OpS390XXORW_10(v) |
| case OpS390XXORWconst: |
| return rewriteValueS390X_OpS390XXORWconst_0(v) |
| case OpS390XXORWload: |
| return rewriteValueS390X_OpS390XXORWload_0(v) |
| case OpS390XXORconst: |
| return rewriteValueS390X_OpS390XXORconst_0(v) |
| case OpS390XXORload: |
| return rewriteValueS390X_OpS390XXORload_0(v) |
| case OpSelect0: |
| return rewriteValueS390X_OpSelect0_0(v) |
| case OpSelect1: |
| return rewriteValueS390X_OpSelect1_0(v) |
| case OpSignExt16to32: |
| return rewriteValueS390X_OpSignExt16to32_0(v) |
| case OpSignExt16to64: |
| return rewriteValueS390X_OpSignExt16to64_0(v) |
| case OpSignExt32to64: |
| return rewriteValueS390X_OpSignExt32to64_0(v) |
| case OpSignExt8to16: |
| return rewriteValueS390X_OpSignExt8to16_0(v) |
| case OpSignExt8to32: |
| return rewriteValueS390X_OpSignExt8to32_0(v) |
| case OpSignExt8to64: |
| return rewriteValueS390X_OpSignExt8to64_0(v) |
| case OpSlicemask: |
| return rewriteValueS390X_OpSlicemask_0(v) |
| case OpSqrt: |
| return rewriteValueS390X_OpSqrt_0(v) |
| case OpStaticCall: |
| return rewriteValueS390X_OpStaticCall_0(v) |
| case OpStore: |
| return rewriteValueS390X_OpStore_0(v) |
| case OpSub16: |
| return rewriteValueS390X_OpSub16_0(v) |
| case OpSub32: |
| return rewriteValueS390X_OpSub32_0(v) |
| case OpSub32F: |
| return rewriteValueS390X_OpSub32F_0(v) |
| case OpSub64: |
| return rewriteValueS390X_OpSub64_0(v) |
| case OpSub64F: |
| return rewriteValueS390X_OpSub64F_0(v) |
| case OpSub8: |
| return rewriteValueS390X_OpSub8_0(v) |
| case OpSubPtr: |
| return rewriteValueS390X_OpSubPtr_0(v) |
| case OpTrunc: |
| return rewriteValueS390X_OpTrunc_0(v) |
| case OpTrunc16to8: |
| return rewriteValueS390X_OpTrunc16to8_0(v) |
| case OpTrunc32to16: |
| return rewriteValueS390X_OpTrunc32to16_0(v) |
| case OpTrunc32to8: |
| return rewriteValueS390X_OpTrunc32to8_0(v) |
| case OpTrunc64to16: |
| return rewriteValueS390X_OpTrunc64to16_0(v) |
| case OpTrunc64to32: |
| return rewriteValueS390X_OpTrunc64to32_0(v) |
| case OpTrunc64to8: |
| return rewriteValueS390X_OpTrunc64to8_0(v) |
| case OpWB: |
| return rewriteValueS390X_OpWB_0(v) |
| case OpXor16: |
| return rewriteValueS390X_OpXor16_0(v) |
| case OpXor32: |
| return rewriteValueS390X_OpXor32_0(v) |
| case OpXor64: |
| return rewriteValueS390X_OpXor64_0(v) |
| case OpXor8: |
| return rewriteValueS390X_OpXor8_0(v) |
| case OpZero: |
| return rewriteValueS390X_OpZero_0(v) || rewriteValueS390X_OpZero_10(v) |
| case OpZeroExt16to32: |
| return rewriteValueS390X_OpZeroExt16to32_0(v) |
| case OpZeroExt16to64: |
| return rewriteValueS390X_OpZeroExt16to64_0(v) |
| case OpZeroExt32to64: |
| return rewriteValueS390X_OpZeroExt32to64_0(v) |
| case OpZeroExt8to16: |
| return rewriteValueS390X_OpZeroExt8to16_0(v) |
| case OpZeroExt8to32: |
| return rewriteValueS390X_OpZeroExt8to32_0(v) |
| case OpZeroExt8to64: |
| return rewriteValueS390X_OpZeroExt8to64_0(v) |
| } |
| return false |
| } |
| func rewriteValueS390X_OpAdd16_0(v *Value) bool { |
| // match: (Add16 x y) |
| // cond: |
| // result: (ADDW x y) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XADDW) |
| v.AddArg(x) |
| v.AddArg(y) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpAdd32_0(v *Value) bool { |
| // match: (Add32 x y) |
| // cond: |
| // result: (ADDW x y) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XADDW) |
| v.AddArg(x) |
| v.AddArg(y) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpAdd32F_0(v *Value) bool { |
| // match: (Add32F x y) |
| // cond: |
| // result: (FADDS x y) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XFADDS) |
| v.AddArg(x) |
| v.AddArg(y) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpAdd64_0(v *Value) bool { |
| // match: (Add64 x y) |
| // cond: |
| // result: (ADD x y) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XADD) |
| v.AddArg(x) |
| v.AddArg(y) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpAdd64F_0(v *Value) bool { |
| // match: (Add64F x y) |
| // cond: |
| // result: (FADD x y) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XFADD) |
| v.AddArg(x) |
| v.AddArg(y) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpAdd8_0(v *Value) bool { |
| // match: (Add8 x y) |
| // cond: |
| // result: (ADDW x y) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XADDW) |
| v.AddArg(x) |
| v.AddArg(y) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpAddPtr_0(v *Value) bool { |
| // match: (AddPtr x y) |
| // cond: |
| // result: (ADD x y) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XADD) |
| v.AddArg(x) |
| v.AddArg(y) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpAddr_0(v *Value) bool { |
| // match: (Addr {sym} base) |
| // cond: |
| // result: (MOVDaddr {sym} base) |
| for { |
| sym := v.Aux |
| base := v.Args[0] |
| v.reset(OpS390XMOVDaddr) |
| v.Aux = sym |
| v.AddArg(base) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpAnd16_0(v *Value) bool { |
| // match: (And16 x y) |
| // cond: |
| // result: (ANDW x y) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XANDW) |
| v.AddArg(x) |
| v.AddArg(y) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpAnd32_0(v *Value) bool { |
| // match: (And32 x y) |
| // cond: |
| // result: (ANDW x y) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XANDW) |
| v.AddArg(x) |
| v.AddArg(y) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpAnd64_0(v *Value) bool { |
| // match: (And64 x y) |
| // cond: |
| // result: (AND x y) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XAND) |
| v.AddArg(x) |
| v.AddArg(y) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpAnd8_0(v *Value) bool { |
| // match: (And8 x y) |
| // cond: |
| // result: (ANDW x y) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XANDW) |
| v.AddArg(x) |
| v.AddArg(y) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpAndB_0(v *Value) bool { |
| // match: (AndB x y) |
| // cond: |
| // result: (ANDW x y) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XANDW) |
| v.AddArg(x) |
| v.AddArg(y) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpAtomicAdd32_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (AtomicAdd32 ptr val mem) |
| // cond: |
| // result: (AddTupleFirst32 val (LAA ptr val mem)) |
| for { |
| _ = v.Args[2] |
| ptr := v.Args[0] |
| val := v.Args[1] |
| mem := v.Args[2] |
| v.reset(OpS390XAddTupleFirst32) |
| v.AddArg(val) |
| v0 := b.NewValue0(v.Pos, OpS390XLAA, types.NewTuple(typ.UInt32, types.TypeMem)) |
| v0.AddArg(ptr) |
| v0.AddArg(val) |
| v0.AddArg(mem) |
| v.AddArg(v0) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpAtomicAdd64_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (AtomicAdd64 ptr val mem) |
| // cond: |
| // result: (AddTupleFirst64 val (LAAG ptr val mem)) |
| for { |
| _ = v.Args[2] |
| ptr := v.Args[0] |
| val := v.Args[1] |
| mem := v.Args[2] |
| v.reset(OpS390XAddTupleFirst64) |
| v.AddArg(val) |
| v0 := b.NewValue0(v.Pos, OpS390XLAAG, types.NewTuple(typ.UInt64, types.TypeMem)) |
| v0.AddArg(ptr) |
| v0.AddArg(val) |
| v0.AddArg(mem) |
| v.AddArg(v0) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpAtomicCompareAndSwap32_0(v *Value) bool { |
| // match: (AtomicCompareAndSwap32 ptr old new_ mem) |
| // cond: |
| // result: (LoweredAtomicCas32 ptr old new_ mem) |
| for { |
| _ = v.Args[3] |
| ptr := v.Args[0] |
| old := v.Args[1] |
| new_ := v.Args[2] |
| mem := v.Args[3] |
| v.reset(OpS390XLoweredAtomicCas32) |
| v.AddArg(ptr) |
| v.AddArg(old) |
| v.AddArg(new_) |
| v.AddArg(mem) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpAtomicCompareAndSwap64_0(v *Value) bool { |
| // match: (AtomicCompareAndSwap64 ptr old new_ mem) |
| // cond: |
| // result: (LoweredAtomicCas64 ptr old new_ mem) |
| for { |
| _ = v.Args[3] |
| ptr := v.Args[0] |
| old := v.Args[1] |
| new_ := v.Args[2] |
| mem := v.Args[3] |
| v.reset(OpS390XLoweredAtomicCas64) |
| v.AddArg(ptr) |
| v.AddArg(old) |
| v.AddArg(new_) |
| v.AddArg(mem) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpAtomicExchange32_0(v *Value) bool { |
| // match: (AtomicExchange32 ptr val mem) |
| // cond: |
| // result: (LoweredAtomicExchange32 ptr val mem) |
| for { |
| _ = v.Args[2] |
| ptr := v.Args[0] |
| val := v.Args[1] |
| mem := v.Args[2] |
| v.reset(OpS390XLoweredAtomicExchange32) |
| v.AddArg(ptr) |
| v.AddArg(val) |
| v.AddArg(mem) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpAtomicExchange64_0(v *Value) bool { |
| // match: (AtomicExchange64 ptr val mem) |
| // cond: |
| // result: (LoweredAtomicExchange64 ptr val mem) |
| for { |
| _ = v.Args[2] |
| ptr := v.Args[0] |
| val := v.Args[1] |
| mem := v.Args[2] |
| v.reset(OpS390XLoweredAtomicExchange64) |
| v.AddArg(ptr) |
| v.AddArg(val) |
| v.AddArg(mem) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpAtomicLoad32_0(v *Value) bool { |
| // match: (AtomicLoad32 ptr mem) |
| // cond: |
| // result: (MOVWZatomicload ptr mem) |
| for { |
| _ = v.Args[1] |
| ptr := v.Args[0] |
| mem := v.Args[1] |
| v.reset(OpS390XMOVWZatomicload) |
| v.AddArg(ptr) |
| v.AddArg(mem) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpAtomicLoad64_0(v *Value) bool { |
| // match: (AtomicLoad64 ptr mem) |
| // cond: |
| // result: (MOVDatomicload ptr mem) |
| for { |
| _ = v.Args[1] |
| ptr := v.Args[0] |
| mem := v.Args[1] |
| v.reset(OpS390XMOVDatomicload) |
| v.AddArg(ptr) |
| v.AddArg(mem) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpAtomicLoadPtr_0(v *Value) bool { |
| // match: (AtomicLoadPtr ptr mem) |
| // cond: |
| // result: (MOVDatomicload ptr mem) |
| for { |
| _ = v.Args[1] |
| ptr := v.Args[0] |
| mem := v.Args[1] |
| v.reset(OpS390XMOVDatomicload) |
| v.AddArg(ptr) |
| v.AddArg(mem) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpAtomicStore32_0(v *Value) bool { |
| // match: (AtomicStore32 ptr val mem) |
| // cond: |
| // result: (MOVWatomicstore ptr val mem) |
| for { |
| _ = v.Args[2] |
| ptr := v.Args[0] |
| val := v.Args[1] |
| mem := v.Args[2] |
| v.reset(OpS390XMOVWatomicstore) |
| v.AddArg(ptr) |
| v.AddArg(val) |
| v.AddArg(mem) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpAtomicStore64_0(v *Value) bool { |
| // match: (AtomicStore64 ptr val mem) |
| // cond: |
| // result: (MOVDatomicstore ptr val mem) |
| for { |
| _ = v.Args[2] |
| ptr := v.Args[0] |
| val := v.Args[1] |
| mem := v.Args[2] |
| v.reset(OpS390XMOVDatomicstore) |
| v.AddArg(ptr) |
| v.AddArg(val) |
| v.AddArg(mem) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpAtomicStorePtrNoWB_0(v *Value) bool { |
| // match: (AtomicStorePtrNoWB ptr val mem) |
| // cond: |
| // result: (MOVDatomicstore ptr val mem) |
| for { |
| _ = v.Args[2] |
| ptr := v.Args[0] |
| val := v.Args[1] |
| mem := v.Args[2] |
| v.reset(OpS390XMOVDatomicstore) |
| v.AddArg(ptr) |
| v.AddArg(val) |
| v.AddArg(mem) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpAvg64u_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| // match: (Avg64u <t> x y) |
| // cond: |
| // result: (ADD (SRDconst <t> (SUB <t> x y) [1]) y) |
| for { |
| t := v.Type |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XADD) |
| v0 := b.NewValue0(v.Pos, OpS390XSRDconst, t) |
| v0.AuxInt = 1 |
| v1 := b.NewValue0(v.Pos, OpS390XSUB, t) |
| v1.AddArg(x) |
| v1.AddArg(y) |
| v0.AddArg(v1) |
| v.AddArg(v0) |
| v.AddArg(y) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpBitLen64_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (BitLen64 x) |
| // cond: |
| // result: (SUB (MOVDconst [64]) (FLOGR x)) |
| for { |
| x := v.Args[0] |
| v.reset(OpS390XSUB) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 64 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XFLOGR, typ.UInt64) |
| v1.AddArg(x) |
| v.AddArg(v1) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpBswap32_0(v *Value) bool { |
| // match: (Bswap32 x) |
| // cond: |
| // result: (MOVWBR x) |
| for { |
| x := v.Args[0] |
| v.reset(OpS390XMOVWBR) |
| v.AddArg(x) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpBswap64_0(v *Value) bool { |
| // match: (Bswap64 x) |
| // cond: |
| // result: (MOVDBR x) |
| for { |
| x := v.Args[0] |
| v.reset(OpS390XMOVDBR) |
| v.AddArg(x) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpCeil_0(v *Value) bool { |
| // match: (Ceil x) |
| // cond: |
| // result: (FIDBR [6] x) |
| for { |
| x := v.Args[0] |
| v.reset(OpS390XFIDBR) |
| v.AuxInt = 6 |
| v.AddArg(x) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpClosureCall_0(v *Value) bool { |
| // match: (ClosureCall [argwid] entry closure mem) |
| // cond: |
| // result: (CALLclosure [argwid] entry closure mem) |
| for { |
| argwid := v.AuxInt |
| _ = v.Args[2] |
| entry := v.Args[0] |
| closure := v.Args[1] |
| mem := v.Args[2] |
| v.reset(OpS390XCALLclosure) |
| v.AuxInt = argwid |
| v.AddArg(entry) |
| v.AddArg(closure) |
| v.AddArg(mem) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpCom16_0(v *Value) bool { |
| // match: (Com16 x) |
| // cond: |
| // result: (NOTW x) |
| for { |
| x := v.Args[0] |
| v.reset(OpS390XNOTW) |
| v.AddArg(x) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpCom32_0(v *Value) bool { |
| // match: (Com32 x) |
| // cond: |
| // result: (NOTW x) |
| for { |
| x := v.Args[0] |
| v.reset(OpS390XNOTW) |
| v.AddArg(x) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpCom64_0(v *Value) bool { |
| // match: (Com64 x) |
| // cond: |
| // result: (NOT x) |
| for { |
| x := v.Args[0] |
| v.reset(OpS390XNOT) |
| v.AddArg(x) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpCom8_0(v *Value) bool { |
| // match: (Com8 x) |
| // cond: |
| // result: (NOTW x) |
| for { |
| x := v.Args[0] |
| v.reset(OpS390XNOTW) |
| v.AddArg(x) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpConst16_0(v *Value) bool { |
| // match: (Const16 [val]) |
| // cond: |
| // result: (MOVDconst [val]) |
| for { |
| val := v.AuxInt |
| v.reset(OpS390XMOVDconst) |
| v.AuxInt = val |
| return true |
| } |
| } |
| func rewriteValueS390X_OpConst32_0(v *Value) bool { |
| // match: (Const32 [val]) |
| // cond: |
| // result: (MOVDconst [val]) |
| for { |
| val := v.AuxInt |
| v.reset(OpS390XMOVDconst) |
| v.AuxInt = val |
| return true |
| } |
| } |
| func rewriteValueS390X_OpConst32F_0(v *Value) bool { |
| // match: (Const32F [val]) |
| // cond: |
| // result: (FMOVSconst [val]) |
| for { |
| val := v.AuxInt |
| v.reset(OpS390XFMOVSconst) |
| v.AuxInt = val |
| return true |
| } |
| } |
| func rewriteValueS390X_OpConst64_0(v *Value) bool { |
| // match: (Const64 [val]) |
| // cond: |
| // result: (MOVDconst [val]) |
| for { |
| val := v.AuxInt |
| v.reset(OpS390XMOVDconst) |
| v.AuxInt = val |
| return true |
| } |
| } |
| func rewriteValueS390X_OpConst64F_0(v *Value) bool { |
| // match: (Const64F [val]) |
| // cond: |
| // result: (FMOVDconst [val]) |
| for { |
| val := v.AuxInt |
| v.reset(OpS390XFMOVDconst) |
| v.AuxInt = val |
| return true |
| } |
| } |
| func rewriteValueS390X_OpConst8_0(v *Value) bool { |
| // match: (Const8 [val]) |
| // cond: |
| // result: (MOVDconst [val]) |
| for { |
| val := v.AuxInt |
| v.reset(OpS390XMOVDconst) |
| v.AuxInt = val |
| return true |
| } |
| } |
| func rewriteValueS390X_OpConstBool_0(v *Value) bool { |
| // match: (ConstBool [b]) |
| // cond: |
| // result: (MOVDconst [b]) |
| for { |
| b := v.AuxInt |
| v.reset(OpS390XMOVDconst) |
| v.AuxInt = b |
| return true |
| } |
| } |
| func rewriteValueS390X_OpConstNil_0(v *Value) bool { |
| // match: (ConstNil) |
| // cond: |
| // result: (MOVDconst [0]) |
| for { |
| v.reset(OpS390XMOVDconst) |
| v.AuxInt = 0 |
| return true |
| } |
| } |
| func rewriteValueS390X_OpCtz32_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Ctz32 <t> x) |
| // cond: |
| // result: (SUB (MOVDconst [64]) (FLOGR (MOVWZreg (ANDW <t> (SUBWconst <t> [1] x) (NOTW <t> x))))) |
| for { |
| t := v.Type |
| x := v.Args[0] |
| v.reset(OpS390XSUB) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 64 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XFLOGR, typ.UInt64) |
| v2 := b.NewValue0(v.Pos, OpS390XMOVWZreg, typ.UInt64) |
| v3 := b.NewValue0(v.Pos, OpS390XANDW, t) |
| v4 := b.NewValue0(v.Pos, OpS390XSUBWconst, t) |
| v4.AuxInt = 1 |
| v4.AddArg(x) |
| v3.AddArg(v4) |
| v5 := b.NewValue0(v.Pos, OpS390XNOTW, t) |
| v5.AddArg(x) |
| v3.AddArg(v5) |
| v2.AddArg(v3) |
| v1.AddArg(v2) |
| v.AddArg(v1) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpCtz32NonZero_0(v *Value) bool { |
| // match: (Ctz32NonZero x) |
| // cond: |
| // result: (Ctz32 x) |
| for { |
| x := v.Args[0] |
| v.reset(OpCtz32) |
| v.AddArg(x) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpCtz64_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Ctz64 <t> x) |
| // cond: |
| // result: (SUB (MOVDconst [64]) (FLOGR (AND <t> (SUBconst <t> [1] x) (NOT <t> x)))) |
| for { |
| t := v.Type |
| x := v.Args[0] |
| v.reset(OpS390XSUB) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 64 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XFLOGR, typ.UInt64) |
| v2 := b.NewValue0(v.Pos, OpS390XAND, t) |
| v3 := b.NewValue0(v.Pos, OpS390XSUBconst, t) |
| v3.AuxInt = 1 |
| v3.AddArg(x) |
| v2.AddArg(v3) |
| v4 := b.NewValue0(v.Pos, OpS390XNOT, t) |
| v4.AddArg(x) |
| v2.AddArg(v4) |
| v1.AddArg(v2) |
| v.AddArg(v1) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpCtz64NonZero_0(v *Value) bool { |
| // match: (Ctz64NonZero x) |
| // cond: |
| // result: (Ctz64 x) |
| for { |
| x := v.Args[0] |
| v.reset(OpCtz64) |
| v.AddArg(x) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpCvt32Fto32_0(v *Value) bool { |
| // match: (Cvt32Fto32 x) |
| // cond: |
| // result: (CFEBRA x) |
| for { |
| x := v.Args[0] |
| v.reset(OpS390XCFEBRA) |
| v.AddArg(x) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpCvt32Fto64_0(v *Value) bool { |
| // match: (Cvt32Fto64 x) |
| // cond: |
| // result: (CGEBRA x) |
| for { |
| x := v.Args[0] |
| v.reset(OpS390XCGEBRA) |
| v.AddArg(x) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpCvt32Fto64F_0(v *Value) bool { |
| // match: (Cvt32Fto64F x) |
| // cond: |
| // result: (LDEBR x) |
| for { |
| x := v.Args[0] |
| v.reset(OpS390XLDEBR) |
| v.AddArg(x) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpCvt32to32F_0(v *Value) bool { |
| // match: (Cvt32to32F x) |
| // cond: |
| // result: (CEFBRA x) |
| for { |
| x := v.Args[0] |
| v.reset(OpS390XCEFBRA) |
| v.AddArg(x) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpCvt32to64F_0(v *Value) bool { |
| // match: (Cvt32to64F x) |
| // cond: |
| // result: (CDFBRA x) |
| for { |
| x := v.Args[0] |
| v.reset(OpS390XCDFBRA) |
| v.AddArg(x) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpCvt64Fto32_0(v *Value) bool { |
| // match: (Cvt64Fto32 x) |
| // cond: |
| // result: (CFDBRA x) |
| for { |
| x := v.Args[0] |
| v.reset(OpS390XCFDBRA) |
| v.AddArg(x) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpCvt64Fto32F_0(v *Value) bool { |
| // match: (Cvt64Fto32F x) |
| // cond: |
| // result: (LEDBR x) |
| for { |
| x := v.Args[0] |
| v.reset(OpS390XLEDBR) |
| v.AddArg(x) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpCvt64Fto64_0(v *Value) bool { |
| // match: (Cvt64Fto64 x) |
| // cond: |
| // result: (CGDBRA x) |
| for { |
| x := v.Args[0] |
| v.reset(OpS390XCGDBRA) |
| v.AddArg(x) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpCvt64to32F_0(v *Value) bool { |
| // match: (Cvt64to32F x) |
| // cond: |
| // result: (CEGBRA x) |
| for { |
| x := v.Args[0] |
| v.reset(OpS390XCEGBRA) |
| v.AddArg(x) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpCvt64to64F_0(v *Value) bool { |
| // match: (Cvt64to64F x) |
| // cond: |
| // result: (CDGBRA x) |
| for { |
| x := v.Args[0] |
| v.reset(OpS390XCDGBRA) |
| v.AddArg(x) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpDiv16_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Div16 x y) |
| // cond: |
| // result: (DIVW (MOVHreg x) (MOVHreg y)) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XDIVW) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64) |
| v0.AddArg(x) |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64) |
| v1.AddArg(y) |
| v.AddArg(v1) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpDiv16u_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Div16u x y) |
| // cond: |
| // result: (DIVWU (MOVHZreg x) (MOVHZreg y)) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XDIVWU) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64) |
| v0.AddArg(x) |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64) |
| v1.AddArg(y) |
| v.AddArg(v1) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpDiv32_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Div32 x y) |
| // cond: |
| // result: (DIVW (MOVWreg x) y) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XDIVW) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVWreg, typ.Int64) |
| v0.AddArg(x) |
| v.AddArg(v0) |
| v.AddArg(y) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpDiv32F_0(v *Value) bool { |
| // match: (Div32F x y) |
| // cond: |
| // result: (FDIVS x y) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XFDIVS) |
| v.AddArg(x) |
| v.AddArg(y) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpDiv32u_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Div32u x y) |
| // cond: |
| // result: (DIVWU (MOVWZreg x) y) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XDIVWU) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVWZreg, typ.UInt64) |
| v0.AddArg(x) |
| v.AddArg(v0) |
| v.AddArg(y) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpDiv64_0(v *Value) bool { |
| // match: (Div64 x y) |
| // cond: |
| // result: (DIVD x y) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XDIVD) |
| v.AddArg(x) |
| v.AddArg(y) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpDiv64F_0(v *Value) bool { |
| // match: (Div64F x y) |
| // cond: |
| // result: (FDIV x y) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XFDIV) |
| v.AddArg(x) |
| v.AddArg(y) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpDiv64u_0(v *Value) bool { |
| // match: (Div64u x y) |
| // cond: |
| // result: (DIVDU x y) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XDIVDU) |
| v.AddArg(x) |
| v.AddArg(y) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpDiv8_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Div8 x y) |
| // cond: |
| // result: (DIVW (MOVBreg x) (MOVBreg y)) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XDIVW) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64) |
| v0.AddArg(x) |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64) |
| v1.AddArg(y) |
| v.AddArg(v1) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpDiv8u_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Div8u x y) |
| // cond: |
| // result: (DIVWU (MOVBZreg x) (MOVBZreg y)) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XDIVWU) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64) |
| v0.AddArg(x) |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64) |
| v1.AddArg(y) |
| v.AddArg(v1) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpEq16_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Eq16 x y) |
| // cond: |
| // result: (MOVDEQ (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVHreg x) (MOVHreg y))) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDEQ) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags) |
| v3 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64) |
| v3.AddArg(x) |
| v2.AddArg(v3) |
| v4 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64) |
| v4.AddArg(y) |
| v2.AddArg(v4) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpEq32_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Eq32 x y) |
| // cond: |
| // result: (MOVDEQ (MOVDconst [0]) (MOVDconst [1]) (CMPW x y)) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDEQ) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags) |
| v2.AddArg(x) |
| v2.AddArg(y) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpEq32F_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Eq32F x y) |
| // cond: |
| // result: (MOVDEQ (MOVDconst [0]) (MOVDconst [1]) (FCMPS x y)) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDEQ) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XFCMPS, types.TypeFlags) |
| v2.AddArg(x) |
| v2.AddArg(y) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpEq64_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Eq64 x y) |
| // cond: |
| // result: (MOVDEQ (MOVDconst [0]) (MOVDconst [1]) (CMP x y)) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDEQ) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMP, types.TypeFlags) |
| v2.AddArg(x) |
| v2.AddArg(y) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpEq64F_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Eq64F x y) |
| // cond: |
| // result: (MOVDEQ (MOVDconst [0]) (MOVDconst [1]) (FCMP x y)) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDEQ) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XFCMP, types.TypeFlags) |
| v2.AddArg(x) |
| v2.AddArg(y) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpEq8_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Eq8 x y) |
| // cond: |
| // result: (MOVDEQ (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVBreg x) (MOVBreg y))) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDEQ) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags) |
| v3 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64) |
| v3.AddArg(x) |
| v2.AddArg(v3) |
| v4 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64) |
| v4.AddArg(y) |
| v2.AddArg(v4) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpEqB_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (EqB x y) |
| // cond: |
| // result: (MOVDEQ (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVBreg x) (MOVBreg y))) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDEQ) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags) |
| v3 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64) |
| v3.AddArg(x) |
| v2.AddArg(v3) |
| v4 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64) |
| v4.AddArg(y) |
| v2.AddArg(v4) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpEqPtr_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (EqPtr x y) |
| // cond: |
| // result: (MOVDEQ (MOVDconst [0]) (MOVDconst [1]) (CMP x y)) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDEQ) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMP, types.TypeFlags) |
| v2.AddArg(x) |
| v2.AddArg(y) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpFloor_0(v *Value) bool { |
| // match: (Floor x) |
| // cond: |
| // result: (FIDBR [7] x) |
| for { |
| x := v.Args[0] |
| v.reset(OpS390XFIDBR) |
| v.AuxInt = 7 |
| v.AddArg(x) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpGeq16_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Geq16 x y) |
| // cond: |
| // result: (MOVDGE (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVHreg x) (MOVHreg y))) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDGE) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags) |
| v3 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64) |
| v3.AddArg(x) |
| v2.AddArg(v3) |
| v4 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64) |
| v4.AddArg(y) |
| v2.AddArg(v4) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpGeq16U_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Geq16U x y) |
| // cond: |
| // result: (MOVDGE (MOVDconst [0]) (MOVDconst [1]) (CMPWU (MOVHZreg x) (MOVHZreg y))) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDGE) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPWU, types.TypeFlags) |
| v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64) |
| v3.AddArg(x) |
| v2.AddArg(v3) |
| v4 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64) |
| v4.AddArg(y) |
| v2.AddArg(v4) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpGeq32_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Geq32 x y) |
| // cond: |
| // result: (MOVDGE (MOVDconst [0]) (MOVDconst [1]) (CMPW x y)) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDGE) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags) |
| v2.AddArg(x) |
| v2.AddArg(y) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpGeq32F_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Geq32F x y) |
| // cond: |
| // result: (MOVDGEnoinv (MOVDconst [0]) (MOVDconst [1]) (FCMPS x y)) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDGEnoinv) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XFCMPS, types.TypeFlags) |
| v2.AddArg(x) |
| v2.AddArg(y) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpGeq32U_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Geq32U x y) |
| // cond: |
| // result: (MOVDGE (MOVDconst [0]) (MOVDconst [1]) (CMPWU x y)) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDGE) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPWU, types.TypeFlags) |
| v2.AddArg(x) |
| v2.AddArg(y) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpGeq64_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Geq64 x y) |
| // cond: |
| // result: (MOVDGE (MOVDconst [0]) (MOVDconst [1]) (CMP x y)) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDGE) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMP, types.TypeFlags) |
| v2.AddArg(x) |
| v2.AddArg(y) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpGeq64F_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Geq64F x y) |
| // cond: |
| // result: (MOVDGEnoinv (MOVDconst [0]) (MOVDconst [1]) (FCMP x y)) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDGEnoinv) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XFCMP, types.TypeFlags) |
| v2.AddArg(x) |
| v2.AddArg(y) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpGeq64U_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Geq64U x y) |
| // cond: |
| // result: (MOVDGE (MOVDconst [0]) (MOVDconst [1]) (CMPU x y)) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDGE) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPU, types.TypeFlags) |
| v2.AddArg(x) |
| v2.AddArg(y) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpGeq8_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Geq8 x y) |
| // cond: |
| // result: (MOVDGE (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVBreg x) (MOVBreg y))) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDGE) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags) |
| v3 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64) |
| v3.AddArg(x) |
| v2.AddArg(v3) |
| v4 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64) |
| v4.AddArg(y) |
| v2.AddArg(v4) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpGeq8U_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Geq8U x y) |
| // cond: |
| // result: (MOVDGE (MOVDconst [0]) (MOVDconst [1]) (CMPWU (MOVBZreg x) (MOVBZreg y))) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDGE) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPWU, types.TypeFlags) |
| v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64) |
| v3.AddArg(x) |
| v2.AddArg(v3) |
| v4 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64) |
| v4.AddArg(y) |
| v2.AddArg(v4) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpGetCallerPC_0(v *Value) bool { |
| // match: (GetCallerPC) |
| // cond: |
| // result: (LoweredGetCallerPC) |
| for { |
| v.reset(OpS390XLoweredGetCallerPC) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpGetCallerSP_0(v *Value) bool { |
| // match: (GetCallerSP) |
| // cond: |
| // result: (LoweredGetCallerSP) |
| for { |
| v.reset(OpS390XLoweredGetCallerSP) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpGetClosurePtr_0(v *Value) bool { |
| // match: (GetClosurePtr) |
| // cond: |
| // result: (LoweredGetClosurePtr) |
| for { |
| v.reset(OpS390XLoweredGetClosurePtr) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpGetG_0(v *Value) bool { |
| // match: (GetG mem) |
| // cond: |
| // result: (LoweredGetG mem) |
| for { |
| mem := v.Args[0] |
| v.reset(OpS390XLoweredGetG) |
| v.AddArg(mem) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpGreater16_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Greater16 x y) |
| // cond: |
| // result: (MOVDGT (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVHreg x) (MOVHreg y))) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDGT) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags) |
| v3 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64) |
| v3.AddArg(x) |
| v2.AddArg(v3) |
| v4 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64) |
| v4.AddArg(y) |
| v2.AddArg(v4) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpGreater16U_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Greater16U x y) |
| // cond: |
| // result: (MOVDGT (MOVDconst [0]) (MOVDconst [1]) (CMPWU (MOVHZreg x) (MOVHZreg y))) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDGT) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPWU, types.TypeFlags) |
| v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64) |
| v3.AddArg(x) |
| v2.AddArg(v3) |
| v4 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64) |
| v4.AddArg(y) |
| v2.AddArg(v4) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpGreater32_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Greater32 x y) |
| // cond: |
| // result: (MOVDGT (MOVDconst [0]) (MOVDconst [1]) (CMPW x y)) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDGT) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags) |
| v2.AddArg(x) |
| v2.AddArg(y) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpGreater32F_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Greater32F x y) |
| // cond: |
| // result: (MOVDGTnoinv (MOVDconst [0]) (MOVDconst [1]) (FCMPS x y)) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDGTnoinv) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XFCMPS, types.TypeFlags) |
| v2.AddArg(x) |
| v2.AddArg(y) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpGreater32U_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Greater32U x y) |
| // cond: |
| // result: (MOVDGT (MOVDconst [0]) (MOVDconst [1]) (CMPWU x y)) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDGT) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPWU, types.TypeFlags) |
| v2.AddArg(x) |
| v2.AddArg(y) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpGreater64_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Greater64 x y) |
| // cond: |
| // result: (MOVDGT (MOVDconst [0]) (MOVDconst [1]) (CMP x y)) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDGT) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMP, types.TypeFlags) |
| v2.AddArg(x) |
| v2.AddArg(y) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpGreater64F_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Greater64F x y) |
| // cond: |
| // result: (MOVDGTnoinv (MOVDconst [0]) (MOVDconst [1]) (FCMP x y)) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDGTnoinv) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XFCMP, types.TypeFlags) |
| v2.AddArg(x) |
| v2.AddArg(y) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpGreater64U_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Greater64U x y) |
| // cond: |
| // result: (MOVDGT (MOVDconst [0]) (MOVDconst [1]) (CMPU x y)) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDGT) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPU, types.TypeFlags) |
| v2.AddArg(x) |
| v2.AddArg(y) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpGreater8_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Greater8 x y) |
| // cond: |
| // result: (MOVDGT (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVBreg x) (MOVBreg y))) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDGT) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags) |
| v3 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64) |
| v3.AddArg(x) |
| v2.AddArg(v3) |
| v4 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64) |
| v4.AddArg(y) |
| v2.AddArg(v4) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpGreater8U_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Greater8U x y) |
| // cond: |
| // result: (MOVDGT (MOVDconst [0]) (MOVDconst [1]) (CMPWU (MOVBZreg x) (MOVBZreg y))) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDGT) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPWU, types.TypeFlags) |
| v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64) |
| v3.AddArg(x) |
| v2.AddArg(v3) |
| v4 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64) |
| v4.AddArg(y) |
| v2.AddArg(v4) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpHmul32_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Hmul32 x y) |
| // cond: |
| // result: (SRDconst [32] (MULLD (MOVWreg x) (MOVWreg y))) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XSRDconst) |
| v.AuxInt = 32 |
| v0 := b.NewValue0(v.Pos, OpS390XMULLD, typ.Int64) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVWreg, typ.Int64) |
| v1.AddArg(x) |
| v0.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XMOVWreg, typ.Int64) |
| v2.AddArg(y) |
| v0.AddArg(v2) |
| v.AddArg(v0) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpHmul32u_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Hmul32u x y) |
| // cond: |
| // result: (SRDconst [32] (MULLD (MOVWZreg x) (MOVWZreg y))) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XSRDconst) |
| v.AuxInt = 32 |
| v0 := b.NewValue0(v.Pos, OpS390XMULLD, typ.Int64) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVWZreg, typ.UInt64) |
| v1.AddArg(x) |
| v0.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XMOVWZreg, typ.UInt64) |
| v2.AddArg(y) |
| v0.AddArg(v2) |
| v.AddArg(v0) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpHmul64_0(v *Value) bool { |
| // match: (Hmul64 x y) |
| // cond: |
| // result: (MULHD x y) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMULHD) |
| v.AddArg(x) |
| v.AddArg(y) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpHmul64u_0(v *Value) bool { |
| // match: (Hmul64u x y) |
| // cond: |
| // result: (MULHDU x y) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMULHDU) |
| v.AddArg(x) |
| v.AddArg(y) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpITab_0(v *Value) bool { |
| // match: (ITab (Load ptr mem)) |
| // cond: |
| // result: (MOVDload ptr mem) |
| for { |
| v_0 := v.Args[0] |
| if v_0.Op != OpLoad { |
| break |
| } |
| _ = v_0.Args[1] |
| ptr := v_0.Args[0] |
| mem := v_0.Args[1] |
| v.reset(OpS390XMOVDload) |
| v.AddArg(ptr) |
| v.AddArg(mem) |
| return true |
| } |
| return false |
| } |
| func rewriteValueS390X_OpInterCall_0(v *Value) bool { |
| // match: (InterCall [argwid] entry mem) |
| // cond: |
| // result: (CALLinter [argwid] entry mem) |
| for { |
| argwid := v.AuxInt |
| _ = v.Args[1] |
| entry := v.Args[0] |
| mem := v.Args[1] |
| v.reset(OpS390XCALLinter) |
| v.AuxInt = argwid |
| v.AddArg(entry) |
| v.AddArg(mem) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpIsInBounds_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (IsInBounds idx len) |
| // cond: |
| // result: (MOVDLT (MOVDconst [0]) (MOVDconst [1]) (CMPU idx len)) |
| for { |
| _ = v.Args[1] |
| idx := v.Args[0] |
| len := v.Args[1] |
| v.reset(OpS390XMOVDLT) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPU, types.TypeFlags) |
| v2.AddArg(idx) |
| v2.AddArg(len) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpIsNonNil_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (IsNonNil p) |
| // cond: |
| // result: (MOVDNE (MOVDconst [0]) (MOVDconst [1]) (CMPconst p [0])) |
| for { |
| p := v.Args[0] |
| v.reset(OpS390XMOVDNE) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPconst, types.TypeFlags) |
| v2.AuxInt = 0 |
| v2.AddArg(p) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpIsSliceInBounds_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (IsSliceInBounds idx len) |
| // cond: |
| // result: (MOVDLE (MOVDconst [0]) (MOVDconst [1]) (CMPU idx len)) |
| for { |
| _ = v.Args[1] |
| idx := v.Args[0] |
| len := v.Args[1] |
| v.reset(OpS390XMOVDLE) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPU, types.TypeFlags) |
| v2.AddArg(idx) |
| v2.AddArg(len) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpLeq16_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Leq16 x y) |
| // cond: |
| // result: (MOVDLE (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVHreg x) (MOVHreg y))) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDLE) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags) |
| v3 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64) |
| v3.AddArg(x) |
| v2.AddArg(v3) |
| v4 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64) |
| v4.AddArg(y) |
| v2.AddArg(v4) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpLeq16U_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Leq16U x y) |
| // cond: |
| // result: (MOVDLE (MOVDconst [0]) (MOVDconst [1]) (CMPWU (MOVHZreg x) (MOVHZreg y))) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDLE) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPWU, types.TypeFlags) |
| v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64) |
| v3.AddArg(x) |
| v2.AddArg(v3) |
| v4 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64) |
| v4.AddArg(y) |
| v2.AddArg(v4) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpLeq32_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Leq32 x y) |
| // cond: |
| // result: (MOVDLE (MOVDconst [0]) (MOVDconst [1]) (CMPW x y)) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDLE) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags) |
| v2.AddArg(x) |
| v2.AddArg(y) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpLeq32F_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Leq32F x y) |
| // cond: |
| // result: (MOVDGEnoinv (MOVDconst [0]) (MOVDconst [1]) (FCMPS y x)) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDGEnoinv) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XFCMPS, types.TypeFlags) |
| v2.AddArg(y) |
| v2.AddArg(x) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpLeq32U_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Leq32U x y) |
| // cond: |
| // result: (MOVDLE (MOVDconst [0]) (MOVDconst [1]) (CMPWU x y)) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDLE) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPWU, types.TypeFlags) |
| v2.AddArg(x) |
| v2.AddArg(y) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpLeq64_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Leq64 x y) |
| // cond: |
| // result: (MOVDLE (MOVDconst [0]) (MOVDconst [1]) (CMP x y)) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDLE) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMP, types.TypeFlags) |
| v2.AddArg(x) |
| v2.AddArg(y) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpLeq64F_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Leq64F x y) |
| // cond: |
| // result: (MOVDGEnoinv (MOVDconst [0]) (MOVDconst [1]) (FCMP y x)) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDGEnoinv) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XFCMP, types.TypeFlags) |
| v2.AddArg(y) |
| v2.AddArg(x) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpLeq64U_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Leq64U x y) |
| // cond: |
| // result: (MOVDLE (MOVDconst [0]) (MOVDconst [1]) (CMPU x y)) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDLE) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPU, types.TypeFlags) |
| v2.AddArg(x) |
| v2.AddArg(y) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpLeq8_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Leq8 x y) |
| // cond: |
| // result: (MOVDLE (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVBreg x) (MOVBreg y))) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDLE) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags) |
| v3 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64) |
| v3.AddArg(x) |
| v2.AddArg(v3) |
| v4 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64) |
| v4.AddArg(y) |
| v2.AddArg(v4) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpLeq8U_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Leq8U x y) |
| // cond: |
| // result: (MOVDLE (MOVDconst [0]) (MOVDconst [1]) (CMPWU (MOVBZreg x) (MOVBZreg y))) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDLE) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPWU, types.TypeFlags) |
| v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64) |
| v3.AddArg(x) |
| v2.AddArg(v3) |
| v4 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64) |
| v4.AddArg(y) |
| v2.AddArg(v4) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpLess16_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Less16 x y) |
| // cond: |
| // result: (MOVDLT (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVHreg x) (MOVHreg y))) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDLT) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags) |
| v3 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64) |
| v3.AddArg(x) |
| v2.AddArg(v3) |
| v4 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64) |
| v4.AddArg(y) |
| v2.AddArg(v4) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpLess16U_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Less16U x y) |
| // cond: |
| // result: (MOVDLT (MOVDconst [0]) (MOVDconst [1]) (CMPWU (MOVHZreg x) (MOVHZreg y))) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDLT) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPWU, types.TypeFlags) |
| v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64) |
| v3.AddArg(x) |
| v2.AddArg(v3) |
| v4 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64) |
| v4.AddArg(y) |
| v2.AddArg(v4) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpLess32_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Less32 x y) |
| // cond: |
| // result: (MOVDLT (MOVDconst [0]) (MOVDconst [1]) (CMPW x y)) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDLT) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags) |
| v2.AddArg(x) |
| v2.AddArg(y) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpLess32F_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Less32F x y) |
| // cond: |
| // result: (MOVDGTnoinv (MOVDconst [0]) (MOVDconst [1]) (FCMPS y x)) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDGTnoinv) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XFCMPS, types.TypeFlags) |
| v2.AddArg(y) |
| v2.AddArg(x) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpLess32U_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Less32U x y) |
| // cond: |
| // result: (MOVDLT (MOVDconst [0]) (MOVDconst [1]) (CMPWU x y)) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDLT) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPWU, types.TypeFlags) |
| v2.AddArg(x) |
| v2.AddArg(y) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpLess64_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Less64 x y) |
| // cond: |
| // result: (MOVDLT (MOVDconst [0]) (MOVDconst [1]) (CMP x y)) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDLT) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMP, types.TypeFlags) |
| v2.AddArg(x) |
| v2.AddArg(y) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpLess64F_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Less64F x y) |
| // cond: |
| // result: (MOVDGTnoinv (MOVDconst [0]) (MOVDconst [1]) (FCMP y x)) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDGTnoinv) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XFCMP, types.TypeFlags) |
| v2.AddArg(y) |
| v2.AddArg(x) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpLess64U_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Less64U x y) |
| // cond: |
| // result: (MOVDLT (MOVDconst [0]) (MOVDconst [1]) (CMPU x y)) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDLT) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPU, types.TypeFlags) |
| v2.AddArg(x) |
| v2.AddArg(y) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpLess8_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Less8 x y) |
| // cond: |
| // result: (MOVDLT (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVBreg x) (MOVBreg y))) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDLT) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags) |
| v3 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64) |
| v3.AddArg(x) |
| v2.AddArg(v3) |
| v4 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64) |
| v4.AddArg(y) |
| v2.AddArg(v4) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpLess8U_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Less8U x y) |
| // cond: |
| // result: (MOVDLT (MOVDconst [0]) (MOVDconst [1]) (CMPWU (MOVBZreg x) (MOVBZreg y))) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDLT) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v0.AuxInt = 0 |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 1 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPWU, types.TypeFlags) |
| v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64) |
| v3.AddArg(x) |
| v2.AddArg(v3) |
| v4 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64) |
| v4.AddArg(y) |
| v2.AddArg(v4) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpLoad_0(v *Value) bool { |
| // match: (Load <t> ptr mem) |
| // cond: (is64BitInt(t) || isPtr(t)) |
| // result: (MOVDload ptr mem) |
| for { |
| t := v.Type |
| _ = v.Args[1] |
| ptr := v.Args[0] |
| mem := v.Args[1] |
| if !(is64BitInt(t) || isPtr(t)) { |
| break |
| } |
| v.reset(OpS390XMOVDload) |
| v.AddArg(ptr) |
| v.AddArg(mem) |
| return true |
| } |
| // match: (Load <t> ptr mem) |
| // cond: is32BitInt(t) && isSigned(t) |
| // result: (MOVWload ptr mem) |
| for { |
| t := v.Type |
| _ = v.Args[1] |
| ptr := v.Args[0] |
| mem := v.Args[1] |
| if !(is32BitInt(t) && isSigned(t)) { |
| break |
| } |
| v.reset(OpS390XMOVWload) |
| v.AddArg(ptr) |
| v.AddArg(mem) |
| return true |
| } |
| // match: (Load <t> ptr mem) |
| // cond: is32BitInt(t) && !isSigned(t) |
| // result: (MOVWZload ptr mem) |
| for { |
| t := v.Type |
| _ = v.Args[1] |
| ptr := v.Args[0] |
| mem := v.Args[1] |
| if !(is32BitInt(t) && !isSigned(t)) { |
| break |
| } |
| v.reset(OpS390XMOVWZload) |
| v.AddArg(ptr) |
| v.AddArg(mem) |
| return true |
| } |
| // match: (Load <t> ptr mem) |
| // cond: is16BitInt(t) && isSigned(t) |
| // result: (MOVHload ptr mem) |
| for { |
| t := v.Type |
| _ = v.Args[1] |
| ptr := v.Args[0] |
| mem := v.Args[1] |
| if !(is16BitInt(t) && isSigned(t)) { |
| break |
| } |
| v.reset(OpS390XMOVHload) |
| v.AddArg(ptr) |
| v.AddArg(mem) |
| return true |
| } |
| // match: (Load <t> ptr mem) |
| // cond: is16BitInt(t) && !isSigned(t) |
| // result: (MOVHZload ptr mem) |
| for { |
| t := v.Type |
| _ = v.Args[1] |
| ptr := v.Args[0] |
| mem := v.Args[1] |
| if !(is16BitInt(t) && !isSigned(t)) { |
| break |
| } |
| v.reset(OpS390XMOVHZload) |
| v.AddArg(ptr) |
| v.AddArg(mem) |
| return true |
| } |
| // match: (Load <t> ptr mem) |
| // cond: is8BitInt(t) && isSigned(t) |
| // result: (MOVBload ptr mem) |
| for { |
| t := v.Type |
| _ = v.Args[1] |
| ptr := v.Args[0] |
| mem := v.Args[1] |
| if !(is8BitInt(t) && isSigned(t)) { |
| break |
| } |
| v.reset(OpS390XMOVBload) |
| v.AddArg(ptr) |
| v.AddArg(mem) |
| return true |
| } |
| // match: (Load <t> ptr mem) |
| // cond: (t.IsBoolean() || (is8BitInt(t) && !isSigned(t))) |
| // result: (MOVBZload ptr mem) |
| for { |
| t := v.Type |
| _ = v.Args[1] |
| ptr := v.Args[0] |
| mem := v.Args[1] |
| if !(t.IsBoolean() || (is8BitInt(t) && !isSigned(t))) { |
| break |
| } |
| v.reset(OpS390XMOVBZload) |
| v.AddArg(ptr) |
| v.AddArg(mem) |
| return true |
| } |
| // match: (Load <t> ptr mem) |
| // cond: is32BitFloat(t) |
| // result: (FMOVSload ptr mem) |
| for { |
| t := v.Type |
| _ = v.Args[1] |
| ptr := v.Args[0] |
| mem := v.Args[1] |
| if !(is32BitFloat(t)) { |
| break |
| } |
| v.reset(OpS390XFMOVSload) |
| v.AddArg(ptr) |
| v.AddArg(mem) |
| return true |
| } |
| // match: (Load <t> ptr mem) |
| // cond: is64BitFloat(t) |
| // result: (FMOVDload ptr mem) |
| for { |
| t := v.Type |
| _ = v.Args[1] |
| ptr := v.Args[0] |
| mem := v.Args[1] |
| if !(is64BitFloat(t)) { |
| break |
| } |
| v.reset(OpS390XFMOVDload) |
| v.AddArg(ptr) |
| v.AddArg(mem) |
| return true |
| } |
| return false |
| } |
| func rewriteValueS390X_OpLocalAddr_0(v *Value) bool { |
| // match: (LocalAddr {sym} base _) |
| // cond: |
| // result: (MOVDaddr {sym} base) |
| for { |
| sym := v.Aux |
| _ = v.Args[1] |
| base := v.Args[0] |
| v.reset(OpS390XMOVDaddr) |
| v.Aux = sym |
| v.AddArg(base) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpLsh16x16_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Lsh16x16 x y) |
| // cond: shiftIsBounded(v) |
| // result: (SLW x y) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| if !(shiftIsBounded(v)) { |
| break |
| } |
| v.reset(OpS390XSLW) |
| v.AddArg(x) |
| v.AddArg(y) |
| return true |
| } |
| // match: (Lsh16x16 <t> x y) |
| // cond: |
| // result: (MOVDGE <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64])) |
| for { |
| t := v.Type |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDGE) |
| v.Type = t |
| v0 := b.NewValue0(v.Pos, OpS390XSLW, t) |
| v0.AddArg(x) |
| v0.AddArg(y) |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 0 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) |
| v2.AuxInt = 64 |
| v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64) |
| v3.AddArg(y) |
| v2.AddArg(v3) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpLsh16x32_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Lsh16x32 x y) |
| // cond: shiftIsBounded(v) |
| // result: (SLW x y) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| if !(shiftIsBounded(v)) { |
| break |
| } |
| v.reset(OpS390XSLW) |
| v.AddArg(x) |
| v.AddArg(y) |
| return true |
| } |
| // match: (Lsh16x32 <t> x y) |
| // cond: |
| // result: (MOVDGE <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst y [64])) |
| for { |
| t := v.Type |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDGE) |
| v.Type = t |
| v0 := b.NewValue0(v.Pos, OpS390XSLW, t) |
| v0.AddArg(x) |
| v0.AddArg(y) |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 0 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) |
| v2.AuxInt = 64 |
| v2.AddArg(y) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpLsh16x64_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Lsh16x64 x y) |
| // cond: shiftIsBounded(v) |
| // result: (SLW x y) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| if !(shiftIsBounded(v)) { |
| break |
| } |
| v.reset(OpS390XSLW) |
| v.AddArg(x) |
| v.AddArg(y) |
| return true |
| } |
| // match: (Lsh16x64 <t> x y) |
| // cond: |
| // result: (MOVDGE <t> (SLW <t> x y) (MOVDconst [0]) (CMPUconst y [64])) |
| for { |
| t := v.Type |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDGE) |
| v.Type = t |
| v0 := b.NewValue0(v.Pos, OpS390XSLW, t) |
| v0.AddArg(x) |
| v0.AddArg(y) |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 0 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags) |
| v2.AuxInt = 64 |
| v2.AddArg(y) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpLsh16x8_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Lsh16x8 x y) |
| // cond: shiftIsBounded(v) |
| // result: (SLW x y) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| if !(shiftIsBounded(v)) { |
| break |
| } |
| v.reset(OpS390XSLW) |
| v.AddArg(x) |
| v.AddArg(y) |
| return true |
| } |
| // match: (Lsh16x8 <t> x y) |
| // cond: |
| // result: (MOVDGE <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64])) |
| for { |
| t := v.Type |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDGE) |
| v.Type = t |
| v0 := b.NewValue0(v.Pos, OpS390XSLW, t) |
| v0.AddArg(x) |
| v0.AddArg(y) |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 0 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) |
| v2.AuxInt = 64 |
| v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64) |
| v3.AddArg(y) |
| v2.AddArg(v3) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpLsh32x16_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Lsh32x16 x y) |
| // cond: shiftIsBounded(v) |
| // result: (SLW x y) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| if !(shiftIsBounded(v)) { |
| break |
| } |
| v.reset(OpS390XSLW) |
| v.AddArg(x) |
| v.AddArg(y) |
| return true |
| } |
| // match: (Lsh32x16 <t> x y) |
| // cond: |
| // result: (MOVDGE <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64])) |
| for { |
| t := v.Type |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDGE) |
| v.Type = t |
| v0 := b.NewValue0(v.Pos, OpS390XSLW, t) |
| v0.AddArg(x) |
| v0.AddArg(y) |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 0 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) |
| v2.AuxInt = 64 |
| v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64) |
| v3.AddArg(y) |
| v2.AddArg(v3) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpLsh32x32_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Lsh32x32 x y) |
| // cond: shiftIsBounded(v) |
| // result: (SLW x y) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| if !(shiftIsBounded(v)) { |
| break |
| } |
| v.reset(OpS390XSLW) |
| v.AddArg(x) |
| v.AddArg(y) |
| return true |
| } |
| // match: (Lsh32x32 <t> x y) |
| // cond: |
| // result: (MOVDGE <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst y [64])) |
| for { |
| t := v.Type |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDGE) |
| v.Type = t |
| v0 := b.NewValue0(v.Pos, OpS390XSLW, t) |
| v0.AddArg(x) |
| v0.AddArg(y) |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 0 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) |
| v2.AuxInt = 64 |
| v2.AddArg(y) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpLsh32x64_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Lsh32x64 x y) |
| // cond: shiftIsBounded(v) |
| // result: (SLW x y) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| if !(shiftIsBounded(v)) { |
| break |
| } |
| v.reset(OpS390XSLW) |
| v.AddArg(x) |
| v.AddArg(y) |
| return true |
| } |
| // match: (Lsh32x64 <t> x y) |
| // cond: |
| // result: (MOVDGE <t> (SLW <t> x y) (MOVDconst [0]) (CMPUconst y [64])) |
| for { |
| t := v.Type |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDGE) |
| v.Type = t |
| v0 := b.NewValue0(v.Pos, OpS390XSLW, t) |
| v0.AddArg(x) |
| v0.AddArg(y) |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 0 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags) |
| v2.AuxInt = 64 |
| v2.AddArg(y) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpLsh32x8_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Lsh32x8 x y) |
| // cond: shiftIsBounded(v) |
| // result: (SLW x y) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| if !(shiftIsBounded(v)) { |
| break |
| } |
| v.reset(OpS390XSLW) |
| v.AddArg(x) |
| v.AddArg(y) |
| return true |
| } |
| // match: (Lsh32x8 <t> x y) |
| // cond: |
| // result: (MOVDGE <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64])) |
| for { |
| t := v.Type |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDGE) |
| v.Type = t |
| v0 := b.NewValue0(v.Pos, OpS390XSLW, t) |
| v0.AddArg(x) |
| v0.AddArg(y) |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 0 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) |
| v2.AuxInt = 64 |
| v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64) |
| v3.AddArg(y) |
| v2.AddArg(v3) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpLsh64x16_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Lsh64x16 x y) |
| // cond: shiftIsBounded(v) |
| // result: (SLD x y) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| if !(shiftIsBounded(v)) { |
| break |
| } |
| v.reset(OpS390XSLD) |
| v.AddArg(x) |
| v.AddArg(y) |
| return true |
| } |
| // match: (Lsh64x16 <t> x y) |
| // cond: |
| // result: (MOVDGE <t> (SLD <t> x y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64])) |
| for { |
| t := v.Type |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDGE) |
| v.Type = t |
| v0 := b.NewValue0(v.Pos, OpS390XSLD, t) |
| v0.AddArg(x) |
| v0.AddArg(y) |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 0 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) |
| v2.AuxInt = 64 |
| v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64) |
| v3.AddArg(y) |
| v2.AddArg(v3) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpLsh64x32_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Lsh64x32 x y) |
| // cond: shiftIsBounded(v) |
| // result: (SLD x y) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| if !(shiftIsBounded(v)) { |
| break |
| } |
| v.reset(OpS390XSLD) |
| v.AddArg(x) |
| v.AddArg(y) |
| return true |
| } |
| // match: (Lsh64x32 <t> x y) |
| // cond: |
| // result: (MOVDGE <t> (SLD <t> x y) (MOVDconst [0]) (CMPWUconst y [64])) |
| for { |
| t := v.Type |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDGE) |
| v.Type = t |
| v0 := b.NewValue0(v.Pos, OpS390XSLD, t) |
| v0.AddArg(x) |
| v0.AddArg(y) |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 0 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) |
| v2.AuxInt = 64 |
| v2.AddArg(y) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpLsh64x64_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Lsh64x64 x y) |
| // cond: shiftIsBounded(v) |
| // result: (SLD x y) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| if !(shiftIsBounded(v)) { |
| break |
| } |
| v.reset(OpS390XSLD) |
| v.AddArg(x) |
| v.AddArg(y) |
| return true |
| } |
| // match: (Lsh64x64 <t> x y) |
| // cond: |
| // result: (MOVDGE <t> (SLD <t> x y) (MOVDconst [0]) (CMPUconst y [64])) |
| for { |
| t := v.Type |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDGE) |
| v.Type = t |
| v0 := b.NewValue0(v.Pos, OpS390XSLD, t) |
| v0.AddArg(x) |
| v0.AddArg(y) |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 0 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags) |
| v2.AuxInt = 64 |
| v2.AddArg(y) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpLsh64x8_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Lsh64x8 x y) |
| // cond: shiftIsBounded(v) |
| // result: (SLD x y) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| if !(shiftIsBounded(v)) { |
| break |
| } |
| v.reset(OpS390XSLD) |
| v.AddArg(x) |
| v.AddArg(y) |
| return true |
| } |
| // match: (Lsh64x8 <t> x y) |
| // cond: |
| // result: (MOVDGE <t> (SLD <t> x y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64])) |
| for { |
| t := v.Type |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDGE) |
| v.Type = t |
| v0 := b.NewValue0(v.Pos, OpS390XSLD, t) |
| v0.AddArg(x) |
| v0.AddArg(y) |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 0 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) |
| v2.AuxInt = 64 |
| v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64) |
| v3.AddArg(y) |
| v2.AddArg(v3) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpLsh8x16_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Lsh8x16 x y) |
| // cond: shiftIsBounded(v) |
| // result: (SLW x y) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| if !(shiftIsBounded(v)) { |
| break |
| } |
| v.reset(OpS390XSLW) |
| v.AddArg(x) |
| v.AddArg(y) |
| return true |
| } |
| // match: (Lsh8x16 <t> x y) |
| // cond: |
| // result: (MOVDGE <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64])) |
| for { |
| t := v.Type |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDGE) |
| v.Type = t |
| v0 := b.NewValue0(v.Pos, OpS390XSLW, t) |
| v0.AddArg(x) |
| v0.AddArg(y) |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 0 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) |
| v2.AuxInt = 64 |
| v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64) |
| v3.AddArg(y) |
| v2.AddArg(v3) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpLsh8x32_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Lsh8x32 x y) |
| // cond: shiftIsBounded(v) |
| // result: (SLW x y) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| if !(shiftIsBounded(v)) { |
| break |
| } |
| v.reset(OpS390XSLW) |
| v.AddArg(x) |
| v.AddArg(y) |
| return true |
| } |
| // match: (Lsh8x32 <t> x y) |
| // cond: |
| // result: (MOVDGE <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst y [64])) |
| for { |
| t := v.Type |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDGE) |
| v.Type = t |
| v0 := b.NewValue0(v.Pos, OpS390XSLW, t) |
| v0.AddArg(x) |
| v0.AddArg(y) |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 0 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) |
| v2.AuxInt = 64 |
| v2.AddArg(y) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpLsh8x64_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Lsh8x64 x y) |
| // cond: shiftIsBounded(v) |
| // result: (SLW x y) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| if !(shiftIsBounded(v)) { |
| break |
| } |
| v.reset(OpS390XSLW) |
| v.AddArg(x) |
| v.AddArg(y) |
| return true |
| } |
| // match: (Lsh8x64 <t> x y) |
| // cond: |
| // result: (MOVDGE <t> (SLW <t> x y) (MOVDconst [0]) (CMPUconst y [64])) |
| for { |
| t := v.Type |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDGE) |
| v.Type = t |
| v0 := b.NewValue0(v.Pos, OpS390XSLW, t) |
| v0.AddArg(x) |
| v0.AddArg(y) |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 0 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags) |
| v2.AuxInt = 64 |
| v2.AddArg(y) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpLsh8x8_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Lsh8x8 x y) |
| // cond: shiftIsBounded(v) |
| // result: (SLW x y) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| if !(shiftIsBounded(v)) { |
| break |
| } |
| v.reset(OpS390XSLW) |
| v.AddArg(x) |
| v.AddArg(y) |
| return true |
| } |
| // match: (Lsh8x8 <t> x y) |
| // cond: |
| // result: (MOVDGE <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64])) |
| for { |
| t := v.Type |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMOVDGE) |
| v.Type = t |
| v0 := b.NewValue0(v.Pos, OpS390XSLW, t) |
| v0.AddArg(x) |
| v0.AddArg(y) |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) |
| v1.AuxInt = 0 |
| v.AddArg(v1) |
| v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) |
| v2.AuxInt = 64 |
| v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64) |
| v3.AddArg(y) |
| v2.AddArg(v3) |
| v.AddArg(v2) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpMod16_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Mod16 x y) |
| // cond: |
| // result: (MODW (MOVHreg x) (MOVHreg y)) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMODW) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64) |
| v0.AddArg(x) |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64) |
| v1.AddArg(y) |
| v.AddArg(v1) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpMod16u_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Mod16u x y) |
| // cond: |
| // result: (MODWU (MOVHZreg x) (MOVHZreg y)) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMODWU) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64) |
| v0.AddArg(x) |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64) |
| v1.AddArg(y) |
| v.AddArg(v1) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpMod32_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Mod32 x y) |
| // cond: |
| // result: (MODW (MOVWreg x) y) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMODW) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVWreg, typ.Int64) |
| v0.AddArg(x) |
| v.AddArg(v0) |
| v.AddArg(y) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpMod32u_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Mod32u x y) |
| // cond: |
| // result: (MODWU (MOVWZreg x) y) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMODWU) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVWZreg, typ.UInt64) |
| v0.AddArg(x) |
| v.AddArg(v0) |
| v.AddArg(y) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpMod64_0(v *Value) bool { |
| // match: (Mod64 x y) |
| // cond: |
| // result: (MODD x y) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMODD) |
| v.AddArg(x) |
| v.AddArg(y) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpMod64u_0(v *Value) bool { |
| // match: (Mod64u x y) |
| // cond: |
| // result: (MODDU x y) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMODDU) |
| v.AddArg(x) |
| v.AddArg(y) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpMod8_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Mod8 x y) |
| // cond: |
| // result: (MODW (MOVBreg x) (MOVBreg y)) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMODW) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64) |
| v0.AddArg(x) |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64) |
| v1.AddArg(y) |
| v.AddArg(v1) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpMod8u_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Mod8u x y) |
| // cond: |
| // result: (MODWU (MOVBZreg x) (MOVBZreg y)) |
| for { |
| _ = v.Args[1] |
| x := v.Args[0] |
| y := v.Args[1] |
| v.reset(OpS390XMODWU) |
| v0 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64) |
| v0.AddArg(x) |
| v.AddArg(v0) |
| v1 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64) |
| v1.AddArg(y) |
| v.AddArg(v1) |
| return true |
| } |
| } |
| func rewriteValueS390X_OpMove_0(v *Value) bool { |
| b := v.Block |
| _ = b |
| typ := &b.Func.Config.Types |
| _ = typ |
| // match: (Move [0] _ _ mem) |
| // cond: |
| // result: mem |
| for { |
| if v.AuxInt != 0 { |
| break |
| } |
| _ = v.Args[2] |
| mem := v.Args[2] |
| v.reset(OpCopy) |
| v.Type = mem.Type |
| v.AddArg(mem) |
| return true |
| } |
| // match: (Move [1] dst src mem) |
| // cond: |
| // result: (MOVBstore dst (MOVBZload src mem) mem) |
| for { |
| if v.AuxInt != 1 { |
| break |
| } |
| _ = v.Args[2] |
| dst := v.Args[0] |
| src := v.Args[1] |
| mem := v.Args[2] |
| v.reset(OpS390XMOVBstore) |
| v.AddArg(dst) |
| |