HELLO·Android
系统源代码
IT资讯
技术文章
我的收藏
注册
登录
-
我收藏的文章
创建代码块
我的代码块
我的账号
Pie
|
9.0.0_r8
下载
查看原文件
收藏
根目录
prebuilts
go
darwin-x86
src
cmd
compile
internal
ssa
rewriteS390X.go
// Code generated from gen/S390X.rules; DO NOT EDIT. // generated with: cd gen; go run *.go package ssa import "math" import "cmd/internal/obj" import "cmd/internal/objabi" import "cmd/compile/internal/types" 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 OpConvert: return rewriteValueS390X_OpConvert_0(v) case OpCtz32: return rewriteValueS390X_OpCtz32_0(v) case OpCtz64: return rewriteValueS390X_OpCtz64_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 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 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 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) 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) 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) 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 OpS390XSLD: return rewriteValueS390X_OpS390XSLD_0(v) case OpS390XSLW: return rewriteValueS390X_OpS390XSLW_0(v) case OpS390XSRAD: return rewriteValueS390X_OpS390XSRAD_0(v) case OpS390XSRADconst: return rewriteValueS390X_OpS390XSRADconst_0(v) case OpS390XSRAW: return rewriteValueS390X_OpS390XSRAW_0(v) case OpS390XSRAWconst: return rewriteValueS390X_OpS390XSRAWconst_0(v) case OpS390XSRD: return rewriteValueS390X_OpS390XSRD_0(v) case OpS390XSRDconst: return rewriteValueS390X_OpS390XSRDconst_0(v) case OpS390XSRW: return rewriteValueS390X_OpS390XSRW_0(v) case OpS390XSTM2: return rewriteValueS390X_OpS390XSTM2_0(v) case OpS390XSTMG2: return rewriteValueS390X_OpS390XSTMG2_0(v) case OpS390XSUB: return rewriteValueS390X_OpS390XSUB_0(v) case OpS390XSUBEWcarrymask: return rewriteValueS390X_OpS390XSUBEWcarrymask_0(v) case OpS390XSUBEcarrymask: return rewriteValueS390X_OpS390XSUBEcarrymask_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 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 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
x y) // cond: // result: (ADD (SRDconst
(SUB
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_OpConvert_0(v *Value) bool { // match: (Convert
x mem) // cond: // result: (MOVDconvert
x mem) for { t := v.Type _ = v.Args[1] x := v.Args[0] mem := v.Args[1] v.reset(OpS390XMOVDconvert) v.Type = t v.AddArg(x) v.AddArg(mem) return true } } func rewriteValueS390X_OpCtz32_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (Ctz32
x) // cond: // result: (SUB (MOVDconst [64]) (FLOGR (MOVWZreg (ANDW
(SUBWconst
[1] x) (NOTW
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_OpCtz64_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (Ctz64
x) // cond: // result: (SUB (MOVDconst [64]) (FLOGR (AND
(SUBconst
[1] x) (NOT
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_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]) (CMP (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, OpS390XCMP, 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]) (CMP (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, OpS390XCMP, 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]) (CMP (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, OpS390XCMP, 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]) (CMP (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, OpS390XCMP, 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]) (CMPU (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, OpS390XCMPU, 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]) (CMP (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, OpS390XCMP, 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]) (CMPU (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, OpS390XCMPU, 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_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]) (CMP (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, OpS390XCMP, 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]) (CMPU (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, OpS390XCMPU, 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]) (CMP (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, OpS390XCMP, 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]) (CMPU (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, OpS390XCMPU, 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]) (CMP (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, OpS390XCMP, 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]) (CMPU (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, OpS390XCMPU, 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]) (CMP (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, OpS390XCMP, 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]) (CMPU (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, OpS390XCMPU, 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]) (CMP (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, OpS390XCMP, 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]) (CMPU (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, OpS390XCMPU, 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]) (CMP (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, OpS390XCMP, 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]) (CMPU (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, OpS390XCMPU, 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
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
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
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
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
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
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
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
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
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_OpLsh16x16_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (Lsh16x16
x y) // cond: // result: (ANDW (SLW
x y) (SUBEWcarrymask
(CMPWUconst (MOVHZreg y) [31]))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XANDW) v0 := b.NewValue0(v.Pos, OpS390XSLW, t) v0.AddArg(x) v0.AddArg(y) v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t) v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) v2.AuxInt = 31 v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64) v3.AddArg(y) v2.AddArg(v3) v1.AddArg(v2) v.AddArg(v1) return true } } func rewriteValueS390X_OpLsh16x32_0(v *Value) bool { b := v.Block _ = b // match: (Lsh16x32
x y) // cond: // result: (ANDW (SLW
x y) (SUBEWcarrymask
(CMPWUconst y [31]))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XANDW) v0 := b.NewValue0(v.Pos, OpS390XSLW, t) v0.AddArg(x) v0.AddArg(y) v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t) v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) v2.AuxInt = 31 v2.AddArg(y) v1.AddArg(v2) v.AddArg(v1) return true } } func rewriteValueS390X_OpLsh16x64_0(v *Value) bool { b := v.Block _ = b // match: (Lsh16x64
x y) // cond: // result: (ANDW (SLW
x y) (SUBEWcarrymask
(CMPUconst y [31]))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XANDW) v0 := b.NewValue0(v.Pos, OpS390XSLW, t) v0.AddArg(x) v0.AddArg(y) v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t) v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags) v2.AuxInt = 31 v2.AddArg(y) v1.AddArg(v2) v.AddArg(v1) return true } } func rewriteValueS390X_OpLsh16x8_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (Lsh16x8
x y) // cond: // result: (ANDW (SLW
x y) (SUBEWcarrymask
(CMPWUconst (MOVBZreg y) [31]))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XANDW) v0 := b.NewValue0(v.Pos, OpS390XSLW, t) v0.AddArg(x) v0.AddArg(y) v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t) v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) v2.AuxInt = 31 v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64) v3.AddArg(y) v2.AddArg(v3) v1.AddArg(v2) v.AddArg(v1) return true } } func rewriteValueS390X_OpLsh32x16_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (Lsh32x16
x y) // cond: // result: (ANDW (SLW
x y) (SUBEWcarrymask
(CMPWUconst (MOVHZreg y) [31]))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XANDW) v0 := b.NewValue0(v.Pos, OpS390XSLW, t) v0.AddArg(x) v0.AddArg(y) v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t) v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) v2.AuxInt = 31 v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64) v3.AddArg(y) v2.AddArg(v3) v1.AddArg(v2) v.AddArg(v1) return true } } func rewriteValueS390X_OpLsh32x32_0(v *Value) bool { b := v.Block _ = b // match: (Lsh32x32
x y) // cond: // result: (ANDW (SLW
x y) (SUBEWcarrymask
(CMPWUconst y [31]))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XANDW) v0 := b.NewValue0(v.Pos, OpS390XSLW, t) v0.AddArg(x) v0.AddArg(y) v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t) v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) v2.AuxInt = 31 v2.AddArg(y) v1.AddArg(v2) v.AddArg(v1) return true } } func rewriteValueS390X_OpLsh32x64_0(v *Value) bool { b := v.Block _ = b // match: (Lsh32x64
x y) // cond: // result: (ANDW (SLW
x y) (SUBEWcarrymask
(CMPUconst y [31]))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XANDW) v0 := b.NewValue0(v.Pos, OpS390XSLW, t) v0.AddArg(x) v0.AddArg(y) v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t) v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags) v2.AuxInt = 31 v2.AddArg(y) v1.AddArg(v2) v.AddArg(v1) return true } } func rewriteValueS390X_OpLsh32x8_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (Lsh32x8
x y) // cond: // result: (ANDW (SLW
x y) (SUBEWcarrymask
(CMPWUconst (MOVBZreg y) [31]))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XANDW) v0 := b.NewValue0(v.Pos, OpS390XSLW, t) v0.AddArg(x) v0.AddArg(y) v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t) v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) v2.AuxInt = 31 v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64) v3.AddArg(y) v2.AddArg(v3) v1.AddArg(v2) v.AddArg(v1) return true } } func rewriteValueS390X_OpLsh64x16_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (Lsh64x16
x y) // cond: // result: (AND (SLD
x y) (SUBEcarrymask
(CMPWUconst (MOVHZreg y) [63]))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XAND) v0 := b.NewValue0(v.Pos, OpS390XSLD, t) v0.AddArg(x) v0.AddArg(y) v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpS390XSUBEcarrymask, t) v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) v2.AuxInt = 63 v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64) v3.AddArg(y) v2.AddArg(v3) v1.AddArg(v2) v.AddArg(v1) return true } } func rewriteValueS390X_OpLsh64x32_0(v *Value) bool { b := v.Block _ = b // match: (Lsh64x32
x y) // cond: // result: (AND (SLD
x y) (SUBEcarrymask
(CMPWUconst y [63]))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XAND) v0 := b.NewValue0(v.Pos, OpS390XSLD, t) v0.AddArg(x) v0.AddArg(y) v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpS390XSUBEcarrymask, t) v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) v2.AuxInt = 63 v2.AddArg(y) v1.AddArg(v2) v.AddArg(v1) return true } } func rewriteValueS390X_OpLsh64x64_0(v *Value) bool { b := v.Block _ = b // match: (Lsh64x64
x y) // cond: // result: (AND (SLD
x y) (SUBEcarrymask
(CMPUconst y [63]))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XAND) v0 := b.NewValue0(v.Pos, OpS390XSLD, t) v0.AddArg(x) v0.AddArg(y) v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpS390XSUBEcarrymask, t) v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags) v2.AuxInt = 63 v2.AddArg(y) v1.AddArg(v2) v.AddArg(v1) return true } } func rewriteValueS390X_OpLsh64x8_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (Lsh64x8
x y) // cond: // result: (AND (SLD
x y) (SUBEcarrymask
(CMPWUconst (MOVBZreg y) [63]))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XAND) v0 := b.NewValue0(v.Pos, OpS390XSLD, t) v0.AddArg(x) v0.AddArg(y) v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpS390XSUBEcarrymask, t) v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) v2.AuxInt = 63 v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64) v3.AddArg(y) v2.AddArg(v3) v1.AddArg(v2) v.AddArg(v1) return true } } func rewriteValueS390X_OpLsh8x16_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (Lsh8x16
x y) // cond: // result: (ANDW (SLW
x y) (SUBEWcarrymask
(CMPWUconst (MOVHZreg y) [31]))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XANDW) v0 := b.NewValue0(v.Pos, OpS390XSLW, t) v0.AddArg(x) v0.AddArg(y) v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t) v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) v2.AuxInt = 31 v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64) v3.AddArg(y) v2.AddArg(v3) v1.AddArg(v2) v.AddArg(v1) return true } } func rewriteValueS390X_OpLsh8x32_0(v *Value) bool { b := v.Block _ = b // match: (Lsh8x32
x y) // cond: // result: (ANDW (SLW
x y) (SUBEWcarrymask
(CMPWUconst y [31]))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XANDW) v0 := b.NewValue0(v.Pos, OpS390XSLW, t) v0.AddArg(x) v0.AddArg(y) v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t) v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) v2.AuxInt = 31 v2.AddArg(y) v1.AddArg(v2) v.AddArg(v1) return true } } func rewriteValueS390X_OpLsh8x64_0(v *Value) bool { b := v.Block _ = b // match: (Lsh8x64
x y) // cond: // result: (ANDW (SLW
x y) (SUBEWcarrymask
(CMPUconst y [31]))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XANDW) v0 := b.NewValue0(v.Pos, OpS390XSLW, t) v0.AddArg(x) v0.AddArg(y) v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t) v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags) v2.AuxInt = 31 v2.AddArg(y) v1.AddArg(v2) v.AddArg(v1) return true } } func rewriteValueS390X_OpLsh8x8_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (Lsh8x8
x y) // cond: // result: (ANDW (SLW
x y) (SUBEWcarrymask
(CMPWUconst (MOVBZreg y) [31]))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XANDW) v0 := b.NewValue0(v.Pos, OpS390XSLW, t) v0.AddArg(x) v0.AddArg(y) v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t) v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) v2.AuxInt = 31 v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64) v3.AddArg(y) v2.AddArg(v3) v1.AddArg(v2) v.AddArg(v1) 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) v0 := b.NewValue0(v.Pos, OpS390XMOVBZload, typ.UInt8) v0.AddArg(src) v0.AddArg(mem) v.AddArg(v0) v.AddArg(mem) return true } // match: (Move [2] dst src mem) // cond: // result: (MOVHstore dst (MOVHZload src mem) mem) for { if v.AuxInt != 2 { break } _ = v.Args[2] dst := v.Args[0] src := v.Args[1] mem := v.Args[2] v.reset(OpS390XMOVHstore) v.AddArg(dst) v0 := b.NewValue0(v.Pos, OpS390XMOVHZload, typ.UInt16) v0.AddArg(src) v0.AddArg(mem) v.AddArg(v0) v.AddArg(mem) return true } // match: (Move [4] dst src mem) // cond: // result: (MOVWstore dst (MOVWZload src mem) mem) for { if v.AuxInt != 4 { break } _ = v.Args[2] dst := v.Args[0] src := v.Args[1] mem := v.Args[2] v.reset(OpS390XMOVWstore) v.AddArg(dst) v0 := b.NewValue0(v.Pos, OpS390XMOVWZload, typ.UInt32) v0.AddArg(src) v0.AddArg(mem) v.AddArg(v0) v.AddArg(mem) return true } // match: (Move [8] dst src mem) // cond: // result: (MOVDstore dst (MOVDload src mem) mem) for { if v.AuxInt != 8 { break } _ = v.Args[2] dst := v.Args[0] src := v.Args[1] mem := v.Args[2] v.reset(OpS390XMOVDstore) v.AddArg(dst) v0 := b.NewValue0(v.Pos, OpS390XMOVDload, typ.UInt64) v0.AddArg(src) v0.AddArg(mem) v.AddArg(v0) v.AddArg(mem) return true } // match: (Move [16] dst src mem) // cond: // result: (MOVDstore [8] dst (MOVDload [8] src mem) (MOVDstore dst (MOVDload src mem) mem)) for { if v.AuxInt != 16 { break } _ = v.Args[2] dst := v.Args[0] src := v.Args[1] mem := v.Args[2] v.reset(OpS390XMOVDstore) v.AuxInt = 8 v.AddArg(dst) v0 := b.NewValue0(v.Pos, OpS390XMOVDload, typ.UInt64) v0.AuxInt = 8 v0.AddArg(src) v0.AddArg(mem) v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpS390XMOVDstore, types.TypeMem) v1.AddArg(dst) v2 := b.NewValue0(v.Pos, OpS390XMOVDload, typ.UInt64) v2.AddArg(src) v2.AddArg(mem) v1.AddArg(v2) v1.AddArg(mem) v.AddArg(v1) return true } // match: (Move [24] dst src mem) // cond: // result: (MOVDstore [16] dst (MOVDload [16] src mem) (MOVDstore [8] dst (MOVDload [8] src mem) (MOVDstore dst (MOVDload src mem) mem))) for { if v.AuxInt != 24 { break } _ = v.Args[2] dst := v.Args[0] src := v.Args[1] mem := v.Args[2] v.reset(OpS390XMOVDstore) v.AuxInt = 16 v.AddArg(dst) v0 := b.NewValue0(v.Pos, OpS390XMOVDload, typ.UInt64) v0.AuxInt = 16 v0.AddArg(src) v0.AddArg(mem) v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpS390XMOVDstore, types.TypeMem) v1.AuxInt = 8 v1.AddArg(dst) v2 := b.NewValue0(v.Pos, OpS390XMOVDload, typ.UInt64) v2.AuxInt = 8 v2.AddArg(src) v2.AddArg(mem) v1.AddArg(v2) v3 := b.NewValue0(v.Pos, OpS390XMOVDstore, types.TypeMem) v3.AddArg(dst) v4 := b.NewValue0(v.Pos, OpS390XMOVDload, typ.UInt64) v4.AddArg(src) v4.AddArg(mem) v3.AddArg(v4) v3.AddArg(mem) v1.AddArg(v3) v.AddArg(v1) return true } // match: (Move [3] dst src mem) // cond: // result: (MOVBstore [2] dst (MOVBZload [2] src mem) (MOVHstore dst (MOVHZload src mem) mem)) for { if v.AuxInt != 3 { break } _ = v.Args[2] dst := v.Args[0] src := v.Args[1] mem := v.Args[2] v.reset(OpS390XMOVBstore) v.AuxInt = 2 v.AddArg(dst) v0 := b.NewValue0(v.Pos, OpS390XMOVBZload, typ.UInt8) v0.AuxInt = 2 v0.AddArg(src) v0.AddArg(mem) v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpS390XMOVHstore, types.TypeMem) v1.AddArg(dst) v2 := b.NewValue0(v.Pos, OpS390XMOVHZload, typ.UInt16) v2.AddArg(src) v2.AddArg(mem) v1.AddArg(v2) v1.AddArg(mem) v.AddArg(v1) return true } // match: (Move [5] dst src mem) // cond: // result: (MOVBstore [4] dst (MOVBZload [4] src mem) (MOVWstore dst (MOVWZload src mem) mem)) for { if v.AuxInt != 5 { break } _ = v.Args[2] dst := v.Args[0] src := v.Args[1] mem := v.Args[2] v.reset(OpS390XMOVBstore) v.AuxInt = 4 v.AddArg(dst) v0 := b.NewValue0(v.Pos, OpS390XMOVBZload, typ.UInt8) v0.AuxInt = 4 v0.AddArg(src) v0.AddArg(mem) v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpS390XMOVWstore, types.TypeMem) v1.AddArg(dst) v2 := b.NewValue0(v.Pos, OpS390XMOVWZload, typ.UInt32) v2.AddArg(src) v2.AddArg(mem) v1.AddArg(v2) v1.AddArg(mem) v.AddArg(v1) return true } // match: (Move [6] dst src mem) // cond: // result: (MOVHstore [4] dst (MOVHZload [4] src mem) (MOVWstore dst (MOVWZload src mem) mem)) for { if v.AuxInt != 6 { break } _ = v.Args[2] dst := v.Args[0] src := v.Args[1] mem := v.Args[2] v.reset(OpS390XMOVHstore) v.AuxInt = 4 v.AddArg(dst) v0 := b.NewValue0(v.Pos, OpS390XMOVHZload, typ.UInt16) v0.AuxInt = 4 v0.AddArg(src) v0.AddArg(mem) v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpS390XMOVWstore, types.TypeMem) v1.AddArg(dst) v2 := b.NewValue0(v.Pos, OpS390XMOVWZload, typ.UInt32) v2.AddArg(src) v2.AddArg(mem) v1.AddArg(v2) v1.AddArg(mem) v.AddArg(v1) return true } return false } func rewriteValueS390X_OpMove_10(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (Move [7] dst src mem) // cond: // result: (MOVBstore [6] dst (MOVBZload [6] src mem) (MOVHstore [4] dst (MOVHZload [4] src mem) (MOVWstore dst (MOVWZload src mem) mem))) for { if v.AuxInt != 7 { break } _ = v.Args[2] dst := v.Args[0] src := v.Args[1] mem := v.Args[2] v.reset(OpS390XMOVBstore) v.AuxInt = 6 v.AddArg(dst) v0 := b.NewValue0(v.Pos, OpS390XMOVBZload, typ.UInt8) v0.AuxInt = 6 v0.AddArg(src) v0.AddArg(mem) v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpS390XMOVHstore, types.TypeMem) v1.AuxInt = 4 v1.AddArg(dst) v2 := b.NewValue0(v.Pos, OpS390XMOVHZload, typ.UInt16) v2.AuxInt = 4 v2.AddArg(src) v2.AddArg(mem) v1.AddArg(v2) v3 := b.NewValue0(v.Pos, OpS390XMOVWstore, types.TypeMem) v3.AddArg(dst) v4 := b.NewValue0(v.Pos, OpS390XMOVWZload, typ.UInt32) v4.AddArg(src) v4.AddArg(mem) v3.AddArg(v4) v3.AddArg(mem) v1.AddArg(v3) v.AddArg(v1) return true } // match: (Move [s] dst src mem) // cond: s > 0 && s <= 256 // result: (MVC [makeValAndOff(s, 0)] dst src mem) for { s := v.AuxInt _ = v.Args[2] dst := v.Args[0] src := v.Args[1] mem := v.Args[2] if !(s > 0 && s <= 256) { break } v.reset(OpS390XMVC) v.AuxInt = makeValAndOff(s, 0) v.AddArg(dst) v.AddArg(src) v.AddArg(mem) return true } // match: (Move [s] dst src mem) // cond: s > 256 && s <= 512 // result: (MVC [makeValAndOff(s-256, 256)] dst src (MVC [makeValAndOff(256, 0)] dst src mem)) for { s := v.AuxInt _ = v.Args[2] dst := v.Args[0] src := v.Args[1] mem := v.Args[2] if !(s > 256 && s <= 512) { break } v.reset(OpS390XMVC) v.AuxInt = makeValAndOff(s-256, 256) v.AddArg(dst) v.AddArg(src) v0 := b.NewValue0(v.Pos, OpS390XMVC, types.TypeMem) v0.AuxInt = makeValAndOff(256, 0) v0.AddArg(dst) v0.AddArg(src) v0.AddArg(mem) v.AddArg(v0) return true } // match: (Move [s] dst src mem) // cond: s > 512 && s <= 768 // result: (MVC [makeValAndOff(s-512, 512)] dst src (MVC [makeValAndOff(256, 256)] dst src (MVC [makeValAndOff(256, 0)] dst src mem))) for { s := v.AuxInt _ = v.Args[2] dst := v.Args[0] src := v.Args[1] mem := v.Args[2] if !(s > 512 && s <= 768) { break } v.reset(OpS390XMVC) v.AuxInt = makeValAndOff(s-512, 512) v.AddArg(dst) v.AddArg(src) v0 := b.NewValue0(v.Pos, OpS390XMVC, types.TypeMem) v0.AuxInt = makeValAndOff(256, 256) v0.AddArg(dst) v0.AddArg(src) v1 := b.NewValue0(v.Pos, OpS390XMVC, types.TypeMem) v1.AuxInt = makeValAndOff(256, 0) v1.AddArg(dst) v1.AddArg(src) v1.AddArg(mem) v0.AddArg(v1) v.AddArg(v0) return true } // match: (Move [s] dst src mem) // cond: s > 768 && s <= 1024 // result: (MVC [makeValAndOff(s-768, 768)] dst src (MVC [makeValAndOff(256, 512)] dst src (MVC [makeValAndOff(256, 256)] dst src (MVC [makeValAndOff(256, 0)] dst src mem)))) for { s := v.AuxInt _ = v.Args[2] dst := v.Args[0] src := v.Args[1] mem := v.Args[2] if !(s > 768 && s <= 1024) { break } v.reset(OpS390XMVC) v.AuxInt = makeValAndOff(s-768, 768) v.AddArg(dst) v.AddArg(src) v0 := b.NewValue0(v.Pos, OpS390XMVC, types.TypeMem) v0.AuxInt = makeValAndOff(256, 512) v0.AddArg(dst) v0.AddArg(src) v1 := b.NewValue0(v.Pos, OpS390XMVC, types.TypeMem) v1.AuxInt = makeValAndOff(256, 256) v1.AddArg(dst) v1.AddArg(src) v2 := b.NewValue0(v.Pos, OpS390XMVC, types.TypeMem) v2.AuxInt = makeValAndOff(256, 0) v2.AddArg(dst) v2.AddArg(src) v2.AddArg(mem) v1.AddArg(v2) v0.AddArg(v1) v.AddArg(v0) return true } // match: (Move [s] dst src mem) // cond: s > 1024 // result: (LoweredMove [s%256] dst src (ADDconst
src [(s/256)*256]) mem) for { s := v.AuxInt _ = v.Args[2] dst := v.Args[0] src := v.Args[1] mem := v.Args[2] if !(s > 1024) { break } v.reset(OpS390XLoweredMove) v.AuxInt = s % 256 v.AddArg(dst) v.AddArg(src) v0 := b.NewValue0(v.Pos, OpS390XADDconst, src.Type) v0.AuxInt = (s / 256) * 256 v0.AddArg(src) v.AddArg(v0) v.AddArg(mem) return true } return false } func rewriteValueS390X_OpMul16_0(v *Value) bool { // match: (Mul16 x y) // cond: // result: (MULLW x y) for { _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XMULLW) v.AddArg(x) v.AddArg(y) return true } } func rewriteValueS390X_OpMul32_0(v *Value) bool { // match: (Mul32 x y) // cond: // result: (MULLW x y) for { _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XMULLW) v.AddArg(x) v.AddArg(y) return true } } func rewriteValueS390X_OpMul32F_0(v *Value) bool { // match: (Mul32F x y) // cond: // result: (FMULS x y) for { _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XFMULS) v.AddArg(x) v.AddArg(y) return true } } func rewriteValueS390X_OpMul64_0(v *Value) bool { // match: (Mul64 x y) // cond: // result: (MULLD x y) for { _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XMULLD) v.AddArg(x) v.AddArg(y) return true } } func rewriteValueS390X_OpMul64F_0(v *Value) bool { // match: (Mul64F x y) // cond: // result: (FMUL x y) for { _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XFMUL) v.AddArg(x) v.AddArg(y) return true } } func rewriteValueS390X_OpMul8_0(v *Value) bool { // match: (Mul8 x y) // cond: // result: (MULLW x y) for { _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XMULLW) v.AddArg(x) v.AddArg(y) return true } } func rewriteValueS390X_OpNeg16_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (Neg16 x) // cond: // result: (NEGW (MOVHreg x)) for { x := v.Args[0] v.reset(OpS390XNEGW) v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64) v0.AddArg(x) v.AddArg(v0) return true } } func rewriteValueS390X_OpNeg32_0(v *Value) bool { // match: (Neg32 x) // cond: // result: (NEGW x) for { x := v.Args[0] v.reset(OpS390XNEGW) v.AddArg(x) return true } } func rewriteValueS390X_OpNeg32F_0(v *Value) bool { // match: (Neg32F x) // cond: // result: (FNEGS x) for { x := v.Args[0] v.reset(OpS390XFNEGS) v.AddArg(x) return true } } func rewriteValueS390X_OpNeg64_0(v *Value) bool { // match: (Neg64 x) // cond: // result: (NEG x) for { x := v.Args[0] v.reset(OpS390XNEG) v.AddArg(x) return true } } func rewriteValueS390X_OpNeg64F_0(v *Value) bool { // match: (Neg64F x) // cond: // result: (FNEG x) for { x := v.Args[0] v.reset(OpS390XFNEG) v.AddArg(x) return true } } func rewriteValueS390X_OpNeg8_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (Neg8 x) // cond: // result: (NEGW (MOVBreg x)) for { x := v.Args[0] v.reset(OpS390XNEGW) v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64) v0.AddArg(x) v.AddArg(v0) return true } } func rewriteValueS390X_OpNeq16_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (Neq16 x y) // cond: // result: (MOVDNE (MOVDconst [0]) (MOVDconst [1]) (CMP (MOVHreg x) (MOVHreg y))) for { _ = v.Args[1] x := v.Args[0] y := v.Args[1] 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, OpS390XCMP, 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_OpNeq32_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (Neq32 x y) // cond: // result: (MOVDNE (MOVDconst [0]) (MOVDconst [1]) (CMPW x y)) for { _ = v.Args[1] x := v.Args[0] y := v.Args[1] 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, OpS390XCMPW, types.TypeFlags) v2.AddArg(x) v2.AddArg(y) v.AddArg(v2) return true } } func rewriteValueS390X_OpNeq32F_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (Neq32F x y) // cond: // result: (MOVDNE (MOVDconst [0]) (MOVDconst [1]) (FCMPS x y)) for { _ = v.Args[1] x := v.Args[0] y := v.Args[1] 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, OpS390XFCMPS, types.TypeFlags) v2.AddArg(x) v2.AddArg(y) v.AddArg(v2) return true } } func rewriteValueS390X_OpNeq64_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (Neq64 x y) // cond: // result: (MOVDNE (MOVDconst [0]) (MOVDconst [1]) (CMP x y)) for { _ = v.Args[1] x := v.Args[0] y := v.Args[1] 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, OpS390XCMP, types.TypeFlags) v2.AddArg(x) v2.AddArg(y) v.AddArg(v2) return true } } func rewriteValueS390X_OpNeq64F_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (Neq64F x y) // cond: // result: (MOVDNE (MOVDconst [0]) (MOVDconst [1]) (FCMP x y)) for { _ = v.Args[1] x := v.Args[0] y := v.Args[1] 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, OpS390XFCMP, types.TypeFlags) v2.AddArg(x) v2.AddArg(y) v.AddArg(v2) return true } } func rewriteValueS390X_OpNeq8_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (Neq8 x y) // cond: // result: (MOVDNE (MOVDconst [0]) (MOVDconst [1]) (CMP (MOVBreg x) (MOVBreg y))) for { _ = v.Args[1] x := v.Args[0] y := v.Args[1] 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, OpS390XCMP, 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_OpNeqB_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (NeqB x y) // cond: // result: (MOVDNE (MOVDconst [0]) (MOVDconst [1]) (CMP (MOVBreg x) (MOVBreg y))) for { _ = v.Args[1] x := v.Args[0] y := v.Args[1] 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, OpS390XCMP, 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_OpNeqPtr_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (NeqPtr x y) // cond: // result: (MOVDNE (MOVDconst [0]) (MOVDconst [1]) (CMP x y)) for { _ = v.Args[1] x := v.Args[0] y := v.Args[1] 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, OpS390XCMP, types.TypeFlags) v2.AddArg(x) v2.AddArg(y) v.AddArg(v2) return true } } func rewriteValueS390X_OpNilCheck_0(v *Value) bool { // match: (NilCheck ptr mem) // cond: // result: (LoweredNilCheck ptr mem) for { _ = v.Args[1] ptr := v.Args[0] mem := v.Args[1] v.reset(OpS390XLoweredNilCheck) v.AddArg(ptr) v.AddArg(mem) return true } } func rewriteValueS390X_OpNot_0(v *Value) bool { // match: (Not x) // cond: // result: (XORWconst [1] x) for { x := v.Args[0] v.reset(OpS390XXORWconst) v.AuxInt = 1 v.AddArg(x) return true } } func rewriteValueS390X_OpOffPtr_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (OffPtr [off] ptr:(SP)) // cond: // result: (MOVDaddr [off] ptr) for { off := v.AuxInt ptr := v.Args[0] if ptr.Op != OpSP { break } v.reset(OpS390XMOVDaddr) v.AuxInt = off v.AddArg(ptr) return true } // match: (OffPtr [off] ptr) // cond: is32Bit(off) // result: (ADDconst [off] ptr) for { off := v.AuxInt ptr := v.Args[0] if !(is32Bit(off)) { break } v.reset(OpS390XADDconst) v.AuxInt = off v.AddArg(ptr) return true } // match: (OffPtr [off] ptr) // cond: // result: (ADD (MOVDconst [off]) ptr) for { off := v.AuxInt ptr := v.Args[0] v.reset(OpS390XADD) v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) v0.AuxInt = off v.AddArg(v0) v.AddArg(ptr) return true } } func rewriteValueS390X_OpOr16_0(v *Value) bool { // match: (Or16 x y) // cond: // result: (ORW x y) for { _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XORW) v.AddArg(x) v.AddArg(y) return true } } func rewriteValueS390X_OpOr32_0(v *Value) bool { // match: (Or32 x y) // cond: // result: (ORW x y) for { _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XORW) v.AddArg(x) v.AddArg(y) return true } } func rewriteValueS390X_OpOr64_0(v *Value) bool { // match: (Or64 x y) // cond: // result: (OR x y) for { _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XOR) v.AddArg(x) v.AddArg(y) return true } } func rewriteValueS390X_OpOr8_0(v *Value) bool { // match: (Or8 x y) // cond: // result: (ORW x y) for { _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XORW) v.AddArg(x) v.AddArg(y) return true } } func rewriteValueS390X_OpOrB_0(v *Value) bool { // match: (OrB x y) // cond: // result: (ORW x y) for { _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XORW) v.AddArg(x) v.AddArg(y) return true } } func rewriteValueS390X_OpRound_0(v *Value) bool { // match: (Round x) // cond: // result: (FIDBR [1] x) for { x := v.Args[0] v.reset(OpS390XFIDBR) v.AuxInt = 1 v.AddArg(x) return true } } func rewriteValueS390X_OpRound32F_0(v *Value) bool { // match: (Round32F x) // cond: // result: (LoweredRound32F x) for { x := v.Args[0] v.reset(OpS390XLoweredRound32F) v.AddArg(x) return true } } func rewriteValueS390X_OpRound64F_0(v *Value) bool { // match: (Round64F x) // cond: // result: (LoweredRound64F x) for { x := v.Args[0] v.reset(OpS390XLoweredRound64F) v.AddArg(x) return true } } func rewriteValueS390X_OpRoundToEven_0(v *Value) bool { // match: (RoundToEven x) // cond: // result: (FIDBR [4] x) for { x := v.Args[0] v.reset(OpS390XFIDBR) v.AuxInt = 4 v.AddArg(x) return true } } func rewriteValueS390X_OpRsh16Ux16_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (Rsh16Ux16
x y) // cond: // result: (ANDW (SRW
(MOVHZreg x) y) (SUBEWcarrymask
(CMPWUconst (MOVHZreg y) [15]))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XANDW) v0 := b.NewValue0(v.Pos, OpS390XSRW, t) v1 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64) v1.AddArg(x) v0.AddArg(v1) v0.AddArg(y) v.AddArg(v0) v2 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t) v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) v3.AuxInt = 15 v4 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64) v4.AddArg(y) v3.AddArg(v4) v2.AddArg(v3) v.AddArg(v2) return true } } func rewriteValueS390X_OpRsh16Ux32_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (Rsh16Ux32
x y) // cond: // result: (ANDW (SRW
(MOVHZreg x) y) (SUBEWcarrymask
(CMPWUconst y [15]))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XANDW) v0 := b.NewValue0(v.Pos, OpS390XSRW, t) v1 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64) v1.AddArg(x) v0.AddArg(v1) v0.AddArg(y) v.AddArg(v0) v2 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t) v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) v3.AuxInt = 15 v3.AddArg(y) v2.AddArg(v3) v.AddArg(v2) return true } } func rewriteValueS390X_OpRsh16Ux64_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (Rsh16Ux64
x y) // cond: // result: (ANDW (SRW
(MOVHZreg x) y) (SUBEWcarrymask
(CMPUconst y [15]))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XANDW) v0 := b.NewValue0(v.Pos, OpS390XSRW, t) v1 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64) v1.AddArg(x) v0.AddArg(v1) v0.AddArg(y) v.AddArg(v0) v2 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t) v3 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags) v3.AuxInt = 15 v3.AddArg(y) v2.AddArg(v3) v.AddArg(v2) return true } } func rewriteValueS390X_OpRsh16Ux8_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (Rsh16Ux8
x y) // cond: // result: (ANDW (SRW
(MOVHZreg x) y) (SUBEWcarrymask
(CMPWUconst (MOVBZreg y) [15]))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XANDW) v0 := b.NewValue0(v.Pos, OpS390XSRW, t) v1 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64) v1.AddArg(x) v0.AddArg(v1) v0.AddArg(y) v.AddArg(v0) v2 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t) v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) v3.AuxInt = 15 v4 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64) v4.AddArg(y) v3.AddArg(v4) v2.AddArg(v3) v.AddArg(v2) return true } } func rewriteValueS390X_OpRsh16x16_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (Rsh16x16
x y) // cond: // result: (SRAW
(MOVHreg x) (ORW
y (NOTW
(SUBEWcarrymask
(CMPWUconst (MOVHZreg y) [15]))))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XSRAW) v.Type = t v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64) v0.AddArg(x) v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpS390XORW, y.Type) v1.AddArg(y) v2 := b.NewValue0(v.Pos, OpS390XNOTW, y.Type) v3 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, y.Type) v4 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) v4.AuxInt = 15 v5 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64) v5.AddArg(y) v4.AddArg(v5) v3.AddArg(v4) v2.AddArg(v3) v1.AddArg(v2) v.AddArg(v1) return true } } func rewriteValueS390X_OpRsh16x32_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (Rsh16x32
x y) // cond: // result: (SRAW
(MOVHreg x) (ORW
y (NOTW
(SUBEWcarrymask
(CMPWUconst y [15]))))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XSRAW) v.Type = t v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64) v0.AddArg(x) v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpS390XORW, y.Type) v1.AddArg(y) v2 := b.NewValue0(v.Pos, OpS390XNOTW, y.Type) v3 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, y.Type) v4 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) v4.AuxInt = 15 v4.AddArg(y) v3.AddArg(v4) v2.AddArg(v3) v1.AddArg(v2) v.AddArg(v1) return true } } func rewriteValueS390X_OpRsh16x64_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (Rsh16x64
x y) // cond: // result: (SRAW
(MOVHreg x) (OR
y (NOT
(SUBEcarrymask
(CMPUconst y [15]))))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XSRAW) v.Type = t v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64) v0.AddArg(x) v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpS390XOR, y.Type) v1.AddArg(y) v2 := b.NewValue0(v.Pos, OpS390XNOT, y.Type) v3 := b.NewValue0(v.Pos, OpS390XSUBEcarrymask, y.Type) v4 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags) v4.AuxInt = 15 v4.AddArg(y) v3.AddArg(v4) v2.AddArg(v3) v1.AddArg(v2) v.AddArg(v1) return true } } func rewriteValueS390X_OpRsh16x8_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (Rsh16x8
x y) // cond: // result: (SRAW
(MOVHreg x) (ORW
y (NOTW
(SUBEWcarrymask
(CMPWUconst (MOVBZreg y) [15]))))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XSRAW) v.Type = t v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64) v0.AddArg(x) v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpS390XORW, y.Type) v1.AddArg(y) v2 := b.NewValue0(v.Pos, OpS390XNOTW, y.Type) v3 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, y.Type) v4 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) v4.AuxInt = 15 v5 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64) v5.AddArg(y) v4.AddArg(v5) v3.AddArg(v4) v2.AddArg(v3) v1.AddArg(v2) v.AddArg(v1) return true } } func rewriteValueS390X_OpRsh32Ux16_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (Rsh32Ux16
x y) // cond: // result: (ANDW (SRW
x y) (SUBEWcarrymask
(CMPWUconst (MOVHZreg y) [31]))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XANDW) v0 := b.NewValue0(v.Pos, OpS390XSRW, t) v0.AddArg(x) v0.AddArg(y) v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t) v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) v2.AuxInt = 31 v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64) v3.AddArg(y) v2.AddArg(v3) v1.AddArg(v2) v.AddArg(v1) return true } } func rewriteValueS390X_OpRsh32Ux32_0(v *Value) bool { b := v.Block _ = b // match: (Rsh32Ux32
x y) // cond: // result: (ANDW (SRW
x y) (SUBEWcarrymask
(CMPWUconst y [31]))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XANDW) v0 := b.NewValue0(v.Pos, OpS390XSRW, t) v0.AddArg(x) v0.AddArg(y) v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t) v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) v2.AuxInt = 31 v2.AddArg(y) v1.AddArg(v2) v.AddArg(v1) return true } } func rewriteValueS390X_OpRsh32Ux64_0(v *Value) bool { b := v.Block _ = b // match: (Rsh32Ux64
x y) // cond: // result: (ANDW (SRW
x y) (SUBEWcarrymask
(CMPUconst y [31]))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XANDW) v0 := b.NewValue0(v.Pos, OpS390XSRW, t) v0.AddArg(x) v0.AddArg(y) v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t) v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags) v2.AuxInt = 31 v2.AddArg(y) v1.AddArg(v2) v.AddArg(v1) return true } } func rewriteValueS390X_OpRsh32Ux8_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (Rsh32Ux8
x y) // cond: // result: (ANDW (SRW
x y) (SUBEWcarrymask
(CMPWUconst (MOVBZreg y) [31]))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XANDW) v0 := b.NewValue0(v.Pos, OpS390XSRW, t) v0.AddArg(x) v0.AddArg(y) v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t) v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) v2.AuxInt = 31 v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64) v3.AddArg(y) v2.AddArg(v3) v1.AddArg(v2) v.AddArg(v1) return true } } func rewriteValueS390X_OpRsh32x16_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (Rsh32x16
x y) // cond: // result: (SRAW
x (ORW
y (NOTW
(SUBEWcarrymask
(CMPWUconst (MOVHZreg y) [31]))))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XSRAW) v.Type = t v.AddArg(x) v0 := b.NewValue0(v.Pos, OpS390XORW, y.Type) v0.AddArg(y) v1 := b.NewValue0(v.Pos, OpS390XNOTW, y.Type) v2 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, y.Type) v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) v3.AuxInt = 31 v4 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64) v4.AddArg(y) v3.AddArg(v4) v2.AddArg(v3) v1.AddArg(v2) v0.AddArg(v1) v.AddArg(v0) return true } } func rewriteValueS390X_OpRsh32x32_0(v *Value) bool { b := v.Block _ = b // match: (Rsh32x32
x y) // cond: // result: (SRAW
x (ORW
y (NOTW
(SUBEWcarrymask
(CMPWUconst y [31]))))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XSRAW) v.Type = t v.AddArg(x) v0 := b.NewValue0(v.Pos, OpS390XORW, y.Type) v0.AddArg(y) v1 := b.NewValue0(v.Pos, OpS390XNOTW, y.Type) v2 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, y.Type) v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) v3.AuxInt = 31 v3.AddArg(y) v2.AddArg(v3) v1.AddArg(v2) v0.AddArg(v1) v.AddArg(v0) return true } } func rewriteValueS390X_OpRsh32x64_0(v *Value) bool { b := v.Block _ = b // match: (Rsh32x64
x y) // cond: // result: (SRAW
x (OR
y (NOT
(SUBEcarrymask
(CMPUconst y [31]))))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XSRAW) v.Type = t v.AddArg(x) v0 := b.NewValue0(v.Pos, OpS390XOR, y.Type) v0.AddArg(y) v1 := b.NewValue0(v.Pos, OpS390XNOT, y.Type) v2 := b.NewValue0(v.Pos, OpS390XSUBEcarrymask, y.Type) v3 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags) v3.AuxInt = 31 v3.AddArg(y) v2.AddArg(v3) v1.AddArg(v2) v0.AddArg(v1) v.AddArg(v0) return true } } func rewriteValueS390X_OpRsh32x8_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (Rsh32x8
x y) // cond: // result: (SRAW
x (ORW
y (NOTW
(SUBEWcarrymask
(CMPWUconst (MOVBZreg y) [31]))))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XSRAW) v.Type = t v.AddArg(x) v0 := b.NewValue0(v.Pos, OpS390XORW, y.Type) v0.AddArg(y) v1 := b.NewValue0(v.Pos, OpS390XNOTW, y.Type) v2 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, y.Type) v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) v3.AuxInt = 31 v4 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64) v4.AddArg(y) v3.AddArg(v4) v2.AddArg(v3) v1.AddArg(v2) v0.AddArg(v1) v.AddArg(v0) return true } } func rewriteValueS390X_OpRsh64Ux16_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (Rsh64Ux16
x y) // cond: // result: (AND (SRD
x y) (SUBEcarrymask
(CMPWUconst (MOVHZreg y) [63]))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XAND) v0 := b.NewValue0(v.Pos, OpS390XSRD, t) v0.AddArg(x) v0.AddArg(y) v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpS390XSUBEcarrymask, t) v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) v2.AuxInt = 63 v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64) v3.AddArg(y) v2.AddArg(v3) v1.AddArg(v2) v.AddArg(v1) return true } } func rewriteValueS390X_OpRsh64Ux32_0(v *Value) bool { b := v.Block _ = b // match: (Rsh64Ux32
x y) // cond: // result: (AND (SRD
x y) (SUBEcarrymask
(CMPWUconst y [63]))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XAND) v0 := b.NewValue0(v.Pos, OpS390XSRD, t) v0.AddArg(x) v0.AddArg(y) v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpS390XSUBEcarrymask, t) v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) v2.AuxInt = 63 v2.AddArg(y) v1.AddArg(v2) v.AddArg(v1) return true } } func rewriteValueS390X_OpRsh64Ux64_0(v *Value) bool { b := v.Block _ = b // match: (Rsh64Ux64
x y) // cond: // result: (AND (SRD
x y) (SUBEcarrymask
(CMPUconst y [63]))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XAND) v0 := b.NewValue0(v.Pos, OpS390XSRD, t) v0.AddArg(x) v0.AddArg(y) v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpS390XSUBEcarrymask, t) v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags) v2.AuxInt = 63 v2.AddArg(y) v1.AddArg(v2) v.AddArg(v1) return true } } func rewriteValueS390X_OpRsh64Ux8_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (Rsh64Ux8
x y) // cond: // result: (AND (SRD
x y) (SUBEcarrymask
(CMPWUconst (MOVBZreg y) [63]))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XAND) v0 := b.NewValue0(v.Pos, OpS390XSRD, t) v0.AddArg(x) v0.AddArg(y) v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpS390XSUBEcarrymask, t) v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) v2.AuxInt = 63 v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64) v3.AddArg(y) v2.AddArg(v3) v1.AddArg(v2) v.AddArg(v1) return true } } func rewriteValueS390X_OpRsh64x16_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (Rsh64x16
x y) // cond: // result: (SRAD
x (ORW
y (NOTW
(SUBEWcarrymask
(CMPWUconst (MOVHZreg y) [63]))))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XSRAD) v.Type = t v.AddArg(x) v0 := b.NewValue0(v.Pos, OpS390XORW, y.Type) v0.AddArg(y) v1 := b.NewValue0(v.Pos, OpS390XNOTW, y.Type) v2 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, y.Type) v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) v3.AuxInt = 63 v4 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64) v4.AddArg(y) v3.AddArg(v4) v2.AddArg(v3) v1.AddArg(v2) v0.AddArg(v1) v.AddArg(v0) return true } } func rewriteValueS390X_OpRsh64x32_0(v *Value) bool { b := v.Block _ = b // match: (Rsh64x32
x y) // cond: // result: (SRAD
x (ORW
y (NOTW
(SUBEWcarrymask
(CMPWUconst y [63]))))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XSRAD) v.Type = t v.AddArg(x) v0 := b.NewValue0(v.Pos, OpS390XORW, y.Type) v0.AddArg(y) v1 := b.NewValue0(v.Pos, OpS390XNOTW, y.Type) v2 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, y.Type) v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) v3.AuxInt = 63 v3.AddArg(y) v2.AddArg(v3) v1.AddArg(v2) v0.AddArg(v1) v.AddArg(v0) return true } } func rewriteValueS390X_OpRsh64x64_0(v *Value) bool { b := v.Block _ = b // match: (Rsh64x64
x y) // cond: // result: (SRAD
x (OR
y (NOT
(SUBEcarrymask
(CMPUconst y [63]))))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XSRAD) v.Type = t v.AddArg(x) v0 := b.NewValue0(v.Pos, OpS390XOR, y.Type) v0.AddArg(y) v1 := b.NewValue0(v.Pos, OpS390XNOT, y.Type) v2 := b.NewValue0(v.Pos, OpS390XSUBEcarrymask, y.Type) v3 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags) v3.AuxInt = 63 v3.AddArg(y) v2.AddArg(v3) v1.AddArg(v2) v0.AddArg(v1) v.AddArg(v0) return true } } func rewriteValueS390X_OpRsh64x8_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (Rsh64x8
x y) // cond: // result: (SRAD
x (ORW
y (NOTW
(SUBEWcarrymask
(CMPWUconst (MOVBZreg y) [63]))))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XSRAD) v.Type = t v.AddArg(x) v0 := b.NewValue0(v.Pos, OpS390XORW, y.Type) v0.AddArg(y) v1 := b.NewValue0(v.Pos, OpS390XNOTW, y.Type) v2 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, y.Type) v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) v3.AuxInt = 63 v4 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64) v4.AddArg(y) v3.AddArg(v4) v2.AddArg(v3) v1.AddArg(v2) v0.AddArg(v1) v.AddArg(v0) return true } } func rewriteValueS390X_OpRsh8Ux16_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (Rsh8Ux16
x y) // cond: // result: (ANDW (SRW
(MOVBZreg x) y) (SUBEWcarrymask
(CMPWUconst (MOVHZreg y) [7]))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XANDW) v0 := b.NewValue0(v.Pos, OpS390XSRW, t) v1 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64) v1.AddArg(x) v0.AddArg(v1) v0.AddArg(y) v.AddArg(v0) v2 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t) v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) v3.AuxInt = 7 v4 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64) v4.AddArg(y) v3.AddArg(v4) v2.AddArg(v3) v.AddArg(v2) return true } } func rewriteValueS390X_OpRsh8Ux32_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (Rsh8Ux32
x y) // cond: // result: (ANDW (SRW
(MOVBZreg x) y) (SUBEWcarrymask
(CMPWUconst y [7]))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XANDW) v0 := b.NewValue0(v.Pos, OpS390XSRW, t) v1 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64) v1.AddArg(x) v0.AddArg(v1) v0.AddArg(y) v.AddArg(v0) v2 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t) v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) v3.AuxInt = 7 v3.AddArg(y) v2.AddArg(v3) v.AddArg(v2) return true } } func rewriteValueS390X_OpRsh8Ux64_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (Rsh8Ux64
x y) // cond: // result: (ANDW (SRW
(MOVBZreg x) y) (SUBEWcarrymask
(CMPUconst y [7]))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XANDW) v0 := b.NewValue0(v.Pos, OpS390XSRW, t) v1 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64) v1.AddArg(x) v0.AddArg(v1) v0.AddArg(y) v.AddArg(v0) v2 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t) v3 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags) v3.AuxInt = 7 v3.AddArg(y) v2.AddArg(v3) v.AddArg(v2) return true } } func rewriteValueS390X_OpRsh8Ux8_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (Rsh8Ux8
x y) // cond: // result: (ANDW (SRW
(MOVBZreg x) y) (SUBEWcarrymask
(CMPWUconst (MOVBZreg y) [7]))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XANDW) v0 := b.NewValue0(v.Pos, OpS390XSRW, t) v1 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64) v1.AddArg(x) v0.AddArg(v1) v0.AddArg(y) v.AddArg(v0) v2 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t) v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) v3.AuxInt = 7 v4 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64) v4.AddArg(y) v3.AddArg(v4) v2.AddArg(v3) v.AddArg(v2) return true } } func rewriteValueS390X_OpRsh8x16_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (Rsh8x16
x y) // cond: // result: (SRAW
(MOVBreg x) (ORW
y (NOTW
(SUBEWcarrymask
(CMPWUconst (MOVHZreg y) [7]))))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XSRAW) v.Type = t v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64) v0.AddArg(x) v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpS390XORW, y.Type) v1.AddArg(y) v2 := b.NewValue0(v.Pos, OpS390XNOTW, y.Type) v3 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, y.Type) v4 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) v4.AuxInt = 7 v5 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64) v5.AddArg(y) v4.AddArg(v5) v3.AddArg(v4) v2.AddArg(v3) v1.AddArg(v2) v.AddArg(v1) return true } } func rewriteValueS390X_OpRsh8x32_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (Rsh8x32
x y) // cond: // result: (SRAW
(MOVBreg x) (ORW
y (NOTW
(SUBEWcarrymask
(CMPWUconst y [7]))))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XSRAW) v.Type = t v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64) v0.AddArg(x) v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpS390XORW, y.Type) v1.AddArg(y) v2 := b.NewValue0(v.Pos, OpS390XNOTW, y.Type) v3 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, y.Type) v4 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) v4.AuxInt = 7 v4.AddArg(y) v3.AddArg(v4) v2.AddArg(v3) v1.AddArg(v2) v.AddArg(v1) return true } } func rewriteValueS390X_OpRsh8x64_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (Rsh8x64
x y) // cond: // result: (SRAW
(MOVBreg x) (OR
y (NOT
(SUBEcarrymask
(CMPUconst y [7]))))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XSRAW) v.Type = t v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64) v0.AddArg(x) v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpS390XOR, y.Type) v1.AddArg(y) v2 := b.NewValue0(v.Pos, OpS390XNOT, y.Type) v3 := b.NewValue0(v.Pos, OpS390XSUBEcarrymask, y.Type) v4 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags) v4.AuxInt = 7 v4.AddArg(y) v3.AddArg(v4) v2.AddArg(v3) v1.AddArg(v2) v.AddArg(v1) return true } } func rewriteValueS390X_OpRsh8x8_0(v *Value) bool { b := v.Block _ = b typ := &b.Func.Config.Types _ = typ // match: (Rsh8x8
x y) // cond: // result: (SRAW
(MOVBreg x) (ORW
y (NOTW
(SUBEWcarrymask
(CMPWUconst (MOVBZreg y) [7]))))) for { t := v.Type _ = v.Args[1] x := v.Args[0] y := v.Args[1] v.reset(OpS390XSRAW) v.Type = t v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64) v0.AddArg(x) v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpS390XORW, y.Type) v1.AddArg(y) v2 := b.NewValue0(v.Pos, OpS390XNOTW, y.Type) v3 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, y.Type) v4 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) v4.AuxInt = 7 v5 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64) v5.AddArg(y) v4.AddArg(v5) v3.AddArg(v4) v2.AddArg(v3) v1.AddArg(v2) v.AddArg(v1) return true } } func rewriteValueS390X_OpS390XADD_0(v *Value) bool { // match: (ADD x (MOVDconst [c])) // cond: is32Bit(c) // result: (ADDconst [c] x) for { _ = v.Args[1] x := v.Args[0] v_1 := v.Args[1] if v_1.Op != OpS390XMOVDconst { break } c := v_1.AuxInt if !(is32Bit(c)) { break } v.reset(OpS390XADDconst) v.AuxInt = c v.AddArg(x) return true } // match: (ADD (MOVDconst [c]) x) // cond: is32Bit(c) // result: (ADDconst [c] x) for { _ = v.Args[1] v_0 := v.Args[0] if v_0.Op != OpS390XMOVDconst { break } c := v_0.AuxInt x := v.Args[1] if !(is32Bit(c)) { break } v.reset(OpS390XADDconst) v.AuxInt = c v.AddArg(x) return true } // match: (ADD (SLDconst x [c]) (SRDconst x [d])) // cond: d == 64-c // result: (RLLGconst [c] x) for { _ = v.Args[1] v_0 := v.Args[0] if v_0.Op != OpS390XSLDconst { break } c := v_0.AuxInt x := v_0.Args[0] v_1 := v.Args[1] if v_1.Op != OpS390XSRDconst { break } d := v_1.AuxInt if x != v_1.Args[0] { break } if !(d == 64-c) { break } v.reset(OpS390XRLLGconst) v.AuxInt = c v.AddArg(x) return true } // match: (ADD (SRDconst x [d]) (SLDconst x [c])) // cond: d == 64-c // result: (RLLGconst [c] x) for { _ = v.Args[1] v_0 := v.Args[0] if v_0.Op != OpS390XSRDconst { break } d := v_0.AuxInt x := v_0.Args[0] v_1 := v.Args[1] if v_1.Op != OpS390XSLDconst { break } c := v_1.AuxInt if x != v_1.Args[0] { break } if !(d == 64-c) { break } v.reset(OpS390XRLLGconst) v.AuxInt = c v.AddArg(x) return true } // match: (ADD idx (MOVDaddr [c] {s} ptr)) // cond: ptr.Op != OpSB && idx.Op != OpSB // result: (MOVDaddridx [c] {s} ptr idx) for { _ = v.Args[1] idx := v.Args[0] v_1 := v.Args[1] if v_1.Op != OpS390XMOVDaddr { break } c := v_1.AuxInt s := v_1.Aux ptr := v_1.Args[0] if !(ptr.Op != OpSB && idx.Op != OpSB) { break } v.reset(OpS390XMOVDaddridx) v.AuxInt = c v.Aux = s v.AddArg(ptr) v.AddArg(idx) return true } // match: (ADD (MOVDaddr [c] {s} ptr) idx) // cond: ptr.Op != OpSB && idx.Op != OpSB // result: (MOVDaddridx [c] {s} ptr idx) for { _ = v.Args[1] v_0 := v.Args[0] if v_0.Op != OpS390XMOVDaddr { break } c := v_0.AuxInt s := v_0.Aux ptr := v_0.Args[0] idx := v.Args[1] if !(ptr.Op != OpSB && idx.Op != OpSB) { break } v.reset(OpS390XMOVDaddridx) v.AuxInt = c v.Aux = s v.AddArg(ptr) v.AddArg(idx) return true } // match: (ADD x (NEG y)) // cond: // result: (SUB x y) for { _ = v.Args[1] x := v.Args[0] v_1 := v.Args[1] if v_1.Op != OpS390XNEG { break } y := v_1.Args[0] v.reset(OpS390XSUB) v.AddArg(x) v.AddArg(y) return true } // match: (ADD (NEG y) x) // cond: // result: (SUB x y) for { _ = v.Args[1] v_0 := v.Args[0] if v_0.Op != OpS390XNEG { break } y := v_0.Args[0] x := v.Args[1] v.reset(OpS390XSUB) v.AddArg(x) v.AddArg(y) return true } // match: (ADD
x g:(MOVDload [off] {sym} ptr mem)) // cond: ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g) // result: (ADDload
[off] {sym} x ptr mem) for { t := v.Type _ = v.Args[1] x := v.Args[0] g := v.Args[1] if g.Op != OpS390XMOVDload { break } off := g.AuxInt sym := g.Aux _ = g.Args[1] ptr := g.Args[0] mem := g.Args[1] if !(ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g)) { break } v.reset(OpS390XADDload) v.Type = t v.AuxInt = off v.Aux = sym v.AddArg(x) v.AddArg(ptr) v.AddArg(mem) return true } // match: (ADD
g:(MOVDload [off] {sym} ptr mem) x) // cond: ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g) // result: (ADDload
[off] {sym} x ptr mem) for { t := v.Type _ = v.Args[1] g := v.Args[0] if g.Op != OpS390XMOVDload { break } off := g.AuxInt sym := g.Aux _ = g.Args[1] ptr := g.Args[0] mem := g.Args[1] x := v.Args[1] if !(ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g)) { break } v.reset(OpS390XADDload) v.Type = t v.AuxInt = off v.Aux = sym v.AddArg(x) v.AddArg(ptr) v.AddArg(mem) return true } return false } func rewriteValueS390X_OpS390XADD_10(v *Value) bool { // match: (ADD
g:(MOVDload [off] {sym} ptr mem) x) // cond: ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g) // result: (ADDload
[off] {sym} x ptr mem) for { t := v.Type _ = v.Args[1] g := v.Args[0] if g.Op != OpS390XMOVDload { break } off := g.AuxInt sym := g.Aux _ = g.Args[1] ptr := g.Args[0] mem := g.Args[1] x := v.Args[1] if !(ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g)) { break } v.reset(OpS390XADDload) v.Type = t v.AuxInt = off v.Aux = sym v.AddArg(x) v.AddArg(ptr) v.AddArg(mem) return true } // match: (ADD
x g:(MOVDload [off] {sym} ptr mem)) // cond: ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g) // result: (ADDload
[off] {sym} x ptr mem) for { t := v.Type _ = v.Args[1] x := v.Args[0] g := v.Args[1] if g.Op != OpS390XMOVDload { break } off := g.AuxInt sym := g.Aux _ = g.Args[1] ptr := g.Args[0] mem := g.Args[1] if !(ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g)) { break } v.reset(OpS390XADDload) v.Type = t v.AuxInt = off v.Aux = sym v.AddArg(x) v.AddArg(ptr) v.AddArg(mem) return true } return false } func rewriteValueS390X_OpS390XADDW_0(v *Value) bool { // match: (ADDW x (MOVDconst [c])) // cond: // result: (ADDWconst [int64(int32(c))] x) for { _ = v.Args[1] x := v.Args[0] v_1 := v.Args[1] if v_1.Op != OpS390XMOVDconst { break } c := v_1.AuxInt v.reset(OpS390XADDWconst) v.AuxInt = int64(int32(c)) v.AddArg(x) return true } // match: (ADDW (MOVDconst [c]) x) // cond: // result: (ADDWconst [int64(int32(c))] x) for { _ = v.Args[1] v_0 := v.Args[0] if v_0.Op != OpS390XMOVDconst { break } c := v_0.AuxInt x := v.Args[1] v.reset(OpS390XADDWconst) v.AuxInt = int64(int32(c)) v.AddArg(x) return true } // match: (ADDW (SLWconst x [c]) (SRWconst x [d])) // cond: d == 32-c // result: (RLLconst [c] x) for { _ = v.Args[1] v_0 := v.Args[0] if v_0.Op != OpS390XSLWconst { break } c := v_0.AuxInt x := v_0.Args[0] v_1 := v.Args[1] if v_1.Op != OpS390XSRWconst { break } d := v_1.AuxInt if x != v_1.Args[0] { break } if !(d == 32-c) { break } v.reset(OpS390XRLLconst) v.AuxInt = c v.AddArg(x) return true } // match: (ADDW (SRWconst x [d]) (SLWconst x [c])) // cond: d == 32-c // result: (RLLconst [c] x) for { _ = v.Args[1] v_0 := v.Args[0] if v_0.Op != OpS390XSRWconst { break } d := v_0.AuxInt x := v_0.Args[0] v_1 := v.Args[1] if v_1.Op != OpS390XSLWconst { break } c := v_1.AuxInt if x != v_1.Args[0] { break } if !(d == 32-c) { break } v.reset(OpS390XRLLconst) v.AuxInt = c v.AddArg(x) return true } // match: (ADDW x (NEGW y)) // cond: // result: (SUBW x y) for { _ = v.Args[1] x := v.Args[0] v_1 := v.Args[1] if v_1.Op != OpS390XNEGW { break } y := v_1.Args[0] v.reset(OpS390XSUBW) v.AddArg(x) v.AddArg(y) return true } // match: (ADDW (NEGW y) x) // cond: // result: (SUBW x y) for { _ = v.Args[1] v_0 := v.Args[0] if v_0.Op != OpS390XNEGW { break } y := v_0.Args[0] x := v.Args[1] v.reset(OpS390XSUBW) v.AddArg(x) v.AddArg(y) return true } // match: (ADDW
x g:(MOVWload [off] {sym} ptr mem)) // cond: ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g) // result: (ADDWload
[off] {sym} x ptr mem) for { t := v.Type _ = v.Args[1] x := v.Args[0] g := v.Args[1] if g.Op != OpS390XMOVWload { break } off := g.AuxInt sym := g.Aux _ = g.Args[1] ptr := g.Args[0] mem := g.Args[1] if !(ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g)) { break } v.reset(OpS390XADDWload) v.Type = t v.AuxInt = off v.Aux = sym v.AddArg(x) v.AddArg(ptr) v.AddArg(mem) return true } // match: (ADDW
g:(MOVWload [off] {sym} ptr mem) x) // cond: ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g) // result: (ADDWload
[off] {sym} x ptr mem) for { t := v.Type _ = v.Args[1] g := v.Args[0] if g.Op != OpS390XMOVWload { break } off := g.AuxInt sym := g.Aux _ = g.Args[1] ptr := g.Args[0] mem := g.Args[1] x := v.Args[1] if !(ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g)) { break } v.reset(OpS390XADDWload) v.Type = t v.AuxInt = off v.Aux = sym v.AddArg(x) v.AddArg(ptr) v.AddArg(mem) return true } // match: (ADDW
g:(MOVWload [off] {sym} ptr mem) x) // cond: ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g) // result: (ADDWload
[off] {sym} x ptr mem) for { t := v.Type _ = v.Args[1] g := v.Args[0] if g.Op != OpS390XMOVWload { break } off := g.AuxInt sym := g.Aux _ = g.Args[1] ptr := g.Args[0] mem := g.Args[1] x := v.Args[1] if !(ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g)) { break } v.reset(OpS390XADDWload) v.Type = t v.AuxInt = off v.Aux = sym v.AddArg(x) v.AddArg(ptr) v.AddArg(mem) return true } // match: (ADDW
x g:(MOVWload [off] {sym} ptr mem)) // cond: ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g) // result: (ADDWload
[off] {sym} x ptr mem) for { t := v.Type _ = v.Args[1] x := v.Args[0] g := v.Args[1] if g.Op != OpS390XMOVWload { break } off := g.AuxInt sym := g.Aux _ = g.Args[1] ptr := g.Args[0] mem := g.Args[1] if !(ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g)) { break } v.reset(OpS390XADDWload) v.Type = t v.AuxInt = off v.Aux = sym v.AddArg(x) v.AddArg(ptr) v.AddArg(mem) return true } return false } func rewriteValueS390X_OpS390XADDW_10(v *Value) bool { // match: (ADDW
x g:(MOVWZload [off] {sym} ptr mem)) // cond: ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g) // result: (ADDWload
[off] {sym} x ptr mem) for { t := v.Type _ = v.Args[1] x := v.Args[0] g := v.Args[1] if g.Op != OpS390XMOVWZload { break } off := g.AuxInt sym := g.Aux _ = g.Args[1] ptr := g.Args[0] mem := g.Args[1] if !(ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g)) { break } v.reset(OpS390XADDWload) v.Type = t v.AuxInt = off v.Aux = sym v.AddArg(x) v.AddArg(ptr) v.AddArg(mem) return true } // match: (ADDW
g:(MOVWZload [off] {sym} ptr mem) x) // cond: ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g) // result: (ADDWload
[off] {sym} x ptr mem) for { t := v.Type _ = v.Args[1] g := v.Args[0] if g.Op != OpS390XMOVWZload { break } off := g.AuxInt sym := g.Aux _ = g.Args[1] ptr := g.Args[0] mem := g.Args[1] x := v.Args[1] if !(ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g)) { break } v.reset(OpS390XADDWload) v.Type = t v.AuxInt = off v.Aux = sym v.AddArg(x) v.AddArg(ptr) v.AddArg(mem) return true } // match: (ADDW
g:(MOVWZload [off] {sym} ptr mem) x) // cond: ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g) // result: (ADDWload
[off] {sym} x ptr mem) for { t := v.Type _ = v.Args[1] g := v.Args[0] if g.Op != OpS390XMOVWZload { break } off := g.AuxInt sym := g.Aux _ = g.Args[1] ptr := g.Args[0] mem := g.Args[1] x := v.Args[1] if !(ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g)) { break } v.reset(OpS390XADDWload) v.Type = t v.AuxInt = off v.Aux = sym v.AddArg(x) v.AddArg(ptr) v.AddArg(mem) return true } // match: (ADDW
x g:(MOVWZload [off] {sym} ptr mem)) // cond: ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g) // result: (ADDWload
[off] {sym} x ptr mem) for { t := v.Type _ = v.Args[1] x := v.Args[0] g := v.Args[1] if g.Op != OpS390XMOVWZload { break } off := g.AuxInt sym := g.Aux _ = g.Args[1] ptr := g.Args[0] mem := g.Args[1] if !(ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g)) { break } v.reset(OpS390XADDWload) v.Type = t v.AuxInt = off v.Aux = sym v.AddArg(x) v.AddArg(ptr) v.AddArg(mem) return true } return false } func rewriteValueS390X_OpS390XADDWconst_0(v *Value) bool { // match: (ADDWconst [c] x) // cond: int32(c)==0 // result: x for { c := v.AuxInt x := v.Args[0] if !(int32(c) == 0) { break } v.reset(OpCopy) v.Type = x.Type v.AddArg(x) return true } // match: (ADDWconst [c] (MOVDconst [d])) // cond: // result: (MOVDconst [int64(int32(c+d))]) for { c := v.AuxInt v_0 := v.Args[0] if v_0.Op != OpS390XMOVDconst { break } d := v_0.AuxInt v.reset(OpS390XMOVDconst) v.AuxInt = int64(int32(c + d)) return true } // match: (ADDWconst [c] (ADDWconst [d] x)) // cond: // result: (ADDWconst [int64(int32(c+d))] x) for { c := v.AuxInt v_0 := v.Args[0] if v_0.Op != OpS390XADDWconst { break } d := v_0.AuxInt x := v_0.Args[0] v.reset(OpS390XADDWconst) v.AuxInt = int64(int32(c + d)) v.AddArg(x) return true } return false } func rewriteValueS390X_OpS390XADDWload_0(v *Value) bool { // match: (ADDWload [off1] {sym} x (ADDconst [off2] ptr) mem) // cond: ptr.Op != OpSB && is20Bit(off1+off2) // result: (ADDWload [off1+off2] {sym} x ptr mem) for { off1 := v.AuxInt sym := v.Aux _ = v.Args[2] x := v.Args[0] v_1 := v.Args[1] if v_1.Op != OpS390XADDconst { break } off2 := v_1.AuxInt ptr := v_1.Args[0] mem := v.Args[2] if !(ptr.Op != OpSB && is20Bit(off1+off2)) { break } v.reset(OpS390XADDWload) v.AuxInt = off1 + off2 v.Aux = sym v.AddArg(x) v.AddArg(ptr) v.AddArg(mem) return true } // match: (ADDWload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem) // cond: ptr.Op != OpSB && is20Bit(o1+o2) && canMergeSym(s1, s2) // result: (ADDWload [o1+o2] {mergeSym(s1, s2)} x ptr mem) for { o1 := v.AuxInt s1 := v.Aux _ = v.Args[2] x := v.Args[0] v_1 := v.Args[1] if v_1.Op != OpS390XMOVDaddr { break } o2 := v_1.AuxInt s2 := v_1.Aux ptr := v_1.Args[0] mem := v.Args[2] if !(ptr.Op != OpSB && is20Bit(o1+o2) && canMergeSym(s1, s2)) { break } v.reset(OpS390XADDWload) v.AuxInt = o1 + o2 v.Aux = mergeSym(s1, s2) v.AddArg(x) v.AddArg(ptr) v.AddArg(mem) return true } return false } func rewriteValueS390X_OpS390XADDconst_0(v *Value) bool { // match: (ADDconst [c] (MOVDaddr [d] {s} x:(SB))) // cond: ((c+d)&1 == 0) && is32Bit(c+d) // result: (MOVDaddr [c+d] {s} x) for { c := v.AuxInt v_0 := v.Args[0] if v_0.Op != OpS390XMOVDaddr { break } d := v_0.AuxInt s := v_0.Aux x := v_0.Args[0] if x.Op != OpSB { break } if !(((c+d)&1 == 0) && is32Bit(c+d)) { break } v.reset(OpS390XMOVDaddr) v.AuxInt = c + d v.Aux = s v.AddArg(x) return true } // match: (ADDconst [c] (MOVDaddr [d] {s} x)) // cond: x.Op != OpSB && is20Bit(c+d) // result: (MOVDaddr [c+d] {s} x) for { c := v.AuxInt v_0 := v.Args[0] if v_0.Op != OpS390XMOVDaddr { break } d := v_0.AuxInt s := v_0.Aux x := v_0.Args[0] if !(x.Op != OpSB && is20Bit(c+d)) { break } v.reset(OpS390XMOVDaddr) v.AuxInt = c + d v.Aux = s v.AddArg(x) return true } // match: (ADDconst [c] (MOVDaddridx [d] {s} x y)) // cond: is20Bit(c+d) // result: (MOVDaddridx [c+d] {s} x y) for { c := v.AuxInt v_0 := v.Args[0] if v_0.Op != OpS390XMOVDaddridx { break } d := v_0.AuxInt s := v_0.Aux _ = v_0.Args[1] x := v_0.Args[0] y := v_0.Args[1] if !(is20Bit(c + d)) { break } v.reset(OpS390XMOVDaddridx) v.AuxInt = c + d v.Aux = s v.AddArg(x) v.AddArg(y) return true } // match: (ADDconst [0] x) // cond: // result: x for { if v.AuxInt != 0 { break } x := v.Args[0] v.reset(OpCopy) v.Type = x.Type v.AddArg(x) return true } // match: (ADDconst [c] (MOVDconst [d])) // cond: // result: (MOVDconst [c+d]) for { c := v.AuxInt v_0 := v.Args[0] if v_0.Op != OpS390XMOVDconst { break } d := v_0.AuxInt v.reset(OpS390XMOVDconst) v.AuxInt = c + d return true } // match: (ADDconst [c] (ADDconst [d] x)) // cond: is32Bit(c+d) // result: (ADDconst [c+d] x) for { c := v.AuxInt v_0 := v.Args[0] if v_0.Op != OpS390XADDconst { break } d := v_0.AuxInt x := v_0.Args[0] if !(is32Bit(c + d)) { break } v.reset(OpS390XADDconst) v.AuxInt = c + d v.AddArg(x) return true } return false } func rewriteValueS390X_OpS390XADDload_0(v *Value) bool { b := v.Block _ = b // match: (ADDload
[off] {sym} x ptr1 (FMOVDstore [off] {sym} ptr2 y _)) // cond: isSamePtr(ptr1, ptr2) // result: (ADD x (LGDR
y)) for { t := v.Type off := v.AuxInt sym := v.Aux _ = v.Args[2] x := v.Args[0] ptr1 := v.Args[1] v_2 := v.Args[2] if v_2.Op != OpS390XFMOVDstore { break } if v_2.AuxInt != off { break } if v_2.Aux != sym { break } _ = v_2.Args[2] ptr2 := v_2.Args[0] y := v_2.Args[1] if !(isSamePtr(ptr1, ptr2)) { break } v.reset(OpS390XADD) v.AddArg(x) v0 := b.NewValue0(v.Pos, OpS390XLGDR, t) v0.AddArg(y) v.AddArg(v0) return true } // match: (ADDload [off1] {sym} x (ADDconst [off2] ptr) mem) // cond: ptr.Op != OpSB && is20Bit(off1+off2) // result: (ADDload [off1+off2] {sym} x ptr mem) for { off1 := v.AuxInt sym := v.Aux _ = v.Args[2] x := v.Args[0] v_1 := v.Args[1] if v_1.Op != OpS390XADDconst { break } off2 := v_1.AuxInt ptr := v_1.Args[0] mem := v.Args[2] if !(ptr.Op != OpSB && is20Bit(off1+off2)) { break } v.reset(OpS390XADDload) v.AuxInt = off1 + off2 v.Aux = sym v.AddArg(x) v.AddArg(ptr) v.AddArg(mem) return true } // match: (ADDload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem) // cond: ptr.Op != OpSB && is20Bit(o1+o2) && canMergeSym(s1, s2) // result: (ADDload [o1+o2] {mergeSym(s1, s2)} x ptr mem) for { o1 := v.AuxInt s1 := v.Aux _ = v.Args[2] x := v.Args[0] v_1 := v.Args[1] if v_1.Op != OpS390XMOVDaddr { break } o2 := v_1.AuxInt s2 := v_1.Aux ptr := v_1.Args[0] mem := v.Args[2] if !(ptr.Op != OpSB && is20Bit(o1+o2) && canMergeSym(s1, s2)) { break } v.reset(OpS390XADDload) v.AuxInt = o1 + o2 v.Aux = mergeSym(s1, s2) v.AddArg(x) v.AddArg(ptr) v.AddArg(mem) return true } return false } func rewriteValueS390X_OpS390XAND_0(v *Value) bool { // match: (AND x (MOVDconst [c])) // cond: is32Bit(c) && c < 0 // result: (ANDconst [c] x) for { _ = v.Args[1] x := v.Args[0] v_1 := v.Args[1] if v_1.Op != OpS390XMOVDconst { break } c := v_1.AuxInt if !(is32Bit(c) && c < 0) { break } v.reset(OpS390XANDconst) v.AuxInt = c v.AddArg(x) return true } // match: (AND (MOVDconst [c]) x) // cond: is32Bit(c) && c < 0 // result: (ANDconst [c] x) for { _ = v.Args[1] v_0 := v.Args[0] if v_0.Op != OpS390XMOVDconst { break } c := v_0.AuxInt x := v.Args[1] if !(is32Bit(c) && c < 0) { break } v.reset(OpS390XANDconst) v.AuxInt = c v.AddArg(x) return true } // match: (AND x (MOVDconst [0xFF])) // cond: // result: (MOVBZreg x) for { _ = v.Args[1] x := v.Args[0] v_1 := v.Args[1] if v_1.Op != OpS390XMOVDconst { break } if v_1.AuxInt != 0xFF { break } v.reset(OpS390XMOVBZreg) v.AddArg(x) return true } // match: (AND (MOVDconst [0xFF]) x) // cond: // result: (MOVBZreg x) for { _ = v.Args[1] v_0 := v.Args[0] if v_0.Op != OpS390XMOVDconst { break } if v_0.AuxInt != 0xFF { break } x := v.Args[1] v.reset(OpS390XMOVBZreg) v.AddArg(x) return true } // match: (AND x (MOVDconst [0xFFFF])) // cond: // result: (MOVHZreg x) for { _ = v.Args[1] x := v.Args[0] v_1 := v.Args[1] if v_1.Op != OpS390XMOVDconst { break } if v_1.AuxInt != 0xFFFF { break } v.reset(OpS390XMOVHZreg) v.AddArg(x) return true } // match: (AND (MOVDconst [0xFFFF]) x) // cond: // result: (MOVHZreg x) for { _ = v.Args[1] v_0 := v.Args[0] if v_0.Op != OpS390XMOVDconst { break } if v_0.AuxInt != 0xFFFF { break } x := v.Args[1] v.reset(OpS390XMOVHZreg) v.AddArg(x) return true } // match: (AND x (MOVDconst [0xFFFFFFFF])) // cond: // result: (MOVWZreg x) for { _ = v.Args[1] x := v.Args[0] v_1 := v.Args[1] if v_1.Op != OpS390XMOVDconst { break } if v_1.AuxInt != 0xFFFFFFFF { break } v.reset(OpS390XMOVWZreg) v.AddArg(x) return true } // match: (AND (MOVDconst [0xFFFFFFFF]) x) // cond: // result: (MOVWZreg x) for { _ = v.Args[1] v_0 := v.Args[0] if v_0.Op != OpS390XMOVDconst { break } if v_0.AuxInt != 0xFFFFFFFF { break } x := v.Args[1] v.reset(OpS390XMOVWZreg) v.AddArg(x) return true } // match: (AND (MOVDconst [c]) (MOVDconst [d])) // cond: // result: (MOVDconst [c&d]) for { _ = v.Args[1] v_0 := v.Args[0] if v_0.Op != OpS390XMOVDconst { break } c := v_0.AuxInt v_1 := v.Args[1] if v_1.Op != OpS390XMOVDconst { break } d := v_1.AuxInt v.reset(OpS390XMOVDconst) v.AuxInt = c & d return true } // match: (AND (MOVDconst [d]) (MOVDconst [c])) // cond: // result: (MOVDconst [c&d]) for { _ = v.Args[1] v_0 := v.Args[0] if v_0.Op != OpS390XMOVDconst { break } d := v_0.AuxInt v_1 := v.Args[1] if v_1.Op != OpS390XMOVDconst { break } c := v_1.AuxInt v.reset(OpS390XMOVDconst) v.AuxInt = c & d return true } return false } func rewriteValueS390X_OpS390XAND_10(v *Value) bool { // match: (AND x x) // cond: // result: x for { _ = v.Args[1] x := v.Args[0] if x != v.Args[1] { break } v.reset(OpCopy) v.Type = x.Type v.AddArg(x) return true } // match: (AND
x g:(MOVDload [off] {sym} ptr mem)) // cond: ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g) // result: (ANDload
[off] {sym} x ptr mem) for { t := v.Type _ = v.Args[1] x := v.Args[0] g := v.Args[1] if g.Op != OpS390XMOVDload { break } off := g.AuxInt sym := g.Aux _ = g.Args[1] ptr := g.Args[0] mem := g.Args[1] if !(ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g)) { break } v.reset(OpS390XANDload) v.Type = t v.AuxInt = off v.Aux = sym v.AddArg(x) v.AddArg(ptr) v.AddArg(mem) return true } // match: (AND
g:(MOVDload [off] {sym} ptr mem) x) // cond: ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g) // result: (ANDload
[off] {sym} x ptr mem) for { t := v.Type _ = v.Args[1] g := v.Args[0] if g.Op != OpS390XMOVDload { break } off := g.AuxInt sym := g.Aux _ = g.Args[1] ptr := g.Args[0] mem := g.Args[1] x := v.Args[1] if !(ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g)) { break } v.reset(OpS390XANDload) v.Type = t v.AuxInt = off v.Aux = sym v.AddArg(x) v.AddArg(ptr) v.AddArg(mem) return true } // match: (AND
g:(MOVDload [off] {sym} ptr mem) x) // cond: ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g) // result: (ANDload
[off] {sym} x ptr mem) for { t := v.Type _ = v.Args[1] g := v.Args[0] if g.Op != OpS390XMOVDload { break } off := g.AuxInt sym := g.Aux _ = g.Args[1] ptr := g.Args[0] mem := g.Args[1] x := v.Args[1] if !(ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g)) { break } v.reset(OpS390XANDload) v.Type = t v.AuxInt = off v.Aux = sym v.AddArg(x) v.AddArg(ptr) v.AddArg(mem) return true } // match: (AND
x g:(MOVDload [off] {sym} ptr mem)) // cond: ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g) // result: (ANDload
[off] {sym} x ptr mem) for { t := v.Type _ = v.Args[1] x := v.Args[0] g := v.Args[1] if g.Op != OpS390XMOVDload { break } off := g.AuxInt sym := g.Aux _ = g.Args[1] ptr := g.Args[0] mem := g.Args[1] if !(ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g)) { break } v.reset(OpS390XANDload) v.Type = t v.AuxInt = off v.Aux = sym v.AddArg(x) v.AddArg(ptr) v.AddArg(mem) return true } return false } func rewriteValueS390X_OpS390XANDW_0(v *Value) bool { // match: (ANDW x (MOVDconst [c])) // cond: // result: (ANDWconst [int64(int32(c))] x) for { _ = v.Args[1] x := v.Args[0] v_1 := v.Args[1] if v_1.Op != OpS390XMOVDconst { break } c := v_1.AuxInt v.reset(OpS390XANDWconst) v.AuxInt = int64(int32(c)) v.AddArg(x) return true } // match: (ANDW (MOVDconst [c]) x) // cond: // result: (ANDWconst [int64(int32(c))] x) for { _ = v.Args[1] v_0 := v.Args[0] if v_0.Op != OpS390XMOVDconst { break } c := v_0.AuxInt x := v.Args[1] v.reset(OpS390XANDWconst) v.AuxInt = int64(int32(c)) v.AddArg(x) return true } // match: (ANDW x x) // cond: // result: x for { _ = v.Args[1] x := v.Args[0] if x != v.Args[1] { break } v.reset(OpCopy) v.Type = x.Type v.AddArg(x) return true } // match: (ANDW
x g:(MOVWload [off] {sym} ptr mem)) // cond: ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g) // result: (ANDWload
[off] {sym} x ptr mem) for { t := v.Type _ = v.Args[1] x := v.Args[0] g := v.Args[1] if g.Op != OpS390XMOVWload { break } off := g.AuxInt sym := g.Aux _ = g.Args[1] ptr := g.Args[0] mem := g.Args[1] if !(ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g)) { break } v.reset(OpS390XANDWload) v.Type = t v.AuxInt = off v.Aux = sym v.AddArg(x) v.AddArg(ptr) v.AddArg(mem) return true } // match: (ANDW
g:(MOVWload [off] {sym} ptr mem) x) // cond: ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g) // result: (ANDWload
[off] {sym} x ptr mem) for { t := v.Type _ = v.Args[1] g := v.Args[0] if g.Op != OpS390XMOVWload { break } off := g.AuxInt sym := g.Aux _ = g.Args[1] ptr := g.Args[0] mem := g.Args[1] x := v.Args[1] if !(ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g)) { break } v.reset(OpS390XANDWload) v.Type = t v.AuxInt = off v.Aux = sym v.AddArg(x) v.AddArg(ptr) v.AddArg(mem) return true } // match: (ANDW
g:(MOVWload [off] {sym} ptr mem) x) // cond: ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g) // result: (ANDWload
[off] {sym} x ptr mem) for { t := v.Type _ = v.Args[1] g := v.Args[0] if g.Op != OpS390XMOVWload { break } off := g.AuxInt sym := g.Aux _ = g.Args[1] ptr := g.Args[0] mem := g.Args[1] x := v.Args[1] if !(ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g)) { break } v.reset(OpS390XANDWload) v.Type = t v.AuxInt = off v.Aux = sym v.AddArg(x) v.AddArg(ptr) v.AddArg(mem) return true } // match: (ANDW
x g:(MOVWload [off] {sym} ptr mem)) // cond: ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g) // result: (ANDWload
[off] {sym} x ptr mem) for { t := v.Type _ = v.Args[1] x := v.Args[0] g := v.Args[1] if g.Op != OpS390XMOVWload { break } off := g.AuxInt sym := g.Aux _ = g.Args[1] ptr := g.Args[0] mem := g.Args[1] if !(ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g)) { break } v.reset(OpS390XANDWload) v.Type = t v.AuxInt = off v.Aux = sym v.AddArg(x) v.AddArg(ptr) v.AddArg(mem) return true } // match: (ANDW
x g:(MOVWZload [off] {sym} ptr mem)) // cond: ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g) // result: (ANDWload
[off] {sym} x ptr mem) for { t := v.Type _ = v.Args[1] x := v.Args[0] g := v.Args[1] if g.Op != OpS390XMOVWZload { break } off := g.AuxInt sym := g.Aux _ = g.Args[1] ptr := g.Args[0] mem := g.Args[1] if !(ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g)) { break } v.reset(OpS390XANDWload) v.Type = t v.AuxInt = off v.Aux = sym v.AddArg(x) v.AddArg(ptr) v.AddArg(mem) return true } // match: (ANDW
g:(MOVWZload [off] {sym} ptr mem) x) // cond: ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g) // result: (ANDWload
[off] {sym} x ptr mem) for { t := v.Type _ = v.Args[1] g := v.Args[0] if g.Op != OpS390XMOVWZload { break } off := g.AuxInt sym := g.Aux _ = g.Args[1] ptr := g.Args[0] mem := g.Args[1] x := v.Args[1] if !(ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g)) { break } v.reset(OpS390XANDWload) v.Type = t v.AuxInt = off v.Aux = sym v.AddArg(x) v.AddArg(ptr) v.AddArg(mem) return true } // match: (ANDW
g:(MOVWZload [off] {sym} ptr mem) x) // cond: ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g) // result: (ANDWload
[off] {sym} x ptr mem) for { t := v.Type _ = v.Args[1] g := v.Args[0] if g.Op != OpS390XMOVWZload { break } off := g.AuxInt sym := g.Aux _ = g.Args[1] ptr := g.Args[0] mem := g.Args[1] x := v.Args[1] if !(ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g)) { break } v.reset(OpS390XANDWload) v.Type = t v.AuxInt = off v.Aux = sym v.AddArg(x) v.AddArg(ptr) v.AddArg(mem) return true } return false } func rewriteValueS390X_OpS390XANDW_10(v *Value) bool { // match: (ANDW
x g:(MOVWZload [off] {sym} ptr mem)) // cond: ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g) // result: (ANDWload
[off] {sym} x ptr mem) for { t := v.Type _ = v.Args[1] x := v.Args[0] g := v.Args[1] if g.Op != OpS390XMOVWZload { break } off := g.AuxInt sym := g.Aux _ = g.Args[1] ptr := g.Args[0] mem := g.Args[1] if !(ptr.Op != OpSB && is20Bit(off) && canMergeLoad(v, g, x) && clobber(g)) { break } v.reset(OpS390XANDWload) v.Type = t v.AuxInt = off v.Aux = sym v.AddArg(x) v.AddArg(ptr) v.AddArg(mem) return true } return false } func rewriteValueS390X_OpS390XANDWconst_0(v *Value) bool { // match: (ANDWconst [c] (ANDWconst [d] x)) // cond: // result: (ANDWconst [c & d] x) for { c := v.AuxInt v_0 := v.Args[0] if v_0.Op != OpS390XANDWconst { break } d := v_0.AuxInt x := v_0.Args[0] v.reset(OpS390XANDWconst) v.AuxInt = c & d v.AddArg(x) return true } // match: (ANDWconst [0xFF] x) // cond: // result: (MOVBZreg x) for { if v.AuxInt != 0xFF { break } x := v.Args[0] v.reset(OpS390XMOVBZreg) v.AddArg(x) return true } // match: (ANDWconst [0xFFFF] x) // cond: // result: (MOVHZreg x) for { if v.AuxInt != 0xFFFF { break } x := v.Args[0] v.reset(OpS390XMOVHZreg) v.AddArg(x) return true } // match: (ANDWconst [c] _) // cond: int32(c)==0 // result: (MOVDconst [0]) for { c := v.AuxInt if !(int32(c) == 0) { break } v.reset(OpS390XMOVDconst) v.AuxInt = 0 return true } // match: (ANDWconst [c] x) // cond: int32(c)==-1 // result: x for { c := v.AuxInt x := v.Args[0] if !(int32(c) == -1) { break } v.reset(OpCopy) v.Type = x.Type v.AddArg(x) return true } // match: (ANDWconst [c] (MOVDconst [d])) // cond: // result: (MOVDconst [c&d]) for { c := v.AuxInt v_0 := v.Args[0] if v_0.Op != OpS390XMOVDconst { break } d := v_0.AuxInt v.reset(OpS390XMOVDconst) v.AuxInt = c & d return true } return false } func rewriteValueS390X_OpS390XANDWload_0(v *Value) bool { // match: (ANDWload [off1] {sym} x (ADDconst [off2] ptr) mem) // cond: ptr.Op != OpSB && is20Bit(off1+off2) // result: (ANDWload [off1+off2] {sym} x ptr mem) for { off1 := v.AuxInt sym := v.Aux _ = v.Args[2] x := v.Args[0] v_1 := v.Args[1] if v_1.Op != OpS390XADDconst { break } off2 := v_1.AuxInt ptr := v_1.Args[0] mem := v.Args[2] if !(ptr.Op != OpSB && is20Bit(off1+off2)) { break } v.reset(OpS390XANDWload) v.AuxInt = off1 + off2 v.Aux = sym v.AddArg(x) v.AddArg(ptr) v.AddArg(mem) return true } // match: (ANDWload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem) // cond: ptr.Op != OpSB && is20Bit(o1+o2) && canMergeSym(s1, s2) // result: (ANDWload [o1+o2] {mergeSym(s1, s2)} x ptr mem) for { o1 := v.AuxInt s1 := v.Aux _ = v.Args[2] x := v.Args[0] v_1 := v.Args[1] if v_1.Op != OpS390XMOVDaddr { break } o2 := v_1.AuxInt s2 := v_1.Aux ptr := v_1.Args[0] mem := v.Args[2] if !(ptr.Op != OpSB && is20Bit(o1+o2) && canMergeSym(s1, s2)) { break } v.reset(OpS390XANDWload) v.AuxInt = o1 + o2 v.Aux = mergeSym(s1, s2) v.AddArg(x) v.AddArg(ptr) v.AddArg(mem) return true } return false } func rewriteValueS390X_OpS390XANDconst_0(v *Value) bool { // match: (ANDconst [c] (ANDconst [d] x)) // cond: // result: (ANDconst [c & d] x) for { c := v.AuxInt v_0 := v.Args[0] if v_0.Op != OpS390XANDconst { break } d := v_0.AuxInt x := v_0.Args[0] v.reset(OpS390XANDconst) v.AuxInt = c & d v.AddArg(x) return true } // match: (ANDconst [0] _) // cond: // result: (MOVDconst [0]) for { if v.AuxInt != 0 { break } v.reset(OpS390XMOVDconst) v.AuxInt = 0 return true } // match: (ANDconst [-1] x) // cond: // result: x for { if v.AuxInt != -1 { break } x := v.Args[0] v.reset(OpCopy) v.Type = x.Type v.AddArg(x) return true } // match: (ANDconst [c] (MOVDconst [d])) // cond: // result: (MOVDconst [c&d]) for { c := v.AuxInt v_0 := v.Args[0] if v_0.Op != OpS390XMOVDconst { break } d := v_0.AuxInt v.reset(OpS390XMOVDconst) v.AuxInt = c & d return true } return false } func rewriteValueS390X_OpS390XANDload_0(v *Value) bool { b := v.Block _ = b // match: (ANDload
[off] {sym} x ptr1 (FMOVDstore [off] {sym} ptr2 y _)) // cond: isSamePtr(ptr1, ptr2) // result: (AND x (LGDR
y)) for { t := v.Type off := v.AuxInt sym := v.Aux _ = v.Args[2] x := v.Args[0] ptr1 := v.Args[1] v_2 := v.Args[2] if v_2.Op != OpS390XFMOVDstore { break } if v_2.AuxInt != off { break } if v_2.Aux != sym { break } _ = v_2.Args[2] ptr2 := v_2.Args[0] y := v_2.Args[1] if !(isSamePtr(ptr1, ptr2)) { break } v.reset(OpS390XAND) v.AddArg(x) v0 := b.NewValue0(v.Pos, OpS390XLGDR, t) v0.AddArg(y) v.AddArg(v0) return true } // match: (ANDload [off1] {sym} x (ADDconst [off2] ptr) mem) // cond: ptr.Op != OpSB && is20Bit(off1+off2) // result: (ANDload [off1+off2] {sym} x ptr mem) for { off1 := v.AuxInt sym := v.Aux _ = v.Args[2] x := v.Args[0] v_1 := v.Args[1] if v_1.Op != OpS390XADDconst { break } off2 := v_1.AuxInt ptr := v_1.Args[0] mem := v.Args[2] if !(ptr.Op != OpSB && is20Bit(off1+off2)) { break } v.reset(OpS390XANDload) v.AuxInt = off1 + off2 v.Aux = sym v.AddArg(x) v.AddArg(ptr) v.AddArg(mem) return true } // match: (ANDload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem) // cond: ptr.Op != OpSB && is20Bit(o1+o2) && canMergeSym(s1, s2) // result: (ANDload [o1+o2] {mergeSym(s1, s2)} x ptr mem) for { o1 := v.AuxInt s1 := v.Aux _ = v.Args[2] x := v.Args[0] v_1 := v.Args[1] if v_1.Op != OpS390XMOVDaddr { break } o2 := v_1.AuxInt s2 := v_1.Aux ptr := v_1.Args[0] mem := v.Args[2] if !(ptr.Op != OpSB && is20Bit(o1+o2) && canMergeSym(s1, s2)) { break } v.reset(OpS390XANDload) v.AuxInt = o1 + o2 v.Aux = mergeSym(s1, s2) v.AddArg(x) v.AddArg(ptr) v.AddArg(mem) return true } return false } func rewriteValueS390X_OpS390XCMP_0(v *Value) bool { b := v.Block _ = b // match: (CMP x (MOVDconst [c])) // cond: is32Bit(c) // result: (CMPconst x [c]) for { _ = v.Args[1] x := v.Args[0] v_1 := v.Args[1] if v_1.Op != OpS390XMOVDconst { break } c := v_1.AuxInt if !(is32Bit(c)) { break } v.reset(OpS390XCMPconst) v.AuxInt = c v.AddArg(x) return true } // match: (CMP (MOVDconst [c]) x) // cond: is32Bit(c) // result: (InvertFlags (CMPconst x [c])) for { _ = v.Args[1] v_0 := v.Args[0] if v_0.Op != OpS390XMOVDconst { break } c := v_0.AuxInt x := v.Args[1] if !(is32Bit(c)) { break } v.reset(OpS390XInvertFlags) v0 := b.NewValue0(v.Pos, OpS390XCMPconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v.AddArg(v0) return true } return false } func rewriteValueS390X_OpS390XCMPU_0(v *Value) bool { b := v.Block _ = b // match: (CMPU x (MOVDconst [c])) // cond: isU32Bit(c) // result: (CMPUconst x [int64(int32(c))]) for { _ = v.Args[1] x := v.Args[0] v_1 := v.Args[1] if v_1.Op != OpS390XMOVDconst { break } c := v_1.AuxInt if !(isU32Bit(c)) { break } v.reset(OpS390XCMPUconst) v.AuxInt = int64(int32(c)) v.AddArg(x) return true } // match: (CMPU (MOVDconst [c]) x) // cond: isU32Bit(c) // result: (InvertFlags (CMPUconst x [int64(int32(c))])) for { _ = v.Args[1] v_0 := v.Args[0] if v_0.Op != OpS390XMOVDconst { break } c := v_0.AuxInt x := v.Args[1] if !(isU32Bit(c)) { break } v.reset(OpS390XInvertFlags) v0 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags) v0.AuxInt = int64(int32(c)) v0.AddArg(x) v.AddArg(v0) return true } return false } func rewriteValueS390X_OpS390XCMPUconst_0(v *Value) bool { // match: (CMPUconst (MOVDconst [x]) [y]) // cond: uint64(x)==uint64(y) // result: (FlagEQ) for { y := v.AuxInt v_0 := v.Args[0] if v_0.Op != OpS390XMOVDconst { break } x := v_0.AuxInt if !(uint64(x) == uint64(y)) { break } v.reset(OpS390XFlagEQ) return true } // match: (CMPUconst (MOVDconst [x]) [y]) // cond: uint64(x)
uint64(y) // result: (FlagGT) for { y := v.AuxInt v_0 := v.Args[0] if v_0.Op != OpS390XMOVDconst { break } x := v_0.AuxInt if !(uint64(x) > uint64(y)) { break } v.reset(OpS390XFlagGT) return true } return false } func rewriteValueS390X_OpS390XCMPW_0(v *Value) bool { b := v.Block _ = b // match: (CMPW x (MOVDconst [c])) // cond: // result: (CMPWconst x [int64(int32(c))]) for { _ = v.Args[1] x := v.Args[0] v_1 := v.Args[1] if v_1.Op != OpS390XMOVDconst { break } c := v_1.AuxInt v.reset(OpS390XCMPWconst) v.AuxInt = int64(int32(c)) v.AddArg(x) return true } // match: (CMPW (MOVDconst [c]) x) // cond: // result: (InvertFlags (CMPWconst x [int64(int32(c))])) for { _ = v.Args[1] v_0 := v.Args[0] if v_0.Op != OpS390XMOVDconst { break } c := v_0.AuxInt x := v.Args[1] v.reset(OpS390XInvertFlags) v0 := b.NewValue0(v.Pos, OpS390XCMPWconst, types.TypeFlags) v0.AuxInt = int64(int32(c)) v0.AddArg(x) v.AddArg(v0) return true } return false } func rewriteValueS390X_OpS390XCMPWU_0(v *Value) bool { b := v.Block _ = b // match: (CMPWU x (MOVDconst [c])) // cond: // result: (CMPWUconst x [int64(int32(c))]) for { _ = v.Args[1] x := v.Args[0] v_1 := v.Args[1] if v_1.Op != OpS390XMOVDconst { break } c := v_1.AuxInt v.reset(OpS390XCMPWUconst) v.AuxInt = int64(int32(c)) v.AddArg(x) return true } // match: (CMPWU (MOVDconst [c]) x) // cond: // result: (InvertFlags (CMPWUconst x [int64(int32(c))])) for { _ = v.Args[1] v_0 := v.Args[0] if v_0.Op != OpS390XMOVDconst { break } c := v_0.AuxInt x := v.Args[1] v.reset(OpS390XInvertFlags) v0 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags) v0.AuxInt = int64(int32(c)) v0.AddArg(x) v.AddArg(v0) return true } return false } func rewriteValueS390X_OpS390XCMPWUconst_0(v *Value) bool { // match: (CMPWUconst (MOVDconst [x]) [y]) // cond: uint32(x)==uint32(y) // result: (FlagEQ) for { y := v.AuxInt v_0 := v.Args[0] if v_0.Op != OpS390XMOVDconst { break } x := v_0.AuxInt if !(uint32(x) == uint32(y)) { break } v.reset(OpS390XFlagEQ) return true } // match: (CMPWUconst (MOVDconst [x]) [y]) // cond: uint32(x)
uint32(y) // result: (FlagGT) for { y := v.AuxInt v_0 := v.Args[0] if v_0.Op != OpS390XMOVDconst { break } x := v_0.AuxInt if !(uint32(x) > uint32(y)) { break } v.reset(OpS390XFlagGT) return true } return false } func rewriteValueS390X_OpS390XCMPWconst_0(v *Value) bool { // match: (CMPWconst (MOVDconst [x]) [y]) // cond: int32(x)==int32(y) // result: (FlagEQ) for { y := v.AuxInt v_0 := v.Args[0] if v_0.Op != OpS390XMOVDconst { break } x := v_0.AuxInt if !(int32(x) == int32(y)) { break } v.reset(OpS390XFlagEQ) return true } // match: (CMPWconst (MOVDconst [x]) [y]) // cond: int32(x)