&& int64(uint8(c)) == c
&& int64(uint8(d)) == d
&& (!x.Type.IsSigned() || x.Type.Size() > 1)
- -> x
+ => x
// Fold boolean tests into blocks.
// Note: this must match If statement lowering.
(CLIJ {s390x.LessOrGreater} (LOCGR {d} (MOVDconst [0]) (MOVDconst [x]) cmp) [0] yes no)
&& int32(x) != 0
- -> (BRC {d} cmp yes no)
+ => (BRC {d} cmp yes no)
// Compare-and-branch.
// Note: bit 3 (unordered) must not be set so we mask out s390x.Unordered.
-(BRC {c} (CMP x y) yes no) -> (CGRJ {c.(s390x.CCMask)&^s390x.Unordered} x y yes no)
-(BRC {c} (CMPW x y) yes no) -> (CRJ {c.(s390x.CCMask)&^s390x.Unordered} x y yes no)
-(BRC {c} (CMPU x y) yes no) -> (CLGRJ {c.(s390x.CCMask)&^s390x.Unordered} x y yes no)
-(BRC {c} (CMPWU x y) yes no) -> (CLRJ {c.(s390x.CCMask)&^s390x.Unordered} x y yes no)
+(BRC {c} (CMP x y) yes no) => (CGRJ {c&^s390x.Unordered} x y yes no)
+(BRC {c} (CMPW x y) yes no) => (CRJ {c&^s390x.Unordered} x y yes no)
+(BRC {c} (CMPU x y) yes no) => (CLGRJ {c&^s390x.Unordered} x y yes no)
+(BRC {c} (CMPWU x y) yes no) => (CLRJ {c&^s390x.Unordered} x y yes no)
// Compare-and-branch (immediate).
// Note: bit 3 (unordered) must not be set so we mask out s390x.Unordered.
-(BRC {c} (CMPconst x [y]) yes no) && is8Bit(y) -> (CGIJ {c.(s390x.CCMask)&^s390x.Unordered} x [int64(int8(y))] yes no)
-(BRC {c} (CMPWconst x [y]) yes no) && is8Bit(y) -> (CIJ {c.(s390x.CCMask)&^s390x.Unordered} x [int64(int8(y))] yes no)
-(BRC {c} (CMPUconst x [y]) yes no) && isU8Bit(y) -> (CLGIJ {c.(s390x.CCMask)&^s390x.Unordered} x [int64(int8(y))] yes no)
-(BRC {c} (CMPWUconst x [y]) yes no) && isU8Bit(y) -> (CLIJ {c.(s390x.CCMask)&^s390x.Unordered} x [int64(int8(y))] yes no)
+(BRC {c} (CMPconst x [y]) yes no) && y == int32( int8(y)) => (CGIJ {c&^s390x.Unordered} x [ int8(y)] yes no)
+(BRC {c} (CMPWconst x [y]) yes no) && y == int32( int8(y)) => (CIJ {c&^s390x.Unordered} x [ int8(y)] yes no)
+(BRC {c} (CMPUconst x [y]) yes no) && y == int32(uint8(y)) => (CLGIJ {c&^s390x.Unordered} x [uint8(y)] yes no)
+(BRC {c} (CMPWUconst x [y]) yes no) && y == int32(uint8(y)) => (CLIJ {c&^s390x.Unordered} x [uint8(y)] yes no)
// Absorb immediate into compare-and-branch.
-(C(R|GR)J {c} x (MOVDconst [y]) yes no) && is8Bit(y) -> (C(I|GI)J {c} x [int64(int8(y))] yes no)
-(CL(R|GR)J {c} x (MOVDconst [y]) yes no) && isU8Bit(y) -> (CL(I|GI)J {c} x [int64(int8(y))] yes no)
-(C(R|GR)J {c} (MOVDconst [x]) y yes no) && is8Bit(x) -> (C(I|GI)J {c.(s390x.CCMask).ReverseComparison()} y [int64(int8(x))] yes no)
-(CL(R|GR)J {c} (MOVDconst [x]) y yes no) && isU8Bit(x) -> (CL(I|GI)J {c.(s390x.CCMask).ReverseComparison()} y [int64(int8(x))] yes no)
+(C(R|GR)J {c} x (MOVDconst [y]) yes no) && is8Bit(y) => (C(I|GI)J {c} x [ int8(y)] yes no)
+(CL(R|GR)J {c} x (MOVDconst [y]) yes no) && isU8Bit(y) => (CL(I|GI)J {c} x [uint8(y)] yes no)
+(C(R|GR)J {c} (MOVDconst [x]) y yes no) && is8Bit(x) => (C(I|GI)J {c.ReverseComparison()} y [ int8(x)] yes no)
+(CL(R|GR)J {c} (MOVDconst [x]) y yes no) && isU8Bit(x) => (CL(I|GI)J {c.ReverseComparison()} y [uint8(x)] yes no)
// Prefer comparison with immediate to compare-and-branch.
-(CGRJ {c} x (MOVDconst [y]) yes no) && !is8Bit(y) && is32Bit(y) -> (BRC {c} (CMPconst x [int64(int32(y))]) yes no)
-(CRJ {c} x (MOVDconst [y]) yes no) && !is8Bit(y) && is32Bit(y) -> (BRC {c} (CMPWconst x [int64(int32(y))]) yes no)
-(CLGRJ {c} x (MOVDconst [y]) yes no) && !isU8Bit(y) && isU32Bit(y) -> (BRC {c} (CMPUconst x [int64(int32(y))]) yes no)
-(CLRJ {c} x (MOVDconst [y]) yes no) && !isU8Bit(y) && isU32Bit(y) -> (BRC {c} (CMPWUconst x [int64(int32(y))]) yes no)
-(CGRJ {c} (MOVDconst [x]) y yes no) && !is8Bit(x) && is32Bit(x) -> (BRC {c.(s390x.CCMask).ReverseComparison()} (CMPconst y [int64(int32(x))]) yes no)
-(CRJ {c} (MOVDconst [x]) y yes no) && !is8Bit(x) && is32Bit(x) -> (BRC {c.(s390x.CCMask).ReverseComparison()} (CMPWconst y [int64(int32(x))]) yes no)
-(CLGRJ {c} (MOVDconst [x]) y yes no) && !isU8Bit(x) && isU32Bit(x) -> (BRC {c.(s390x.CCMask).ReverseComparison()} (CMPUconst y [int64(int32(x))]) yes no)
-(CLRJ {c} (MOVDconst [x]) y yes no) && !isU8Bit(x) && isU32Bit(x) -> (BRC {c.(s390x.CCMask).ReverseComparison()} (CMPWUconst y [int64(int32(x))]) yes no)
+(CGRJ {c} x (MOVDconst [y]) yes no) && !is8Bit(y) && is32Bit(y) => (BRC {c} (CMPconst x [int32(y)]) yes no)
+(CRJ {c} x (MOVDconst [y]) yes no) && !is8Bit(y) && is32Bit(y) => (BRC {c} (CMPWconst x [int32(y)]) yes no)
+(CLGRJ {c} x (MOVDconst [y]) yes no) && !isU8Bit(y) && isU32Bit(y) => (BRC {c} (CMPUconst x [int32(y)]) yes no)
+(CLRJ {c} x (MOVDconst [y]) yes no) && !isU8Bit(y) && isU32Bit(y) => (BRC {c} (CMPWUconst x [int32(y)]) yes no)
+(CGRJ {c} (MOVDconst [x]) y yes no) && !is8Bit(x) && is32Bit(x) => (BRC {c.ReverseComparison()} (CMPconst y [int32(x)]) yes no)
+(CRJ {c} (MOVDconst [x]) y yes no) && !is8Bit(x) && is32Bit(x) => (BRC {c.ReverseComparison()} (CMPWconst y [int32(x)]) yes no)
+(CLGRJ {c} (MOVDconst [x]) y yes no) && !isU8Bit(x) && isU32Bit(x) => (BRC {c.ReverseComparison()} (CMPUconst y [int32(x)]) yes no)
+(CLRJ {c} (MOVDconst [x]) y yes no) && !isU8Bit(x) && isU32Bit(x) => (BRC {c.ReverseComparison()} (CMPWUconst y [int32(x)]) yes no)
// Absorb sign/zero extensions into 32-bit compare-and-branch.
-(CIJ {c} (MOV(W|WZ)reg x) [y] yes no) -> (CIJ {c} x [y] yes no)
-(CLIJ {c} (MOV(W|WZ)reg x) [y] yes no) -> (CLIJ {c} x [y] yes no)
+(CIJ {c} (MOV(W|WZ)reg x) [y] yes no) => (CIJ {c} x [y] yes no)
+(CLIJ {c} (MOV(W|WZ)reg x) [y] yes no) => (CLIJ {c} x [y] yes no)
// Bring out-of-range signed immediates into range by varying branch condition.
-(BRC {s390x.Less} (CMPconst x [ 128]) yes no) -> (CGIJ {s390x.LessOrEqual} x [ 127] yes no)
-(BRC {s390x.Less} (CMPWconst x [ 128]) yes no) -> (CIJ {s390x.LessOrEqual} x [ 127] yes no)
-(BRC {s390x.LessOrEqual} (CMPconst x [-129]) yes no) -> (CGIJ {s390x.Less} x [-128] yes no)
-(BRC {s390x.LessOrEqual} (CMPWconst x [-129]) yes no) -> (CIJ {s390x.Less} x [-128] yes no)
-(BRC {s390x.Greater} (CMPconst x [-129]) yes no) -> (CGIJ {s390x.GreaterOrEqual} x [-128] yes no)
-(BRC {s390x.Greater} (CMPWconst x [-129]) yes no) -> (CIJ {s390x.GreaterOrEqual} x [-128] yes no)
-(BRC {s390x.GreaterOrEqual} (CMPconst x [ 128]) yes no) -> (CGIJ {s390x.Greater} x [ 127] yes no)
-(BRC {s390x.GreaterOrEqual} (CMPWconst x [ 128]) yes no) -> (CIJ {s390x.Greater} x [ 127] yes no)
+(BRC {s390x.Less} (CMPconst x [ 128]) yes no) => (CGIJ {s390x.LessOrEqual} x [ 127] yes no)
+(BRC {s390x.Less} (CMPWconst x [ 128]) yes no) => (CIJ {s390x.LessOrEqual} x [ 127] yes no)
+(BRC {s390x.LessOrEqual} (CMPconst x [-129]) yes no) => (CGIJ {s390x.Less} x [-128] yes no)
+(BRC {s390x.LessOrEqual} (CMPWconst x [-129]) yes no) => (CIJ {s390x.Less} x [-128] yes no)
+(BRC {s390x.Greater} (CMPconst x [-129]) yes no) => (CGIJ {s390x.GreaterOrEqual} x [-128] yes no)
+(BRC {s390x.Greater} (CMPWconst x [-129]) yes no) => (CIJ {s390x.GreaterOrEqual} x [-128] yes no)
+(BRC {s390x.GreaterOrEqual} (CMPconst x [ 128]) yes no) => (CGIJ {s390x.Greater} x [ 127] yes no)
+(BRC {s390x.GreaterOrEqual} (CMPWconst x [ 128]) yes no) => (CIJ {s390x.Greater} x [ 127] yes no)
// Bring out-of-range unsigned immediates into range by varying branch condition.
-// Note: int64(int8(255)) == -1
-(BRC {s390x.Less} (CMP(WU|U)const x [256]) yes no) -> (C(L|LG)IJ {s390x.LessOrEqual} x [-1] yes no)
-(BRC {s390x.GreaterOrEqual} (CMP(WU|U)const x [256]) yes no) -> (C(L|LG)IJ {s390x.Greater} x [-1] yes no)
+(BRC {s390x.Less} (CMP(WU|U)const x [256]) yes no) => (C(L|LG)IJ {s390x.LessOrEqual} x [255] yes no)
+(BRC {s390x.GreaterOrEqual} (CMP(WU|U)const x [256]) yes no) => (C(L|LG)IJ {s390x.Greater} x [255] yes no)
// Fold constants into instructions.
(ADD x (MOVDconst [c])) && is32Bit(c) -> (ADDconst [c] x)
(MOVDaddridx [c] {s} x (ADDconst [d] y)) && is20Bit(c+d) && y.Op != OpSB -> (MOVDaddridx [c+d] {s} x y)
// reverse ordering of compare instruction
-(LOCGR {c} x y (InvertFlags cmp)) -> (LOCGR {c.(s390x.CCMask).ReverseComparison()} x y cmp)
+(LOCGR {c} x y (InvertFlags cmp)) => (LOCGR {c.ReverseComparison()} x y cmp)
// replace load from same location as preceding store with copy
(MOVDload [off] {sym} ptr1 (MOVDstore [off] {sym} ptr2 x _)) && isSamePtr(ptr1, ptr2) -> x
(MOVDaddridx [off1+off2] {mergeSym(sym1,sym2)} x y)
// Absorb InvertFlags into branches.
-(BRC {c} (InvertFlags cmp) yes no) -> (BRC {c.(s390x.CCMask).ReverseComparison()} cmp yes no)
+(BRC {c} (InvertFlags cmp) yes no) => (BRC {c.ReverseComparison()} cmp yes no)
// Constant comparisons.
(CMPconst (MOVDconst [x]) [y]) && x==y -> (FlagEQ)
(CMPWUconst (ANDWconst _ [m]) [n]) && uint32(m) < uint32(n) -> (FlagLT)
// Constant compare-and-branch with immediate.
-(CGIJ {c} (MOVDconst [x]) [y] yes no) && c.(s390x.CCMask)&s390x.Equal != 0 && int64(x) == int64( int8(y)) -> (First yes no)
-(CGIJ {c} (MOVDconst [x]) [y] yes no) && c.(s390x.CCMask)&s390x.Less != 0 && int64(x) < int64( int8(y)) -> (First yes no)
-(CGIJ {c} (MOVDconst [x]) [y] yes no) && c.(s390x.CCMask)&s390x.Greater != 0 && int64(x) > int64( int8(y)) -> (First yes no)
-(CIJ {c} (MOVDconst [x]) [y] yes no) && c.(s390x.CCMask)&s390x.Equal != 0 && int32(x) == int32( int8(y)) -> (First yes no)
-(CIJ {c} (MOVDconst [x]) [y] yes no) && c.(s390x.CCMask)&s390x.Less != 0 && int32(x) < int32( int8(y)) -> (First yes no)
-(CIJ {c} (MOVDconst [x]) [y] yes no) && c.(s390x.CCMask)&s390x.Greater != 0 && int32(x) > int32( int8(y)) -> (First yes no)
-(CLGIJ {c} (MOVDconst [x]) [y] yes no) && c.(s390x.CCMask)&s390x.Equal != 0 && uint64(x) == uint64(uint8(y)) -> (First yes no)
-(CLGIJ {c} (MOVDconst [x]) [y] yes no) && c.(s390x.CCMask)&s390x.Less != 0 && uint64(x) < uint64(uint8(y)) -> (First yes no)
-(CLGIJ {c} (MOVDconst [x]) [y] yes no) && c.(s390x.CCMask)&s390x.Greater != 0 && uint64(x) > uint64(uint8(y)) -> (First yes no)
-(CLIJ {c} (MOVDconst [x]) [y] yes no) && c.(s390x.CCMask)&s390x.Equal != 0 && uint32(x) == uint32(uint8(y)) -> (First yes no)
-(CLIJ {c} (MOVDconst [x]) [y] yes no) && c.(s390x.CCMask)&s390x.Less != 0 && uint32(x) < uint32(uint8(y)) -> (First yes no)
-(CLIJ {c} (MOVDconst [x]) [y] yes no) && c.(s390x.CCMask)&s390x.Greater != 0 && uint32(x) > uint32(uint8(y)) -> (First yes no)
-(CGIJ {c} (MOVDconst [x]) [y] yes no) && c.(s390x.CCMask)&s390x.Equal == 0 && int64(x) == int64( int8(y)) -> (First no yes)
-(CGIJ {c} (MOVDconst [x]) [y] yes no) && c.(s390x.CCMask)&s390x.Less == 0 && int64(x) < int64( int8(y)) -> (First no yes)
-(CGIJ {c} (MOVDconst [x]) [y] yes no) && c.(s390x.CCMask)&s390x.Greater == 0 && int64(x) > int64( int8(y)) -> (First no yes)
-(CIJ {c} (MOVDconst [x]) [y] yes no) && c.(s390x.CCMask)&s390x.Equal == 0 && int32(x) == int32( int8(y)) -> (First no yes)
-(CIJ {c} (MOVDconst [x]) [y] yes no) && c.(s390x.CCMask)&s390x.Less == 0 && int32(x) < int32( int8(y)) -> (First no yes)
-(CIJ {c} (MOVDconst [x]) [y] yes no) && c.(s390x.CCMask)&s390x.Greater == 0 && int32(x) > int32( int8(y)) -> (First no yes)
-(CLGIJ {c} (MOVDconst [x]) [y] yes no) && c.(s390x.CCMask)&s390x.Equal == 0 && uint64(x) == uint64(uint8(y)) -> (First no yes)
-(CLGIJ {c} (MOVDconst [x]) [y] yes no) && c.(s390x.CCMask)&s390x.Less == 0 && uint64(x) < uint64(uint8(y)) -> (First no yes)
-(CLGIJ {c} (MOVDconst [x]) [y] yes no) && c.(s390x.CCMask)&s390x.Greater == 0 && uint64(x) > uint64(uint8(y)) -> (First no yes)
-(CLIJ {c} (MOVDconst [x]) [y] yes no) && c.(s390x.CCMask)&s390x.Equal == 0 && uint32(x) == uint32(uint8(y)) -> (First no yes)
-(CLIJ {c} (MOVDconst [x]) [y] yes no) && c.(s390x.CCMask)&s390x.Less == 0 && uint32(x) < uint32(uint8(y)) -> (First no yes)
-(CLIJ {c} (MOVDconst [x]) [y] yes no) && c.(s390x.CCMask)&s390x.Greater == 0 && uint32(x) > uint32(uint8(y)) -> (First no yes)
+(CGIJ {c} (MOVDconst [x]) [y] yes no) && c&s390x.Equal != 0 && int64(x) == int64(y) => (First yes no)
+(CGIJ {c} (MOVDconst [x]) [y] yes no) && c&s390x.Less != 0 && int64(x) < int64(y) => (First yes no)
+(CGIJ {c} (MOVDconst [x]) [y] yes no) && c&s390x.Greater != 0 && int64(x) > int64(y) => (First yes no)
+(CIJ {c} (MOVDconst [x]) [y] yes no) && c&s390x.Equal != 0 && int32(x) == int32(y) => (First yes no)
+(CIJ {c} (MOVDconst [x]) [y] yes no) && c&s390x.Less != 0 && int32(x) < int32(y) => (First yes no)
+(CIJ {c} (MOVDconst [x]) [y] yes no) && c&s390x.Greater != 0 && int32(x) > int32(y) => (First yes no)
+(CLGIJ {c} (MOVDconst [x]) [y] yes no) && c&s390x.Equal != 0 && uint64(x) == uint64(y) => (First yes no)
+(CLGIJ {c} (MOVDconst [x]) [y] yes no) && c&s390x.Less != 0 && uint64(x) < uint64(y) => (First yes no)
+(CLGIJ {c} (MOVDconst [x]) [y] yes no) && c&s390x.Greater != 0 && uint64(x) > uint64(y) => (First yes no)
+(CLIJ {c} (MOVDconst [x]) [y] yes no) && c&s390x.Equal != 0 && uint32(x) == uint32(y) => (First yes no)
+(CLIJ {c} (MOVDconst [x]) [y] yes no) && c&s390x.Less != 0 && uint32(x) < uint32(y) => (First yes no)
+(CLIJ {c} (MOVDconst [x]) [y] yes no) && c&s390x.Greater != 0 && uint32(x) > uint32(y) => (First yes no)
+(CGIJ {c} (MOVDconst [x]) [y] yes no) && c&s390x.Equal == 0 && int64(x) == int64(y) => (First no yes)
+(CGIJ {c} (MOVDconst [x]) [y] yes no) && c&s390x.Less == 0 && int64(x) < int64(y) => (First no yes)
+(CGIJ {c} (MOVDconst [x]) [y] yes no) && c&s390x.Greater == 0 && int64(x) > int64(y) => (First no yes)
+(CIJ {c} (MOVDconst [x]) [y] yes no) && c&s390x.Equal == 0 && int32(x) == int32(y) => (First no yes)
+(CIJ {c} (MOVDconst [x]) [y] yes no) && c&s390x.Less == 0 && int32(x) < int32(y) => (First no yes)
+(CIJ {c} (MOVDconst [x]) [y] yes no) && c&s390x.Greater == 0 && int32(x) > int32(y) => (First no yes)
+(CLGIJ {c} (MOVDconst [x]) [y] yes no) && c&s390x.Equal == 0 && uint64(x) == uint64(y) => (First no yes)
+(CLGIJ {c} (MOVDconst [x]) [y] yes no) && c&s390x.Less == 0 && uint64(x) < uint64(y) => (First no yes)
+(CLGIJ {c} (MOVDconst [x]) [y] yes no) && c&s390x.Greater == 0 && uint64(x) > uint64(y) => (First no yes)
+(CLIJ {c} (MOVDconst [x]) [y] yes no) && c&s390x.Equal == 0 && uint32(x) == uint32(y) => (First no yes)
+(CLIJ {c} (MOVDconst [x]) [y] yes no) && c&s390x.Less == 0 && uint32(x) < uint32(y) => (First no yes)
+(CLIJ {c} (MOVDconst [x]) [y] yes no) && c&s390x.Greater == 0 && uint32(x) > uint32(y) => (First no yes)
// Constant compare-and-branch with immediate when unsigned comparison with zero.
-(C(L|LG)IJ {s390x.GreaterOrEqual} _ [0] yes no) -> (First yes no)
-(C(L|LG)IJ {s390x.Less} _ [0] yes no) -> (First no yes)
+(C(L|LG)IJ {s390x.GreaterOrEqual} _ [0] yes no) => (First yes no)
+(C(L|LG)IJ {s390x.Less} _ [0] yes no) => (First no yes)
// Constant compare-and-branch when operands match.
-(C(GR|R|LGR|LR)J {c} x y yes no) && x == y && c.(s390x.CCMask)&s390x.Equal != 0 -> (First yes no)
-(C(GR|R|LGR|LR)J {c} x y yes no) && x == y && c.(s390x.CCMask)&s390x.Equal == 0 -> (First no yes)
+(C(GR|R|LGR|LR)J {c} x y yes no) && x == y && c&s390x.Equal != 0 => (First yes no)
+(C(GR|R|LGR|LR)J {c} x y yes no) && x == y && c&s390x.Equal == 0 => (First no yes)
// Convert 64-bit comparisons to 32-bit comparisons and signed comparisons
// to unsigned comparisons.
(CMP(W|W|WU|WU)const (MOV(W|WZ|W|WZ)reg x) [c]) -> (CMP(W|W|WU|WU)const x [c])
// Absorb flag constants into branches.
-(BRC {c} (FlagEQ) yes no) && c.(s390x.CCMask) & s390x.Equal != 0 -> (First yes no)
-(BRC {c} (FlagLT) yes no) && c.(s390x.CCMask) & s390x.Less != 0 -> (First yes no)
-(BRC {c} (FlagGT) yes no) && c.(s390x.CCMask) & s390x.Greater != 0 -> (First yes no)
-(BRC {c} (FlagOV) yes no) && c.(s390x.CCMask) & s390x.Unordered != 0 -> (First yes no)
+(BRC {c} (FlagEQ) yes no) && c&s390x.Equal != 0 => (First yes no)
+(BRC {c} (FlagLT) yes no) && c&s390x.Less != 0 => (First yes no)
+(BRC {c} (FlagGT) yes no) && c&s390x.Greater != 0 => (First yes no)
+(BRC {c} (FlagOV) yes no) && c&s390x.Unordered != 0 => (First yes no)
-(BRC {c} (FlagEQ) yes no) && c.(s390x.CCMask) & s390x.Equal == 0 -> (First no yes)
-(BRC {c} (FlagLT) yes no) && c.(s390x.CCMask) & s390x.Less == 0 -> (First no yes)
-(BRC {c} (FlagGT) yes no) && c.(s390x.CCMask) & s390x.Greater == 0 -> (First no yes)
-(BRC {c} (FlagOV) yes no) && c.(s390x.CCMask) & s390x.Unordered == 0 -> (First no yes)
+(BRC {c} (FlagEQ) yes no) && c&s390x.Equal == 0 => (First no yes)
+(BRC {c} (FlagLT) yes no) && c&s390x.Less == 0 => (First no yes)
+(BRC {c} (FlagGT) yes no) && c&s390x.Greater == 0 => (First no yes)
+(BRC {c} (FlagOV) yes no) && c&s390x.Unordered == 0 => (First no yes)
// Absorb flag constants into SETxx ops.
-(LOCGR {c} _ x (FlagEQ)) && c.(s390x.CCMask) & s390x.Equal != 0 -> x
-(LOCGR {c} _ x (FlagLT)) && c.(s390x.CCMask) & s390x.Less != 0 -> x
-(LOCGR {c} _ x (FlagGT)) && c.(s390x.CCMask) & s390x.Greater != 0 -> x
-(LOCGR {c} _ x (FlagOV)) && c.(s390x.CCMask) & s390x.Unordered != 0 -> x
-
-(LOCGR {c} x _ (FlagEQ)) && c.(s390x.CCMask) & s390x.Equal == 0 -> x
-(LOCGR {c} x _ (FlagLT)) && c.(s390x.CCMask) & s390x.Less == 0 -> x
-(LOCGR {c} x _ (FlagGT)) && c.(s390x.CCMask) & s390x.Greater == 0 -> x
-(LOCGR {c} x _ (FlagOV)) && c.(s390x.CCMask) & s390x.Unordered == 0 -> x
+(LOCGR {c} _ x (FlagEQ)) && c&s390x.Equal != 0 => x
+(LOCGR {c} _ x (FlagLT)) && c&s390x.Less != 0 => x
+(LOCGR {c} _ x (FlagGT)) && c&s390x.Greater != 0 => x
+(LOCGR {c} _ x (FlagOV)) && c&s390x.Unordered != 0 => x
+
+(LOCGR {c} x _ (FlagEQ)) && c&s390x.Equal == 0 => x
+(LOCGR {c} x _ (FlagLT)) && c&s390x.Less == 0 => x
+(LOCGR {c} x _ (FlagGT)) && c&s390x.Greater == 0 => x
+(LOCGR {c} x _ (FlagOV)) && c&s390x.Unordered == 0 => x
// Remove redundant *const ops
(ADDconst [0] x) -> x
v_1 := v.Args[1]
v_0 := v.Args[0]
// match: (LOCGR {c} x y (InvertFlags cmp))
- // result: (LOCGR {c.(s390x.CCMask).ReverseComparison()} x y cmp)
+ // result: (LOCGR {c.ReverseComparison()} x y cmp)
for {
- c := v.Aux
+ c := auxToS390xCCMask(v.Aux)
x := v_0
y := v_1
if v_2.Op != OpS390XInvertFlags {
}
cmp := v_2.Args[0]
v.reset(OpS390XLOCGR)
- v.Aux = c.(s390x.CCMask).ReverseComparison()
+ v.Aux = s390xCCMaskToAux(c.ReverseComparison())
v.AddArg3(x, y, cmp)
return true
}
// match: (LOCGR {c} _ x (FlagEQ))
- // cond: c.(s390x.CCMask) & s390x.Equal != 0
+ // cond: c&s390x.Equal != 0
// result: x
for {
- c := v.Aux
+ c := auxToS390xCCMask(v.Aux)
x := v_1
- if v_2.Op != OpS390XFlagEQ || !(c.(s390x.CCMask)&s390x.Equal != 0) {
+ if v_2.Op != OpS390XFlagEQ || !(c&s390x.Equal != 0) {
break
}
v.copyOf(x)
return true
}
// match: (LOCGR {c} _ x (FlagLT))
- // cond: c.(s390x.CCMask) & s390x.Less != 0
+ // cond: c&s390x.Less != 0
// result: x
for {
- c := v.Aux
+ c := auxToS390xCCMask(v.Aux)
x := v_1
- if v_2.Op != OpS390XFlagLT || !(c.(s390x.CCMask)&s390x.Less != 0) {
+ if v_2.Op != OpS390XFlagLT || !(c&s390x.Less != 0) {
break
}
v.copyOf(x)
return true
}
// match: (LOCGR {c} _ x (FlagGT))
- // cond: c.(s390x.CCMask) & s390x.Greater != 0
+ // cond: c&s390x.Greater != 0
// result: x
for {
- c := v.Aux
+ c := auxToS390xCCMask(v.Aux)
x := v_1
- if v_2.Op != OpS390XFlagGT || !(c.(s390x.CCMask)&s390x.Greater != 0) {
+ if v_2.Op != OpS390XFlagGT || !(c&s390x.Greater != 0) {
break
}
v.copyOf(x)
return true
}
// match: (LOCGR {c} _ x (FlagOV))
- // cond: c.(s390x.CCMask) & s390x.Unordered != 0
+ // cond: c&s390x.Unordered != 0
// result: x
for {
- c := v.Aux
+ c := auxToS390xCCMask(v.Aux)
x := v_1
- if v_2.Op != OpS390XFlagOV || !(c.(s390x.CCMask)&s390x.Unordered != 0) {
+ if v_2.Op != OpS390XFlagOV || !(c&s390x.Unordered != 0) {
break
}
v.copyOf(x)
return true
}
// match: (LOCGR {c} x _ (FlagEQ))
- // cond: c.(s390x.CCMask) & s390x.Equal == 0
+ // cond: c&s390x.Equal == 0
// result: x
for {
- c := v.Aux
+ c := auxToS390xCCMask(v.Aux)
x := v_0
- if v_2.Op != OpS390XFlagEQ || !(c.(s390x.CCMask)&s390x.Equal == 0) {
+ if v_2.Op != OpS390XFlagEQ || !(c&s390x.Equal == 0) {
break
}
v.copyOf(x)
return true
}
// match: (LOCGR {c} x _ (FlagLT))
- // cond: c.(s390x.CCMask) & s390x.Less == 0
+ // cond: c&s390x.Less == 0
// result: x
for {
- c := v.Aux
+ c := auxToS390xCCMask(v.Aux)
x := v_0
- if v_2.Op != OpS390XFlagLT || !(c.(s390x.CCMask)&s390x.Less == 0) {
+ if v_2.Op != OpS390XFlagLT || !(c&s390x.Less == 0) {
break
}
v.copyOf(x)
return true
}
// match: (LOCGR {c} x _ (FlagGT))
- // cond: c.(s390x.CCMask) & s390x.Greater == 0
+ // cond: c&s390x.Greater == 0
// result: x
for {
- c := v.Aux
+ c := auxToS390xCCMask(v.Aux)
x := v_0
- if v_2.Op != OpS390XFlagGT || !(c.(s390x.CCMask)&s390x.Greater == 0) {
+ if v_2.Op != OpS390XFlagGT || !(c&s390x.Greater == 0) {
break
}
v.copyOf(x)
return true
}
// match: (LOCGR {c} x _ (FlagOV))
- // cond: c.(s390x.CCMask) & s390x.Unordered == 0
+ // cond: c&s390x.Unordered == 0
// result: x
for {
- c := v.Aux
+ c := auxToS390xCCMask(v.Aux)
x := v_0
- if v_2.Op != OpS390XFlagOV || !(c.(s390x.CCMask)&s390x.Unordered == 0) {
+ if v_2.Op != OpS390XFlagOV || !(c&s390x.Unordered == 0) {
break
}
v.copyOf(x)
if x_0.Op != OpS390XMOVDconst {
break
}
- c := x_0.AuxInt
+ c := auxIntToInt64(x_0.AuxInt)
x_1 := x.Args[1]
if x_1.Op != OpS390XMOVDconst {
break
}
- d := x_1.AuxInt
+ d := auxIntToInt64(x_1.AuxInt)
if !(int64(uint8(c)) == c && int64(uint8(d)) == d && (!x.Type.IsSigned() || x.Type.Size() > 1)) {
break
}
switch b.Kind {
case BlockS390XBRC:
// match: (BRC {c} (CMP x y) yes no)
- // result: (CGRJ {c.(s390x.CCMask)&^s390x.Unordered} x y yes no)
+ // result: (CGRJ {c&^s390x.Unordered} x y yes no)
for b.Controls[0].Op == OpS390XCMP {
v_0 := b.Controls[0]
y := v_0.Args[1]
x := v_0.Args[0]
- c := b.Aux
+ c := auxToS390xCCMask(b.Aux)
b.resetWithControl2(BlockS390XCGRJ, x, y)
- b.Aux = c.(s390x.CCMask) &^ s390x.Unordered
+ b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
return true
}
// match: (BRC {c} (CMPW x y) yes no)
- // result: (CRJ {c.(s390x.CCMask)&^s390x.Unordered} x y yes no)
+ // result: (CRJ {c&^s390x.Unordered} x y yes no)
for b.Controls[0].Op == OpS390XCMPW {
v_0 := b.Controls[0]
y := v_0.Args[1]
x := v_0.Args[0]
- c := b.Aux
+ c := auxToS390xCCMask(b.Aux)
b.resetWithControl2(BlockS390XCRJ, x, y)
- b.Aux = c.(s390x.CCMask) &^ s390x.Unordered
+ b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
return true
}
// match: (BRC {c} (CMPU x y) yes no)
- // result: (CLGRJ {c.(s390x.CCMask)&^s390x.Unordered} x y yes no)
+ // result: (CLGRJ {c&^s390x.Unordered} x y yes no)
for b.Controls[0].Op == OpS390XCMPU {
v_0 := b.Controls[0]
y := v_0.Args[1]
x := v_0.Args[0]
- c := b.Aux
+ c := auxToS390xCCMask(b.Aux)
b.resetWithControl2(BlockS390XCLGRJ, x, y)
- b.Aux = c.(s390x.CCMask) &^ s390x.Unordered
+ b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
return true
}
// match: (BRC {c} (CMPWU x y) yes no)
- // result: (CLRJ {c.(s390x.CCMask)&^s390x.Unordered} x y yes no)
+ // result: (CLRJ {c&^s390x.Unordered} x y yes no)
for b.Controls[0].Op == OpS390XCMPWU {
v_0 := b.Controls[0]
y := v_0.Args[1]
x := v_0.Args[0]
- c := b.Aux
+ c := auxToS390xCCMask(b.Aux)
b.resetWithControl2(BlockS390XCLRJ, x, y)
- b.Aux = c.(s390x.CCMask) &^ s390x.Unordered
+ b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
return true
}
// match: (BRC {c} (CMPconst x [y]) yes no)
- // cond: is8Bit(y)
- // result: (CGIJ {c.(s390x.CCMask)&^s390x.Unordered} x [int64(int8(y))] yes no)
+ // cond: y == int32( int8(y))
+ // result: (CGIJ {c&^s390x.Unordered} x [ int8(y)] yes no)
for b.Controls[0].Op == OpS390XCMPconst {
v_0 := b.Controls[0]
- y := v_0.AuxInt
+ y := auxIntToInt32(v_0.AuxInt)
x := v_0.Args[0]
- c := b.Aux
- if !(is8Bit(y)) {
+ c := auxToS390xCCMask(b.Aux)
+ if !(y == int32(int8(y))) {
break
}
b.resetWithControl(BlockS390XCGIJ, x)
- b.AuxInt = int64(int8(y))
- b.Aux = c.(s390x.CCMask) &^ s390x.Unordered
+ b.AuxInt = int8ToAuxInt(int8(y))
+ b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
return true
}
// match: (BRC {c} (CMPWconst x [y]) yes no)
- // cond: is8Bit(y)
- // result: (CIJ {c.(s390x.CCMask)&^s390x.Unordered} x [int64(int8(y))] yes no)
+ // cond: y == int32( int8(y))
+ // result: (CIJ {c&^s390x.Unordered} x [ int8(y)] yes no)
for b.Controls[0].Op == OpS390XCMPWconst {
v_0 := b.Controls[0]
- y := v_0.AuxInt
+ y := auxIntToInt32(v_0.AuxInt)
x := v_0.Args[0]
- c := b.Aux
- if !(is8Bit(y)) {
+ c := auxToS390xCCMask(b.Aux)
+ if !(y == int32(int8(y))) {
break
}
b.resetWithControl(BlockS390XCIJ, x)
- b.AuxInt = int64(int8(y))
- b.Aux = c.(s390x.CCMask) &^ s390x.Unordered
+ b.AuxInt = int8ToAuxInt(int8(y))
+ b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
return true
}
// match: (BRC {c} (CMPUconst x [y]) yes no)
- // cond: isU8Bit(y)
- // result: (CLGIJ {c.(s390x.CCMask)&^s390x.Unordered} x [int64(int8(y))] yes no)
+ // cond: y == int32(uint8(y))
+ // result: (CLGIJ {c&^s390x.Unordered} x [uint8(y)] yes no)
for b.Controls[0].Op == OpS390XCMPUconst {
v_0 := b.Controls[0]
- y := v_0.AuxInt
+ y := auxIntToInt32(v_0.AuxInt)
x := v_0.Args[0]
- c := b.Aux
- if !(isU8Bit(y)) {
+ c := auxToS390xCCMask(b.Aux)
+ if !(y == int32(uint8(y))) {
break
}
b.resetWithControl(BlockS390XCLGIJ, x)
- b.AuxInt = int64(int8(y))
- b.Aux = c.(s390x.CCMask) &^ s390x.Unordered
+ b.AuxInt = uint8ToAuxInt(uint8(y))
+ b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
return true
}
// match: (BRC {c} (CMPWUconst x [y]) yes no)
- // cond: isU8Bit(y)
- // result: (CLIJ {c.(s390x.CCMask)&^s390x.Unordered} x [int64(int8(y))] yes no)
+ // cond: y == int32(uint8(y))
+ // result: (CLIJ {c&^s390x.Unordered} x [uint8(y)] yes no)
for b.Controls[0].Op == OpS390XCMPWUconst {
v_0 := b.Controls[0]
- y := v_0.AuxInt
+ y := auxIntToInt32(v_0.AuxInt)
x := v_0.Args[0]
- c := b.Aux
- if !(isU8Bit(y)) {
+ c := auxToS390xCCMask(b.Aux)
+ if !(y == int32(uint8(y))) {
break
}
b.resetWithControl(BlockS390XCLIJ, x)
- b.AuxInt = int64(int8(y))
- b.Aux = c.(s390x.CCMask) &^ s390x.Unordered
+ b.AuxInt = uint8ToAuxInt(uint8(y))
+ b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
return true
}
// match: (BRC {s390x.Less} (CMPconst x [ 128]) yes no)
// result: (CGIJ {s390x.LessOrEqual} x [ 127] yes no)
for b.Controls[0].Op == OpS390XCMPconst {
v_0 := b.Controls[0]
- if v_0.AuxInt != 128 {
+ if auxIntToInt32(v_0.AuxInt) != 128 {
break
}
x := v_0.Args[0]
- if b.Aux != s390x.Less {
+ if auxToS390xCCMask(b.Aux) != s390x.Less {
break
}
b.resetWithControl(BlockS390XCGIJ, x)
- b.AuxInt = 127
- b.Aux = s390x.LessOrEqual
+ b.AuxInt = int8ToAuxInt(127)
+ b.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
return true
}
// match: (BRC {s390x.Less} (CMPWconst x [ 128]) yes no)
// result: (CIJ {s390x.LessOrEqual} x [ 127] yes no)
for b.Controls[0].Op == OpS390XCMPWconst {
v_0 := b.Controls[0]
- if v_0.AuxInt != 128 {
+ if auxIntToInt32(v_0.AuxInt) != 128 {
break
}
x := v_0.Args[0]
- if b.Aux != s390x.Less {
+ if auxToS390xCCMask(b.Aux) != s390x.Less {
break
}
b.resetWithControl(BlockS390XCIJ, x)
- b.AuxInt = 127
- b.Aux = s390x.LessOrEqual
+ b.AuxInt = int8ToAuxInt(127)
+ b.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
return true
}
// match: (BRC {s390x.LessOrEqual} (CMPconst x [-129]) yes no)
// result: (CGIJ {s390x.Less} x [-128] yes no)
for b.Controls[0].Op == OpS390XCMPconst {
v_0 := b.Controls[0]
- if v_0.AuxInt != -129 {
+ if auxIntToInt32(v_0.AuxInt) != -129 {
break
}
x := v_0.Args[0]
- if b.Aux != s390x.LessOrEqual {
+ if auxToS390xCCMask(b.Aux) != s390x.LessOrEqual {
break
}
b.resetWithControl(BlockS390XCGIJ, x)
- b.AuxInt = -128
- b.Aux = s390x.Less
+ b.AuxInt = int8ToAuxInt(-128)
+ b.Aux = s390xCCMaskToAux(s390x.Less)
return true
}
// match: (BRC {s390x.LessOrEqual} (CMPWconst x [-129]) yes no)
// result: (CIJ {s390x.Less} x [-128] yes no)
for b.Controls[0].Op == OpS390XCMPWconst {
v_0 := b.Controls[0]
- if v_0.AuxInt != -129 {
+ if auxIntToInt32(v_0.AuxInt) != -129 {
break
}
x := v_0.Args[0]
- if b.Aux != s390x.LessOrEqual {
+ if auxToS390xCCMask(b.Aux) != s390x.LessOrEqual {
break
}
b.resetWithControl(BlockS390XCIJ, x)
- b.AuxInt = -128
- b.Aux = s390x.Less
+ b.AuxInt = int8ToAuxInt(-128)
+ b.Aux = s390xCCMaskToAux(s390x.Less)
return true
}
// match: (BRC {s390x.Greater} (CMPconst x [-129]) yes no)
// result: (CGIJ {s390x.GreaterOrEqual} x [-128] yes no)
for b.Controls[0].Op == OpS390XCMPconst {
v_0 := b.Controls[0]
- if v_0.AuxInt != -129 {
+ if auxIntToInt32(v_0.AuxInt) != -129 {
break
}
x := v_0.Args[0]
- if b.Aux != s390x.Greater {
+ if auxToS390xCCMask(b.Aux) != s390x.Greater {
break
}
b.resetWithControl(BlockS390XCGIJ, x)
- b.AuxInt = -128
- b.Aux = s390x.GreaterOrEqual
+ b.AuxInt = int8ToAuxInt(-128)
+ b.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
return true
}
// match: (BRC {s390x.Greater} (CMPWconst x [-129]) yes no)
// result: (CIJ {s390x.GreaterOrEqual} x [-128] yes no)
for b.Controls[0].Op == OpS390XCMPWconst {
v_0 := b.Controls[0]
- if v_0.AuxInt != -129 {
+ if auxIntToInt32(v_0.AuxInt) != -129 {
break
}
x := v_0.Args[0]
- if b.Aux != s390x.Greater {
+ if auxToS390xCCMask(b.Aux) != s390x.Greater {
break
}
b.resetWithControl(BlockS390XCIJ, x)
- b.AuxInt = -128
- b.Aux = s390x.GreaterOrEqual
+ b.AuxInt = int8ToAuxInt(-128)
+ b.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
return true
}
// match: (BRC {s390x.GreaterOrEqual} (CMPconst x [ 128]) yes no)
// result: (CGIJ {s390x.Greater} x [ 127] yes no)
for b.Controls[0].Op == OpS390XCMPconst {
v_0 := b.Controls[0]
- if v_0.AuxInt != 128 {
+ if auxIntToInt32(v_0.AuxInt) != 128 {
break
}
x := v_0.Args[0]
- if b.Aux != s390x.GreaterOrEqual {
+ if auxToS390xCCMask(b.Aux) != s390x.GreaterOrEqual {
break
}
b.resetWithControl(BlockS390XCGIJ, x)
- b.AuxInt = 127
- b.Aux = s390x.Greater
+ b.AuxInt = int8ToAuxInt(127)
+ b.Aux = s390xCCMaskToAux(s390x.Greater)
return true
}
// match: (BRC {s390x.GreaterOrEqual} (CMPWconst x [ 128]) yes no)
// result: (CIJ {s390x.Greater} x [ 127] yes no)
for b.Controls[0].Op == OpS390XCMPWconst {
v_0 := b.Controls[0]
- if v_0.AuxInt != 128 {
+ if auxIntToInt32(v_0.AuxInt) != 128 {
break
}
x := v_0.Args[0]
- if b.Aux != s390x.GreaterOrEqual {
+ if auxToS390xCCMask(b.Aux) != s390x.GreaterOrEqual {
break
}
b.resetWithControl(BlockS390XCIJ, x)
- b.AuxInt = 127
- b.Aux = s390x.Greater
+ b.AuxInt = int8ToAuxInt(127)
+ b.Aux = s390xCCMaskToAux(s390x.Greater)
return true
}
// match: (BRC {s390x.Less} (CMPWUconst x [256]) yes no)
- // result: (CLIJ {s390x.LessOrEqual} x [-1] yes no)
+ // result: (CLIJ {s390x.LessOrEqual} x [255] yes no)
for b.Controls[0].Op == OpS390XCMPWUconst {
v_0 := b.Controls[0]
- if v_0.AuxInt != 256 {
+ if auxIntToInt32(v_0.AuxInt) != 256 {
break
}
x := v_0.Args[0]
- if b.Aux != s390x.Less {
+ if auxToS390xCCMask(b.Aux) != s390x.Less {
break
}
b.resetWithControl(BlockS390XCLIJ, x)
- b.AuxInt = -1
- b.Aux = s390x.LessOrEqual
+ b.AuxInt = uint8ToAuxInt(255)
+ b.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
return true
}
// match: (BRC {s390x.Less} (CMPUconst x [256]) yes no)
- // result: (CLGIJ {s390x.LessOrEqual} x [-1] yes no)
+ // result: (CLGIJ {s390x.LessOrEqual} x [255] yes no)
for b.Controls[0].Op == OpS390XCMPUconst {
v_0 := b.Controls[0]
- if v_0.AuxInt != 256 {
+ if auxIntToInt32(v_0.AuxInt) != 256 {
break
}
x := v_0.Args[0]
- if b.Aux != s390x.Less {
+ if auxToS390xCCMask(b.Aux) != s390x.Less {
break
}
b.resetWithControl(BlockS390XCLGIJ, x)
- b.AuxInt = -1
- b.Aux = s390x.LessOrEqual
+ b.AuxInt = uint8ToAuxInt(255)
+ b.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
return true
}
// match: (BRC {s390x.GreaterOrEqual} (CMPWUconst x [256]) yes no)
- // result: (CLIJ {s390x.Greater} x [-1] yes no)
+ // result: (CLIJ {s390x.Greater} x [255] yes no)
for b.Controls[0].Op == OpS390XCMPWUconst {
v_0 := b.Controls[0]
- if v_0.AuxInt != 256 {
+ if auxIntToInt32(v_0.AuxInt) != 256 {
break
}
x := v_0.Args[0]
- if b.Aux != s390x.GreaterOrEqual {
+ if auxToS390xCCMask(b.Aux) != s390x.GreaterOrEqual {
break
}
b.resetWithControl(BlockS390XCLIJ, x)
- b.AuxInt = -1
- b.Aux = s390x.Greater
+ b.AuxInt = uint8ToAuxInt(255)
+ b.Aux = s390xCCMaskToAux(s390x.Greater)
return true
}
// match: (BRC {s390x.GreaterOrEqual} (CMPUconst x [256]) yes no)
- // result: (CLGIJ {s390x.Greater} x [-1] yes no)
+ // result: (CLGIJ {s390x.Greater} x [255] yes no)
for b.Controls[0].Op == OpS390XCMPUconst {
v_0 := b.Controls[0]
- if v_0.AuxInt != 256 {
+ if auxIntToInt32(v_0.AuxInt) != 256 {
break
}
x := v_0.Args[0]
- if b.Aux != s390x.GreaterOrEqual {
+ if auxToS390xCCMask(b.Aux) != s390x.GreaterOrEqual {
break
}
b.resetWithControl(BlockS390XCLGIJ, x)
- b.AuxInt = -1
- b.Aux = s390x.Greater
+ b.AuxInt = uint8ToAuxInt(255)
+ b.Aux = s390xCCMaskToAux(s390x.Greater)
return true
}
// match: (BRC {c} (InvertFlags cmp) yes no)
- // result: (BRC {c.(s390x.CCMask).ReverseComparison()} cmp yes no)
+ // result: (BRC {c.ReverseComparison()} cmp yes no)
for b.Controls[0].Op == OpS390XInvertFlags {
v_0 := b.Controls[0]
cmp := v_0.Args[0]
- c := b.Aux
+ c := auxToS390xCCMask(b.Aux)
b.resetWithControl(BlockS390XBRC, cmp)
- b.Aux = c.(s390x.CCMask).ReverseComparison()
+ b.Aux = s390xCCMaskToAux(c.ReverseComparison())
return true
}
// match: (BRC {c} (FlagEQ) yes no)
- // cond: c.(s390x.CCMask) & s390x.Equal != 0
+ // cond: c&s390x.Equal != 0
// result: (First yes no)
for b.Controls[0].Op == OpS390XFlagEQ {
- c := b.Aux
- if !(c.(s390x.CCMask)&s390x.Equal != 0) {
+ c := auxToS390xCCMask(b.Aux)
+ if !(c&s390x.Equal != 0) {
break
}
b.Reset(BlockFirst)
return true
}
// match: (BRC {c} (FlagLT) yes no)
- // cond: c.(s390x.CCMask) & s390x.Less != 0
+ // cond: c&s390x.Less != 0
// result: (First yes no)
for b.Controls[0].Op == OpS390XFlagLT {
- c := b.Aux
- if !(c.(s390x.CCMask)&s390x.Less != 0) {
+ c := auxToS390xCCMask(b.Aux)
+ if !(c&s390x.Less != 0) {
break
}
b.Reset(BlockFirst)
return true
}
// match: (BRC {c} (FlagGT) yes no)
- // cond: c.(s390x.CCMask) & s390x.Greater != 0
+ // cond: c&s390x.Greater != 0
// result: (First yes no)
for b.Controls[0].Op == OpS390XFlagGT {
- c := b.Aux
- if !(c.(s390x.CCMask)&s390x.Greater != 0) {
+ c := auxToS390xCCMask(b.Aux)
+ if !(c&s390x.Greater != 0) {
break
}
b.Reset(BlockFirst)
return true
}
// match: (BRC {c} (FlagOV) yes no)
- // cond: c.(s390x.CCMask) & s390x.Unordered != 0
+ // cond: c&s390x.Unordered != 0
// result: (First yes no)
for b.Controls[0].Op == OpS390XFlagOV {
- c := b.Aux
- if !(c.(s390x.CCMask)&s390x.Unordered != 0) {
+ c := auxToS390xCCMask(b.Aux)
+ if !(c&s390x.Unordered != 0) {
break
}
b.Reset(BlockFirst)
return true
}
// match: (BRC {c} (FlagEQ) yes no)
- // cond: c.(s390x.CCMask) & s390x.Equal == 0
+ // cond: c&s390x.Equal == 0
// result: (First no yes)
for b.Controls[0].Op == OpS390XFlagEQ {
- c := b.Aux
- if !(c.(s390x.CCMask)&s390x.Equal == 0) {
+ c := auxToS390xCCMask(b.Aux)
+ if !(c&s390x.Equal == 0) {
break
}
b.Reset(BlockFirst)
return true
}
// match: (BRC {c} (FlagLT) yes no)
- // cond: c.(s390x.CCMask) & s390x.Less == 0
+ // cond: c&s390x.Less == 0
// result: (First no yes)
for b.Controls[0].Op == OpS390XFlagLT {
- c := b.Aux
- if !(c.(s390x.CCMask)&s390x.Less == 0) {
+ c := auxToS390xCCMask(b.Aux)
+ if !(c&s390x.Less == 0) {
break
}
b.Reset(BlockFirst)
return true
}
// match: (BRC {c} (FlagGT) yes no)
- // cond: c.(s390x.CCMask) & s390x.Greater == 0
+ // cond: c&s390x.Greater == 0
// result: (First no yes)
for b.Controls[0].Op == OpS390XFlagGT {
- c := b.Aux
- if !(c.(s390x.CCMask)&s390x.Greater == 0) {
+ c := auxToS390xCCMask(b.Aux)
+ if !(c&s390x.Greater == 0) {
break
}
b.Reset(BlockFirst)
return true
}
// match: (BRC {c} (FlagOV) yes no)
- // cond: c.(s390x.CCMask) & s390x.Unordered == 0
+ // cond: c&s390x.Unordered == 0
// result: (First no yes)
for b.Controls[0].Op == OpS390XFlagOV {
- c := b.Aux
- if !(c.(s390x.CCMask)&s390x.Unordered == 0) {
+ c := auxToS390xCCMask(b.Aux)
+ if !(c&s390x.Unordered == 0) {
break
}
b.Reset(BlockFirst)
}
case BlockS390XCGIJ:
// match: (CGIJ {c} (MOVDconst [x]) [y] yes no)
- // cond: c.(s390x.CCMask)&s390x.Equal != 0 && int64(x) == int64( int8(y))
+ // cond: c&s390x.Equal != 0 && int64(x) == int64(y)
// result: (First yes no)
for b.Controls[0].Op == OpS390XMOVDconst {
v_0 := b.Controls[0]
- x := v_0.AuxInt
- y := b.AuxInt
- c := b.Aux
- if !(c.(s390x.CCMask)&s390x.Equal != 0 && int64(x) == int64(int8(y))) {
+ x := auxIntToInt64(v_0.AuxInt)
+ y := auxIntToInt8(b.AuxInt)
+ c := auxToS390xCCMask(b.Aux)
+ if !(c&s390x.Equal != 0 && int64(x) == int64(y)) {
break
}
b.Reset(BlockFirst)
return true
}
// match: (CGIJ {c} (MOVDconst [x]) [y] yes no)
- // cond: c.(s390x.CCMask)&s390x.Less != 0 && int64(x) < int64( int8(y))
+ // cond: c&s390x.Less != 0 && int64(x) < int64(y)
// result: (First yes no)
for b.Controls[0].Op == OpS390XMOVDconst {
v_0 := b.Controls[0]
- x := v_0.AuxInt
- y := b.AuxInt
- c := b.Aux
- if !(c.(s390x.CCMask)&s390x.Less != 0 && int64(x) < int64(int8(y))) {
+ x := auxIntToInt64(v_0.AuxInt)
+ y := auxIntToInt8(b.AuxInt)
+ c := auxToS390xCCMask(b.Aux)
+ if !(c&s390x.Less != 0 && int64(x) < int64(y)) {
break
}
b.Reset(BlockFirst)
return true
}
// match: (CGIJ {c} (MOVDconst [x]) [y] yes no)
- // cond: c.(s390x.CCMask)&s390x.Greater != 0 && int64(x) > int64( int8(y))
+ // cond: c&s390x.Greater != 0 && int64(x) > int64(y)
// result: (First yes no)
for b.Controls[0].Op == OpS390XMOVDconst {
v_0 := b.Controls[0]
- x := v_0.AuxInt
- y := b.AuxInt
- c := b.Aux
- if !(c.(s390x.CCMask)&s390x.Greater != 0 && int64(x) > int64(int8(y))) {
+ x := auxIntToInt64(v_0.AuxInt)
+ y := auxIntToInt8(b.AuxInt)
+ c := auxToS390xCCMask(b.Aux)
+ if !(c&s390x.Greater != 0 && int64(x) > int64(y)) {
break
}
b.Reset(BlockFirst)
return true
}
// match: (CGIJ {c} (MOVDconst [x]) [y] yes no)
- // cond: c.(s390x.CCMask)&s390x.Equal == 0 && int64(x) == int64( int8(y))
+ // cond: c&s390x.Equal == 0 && int64(x) == int64(y)
// result: (First no yes)
for b.Controls[0].Op == OpS390XMOVDconst {
v_0 := b.Controls[0]
- x := v_0.AuxInt
- y := b.AuxInt
- c := b.Aux
- if !(c.(s390x.CCMask)&s390x.Equal == 0 && int64(x) == int64(int8(y))) {
+ x := auxIntToInt64(v_0.AuxInt)
+ y := auxIntToInt8(b.AuxInt)
+ c := auxToS390xCCMask(b.Aux)
+ if !(c&s390x.Equal == 0 && int64(x) == int64(y)) {
break
}
b.Reset(BlockFirst)
return true
}
// match: (CGIJ {c} (MOVDconst [x]) [y] yes no)
- // cond: c.(s390x.CCMask)&s390x.Less == 0 && int64(x) < int64( int8(y))
+ // cond: c&s390x.Less == 0 && int64(x) < int64(y)
// result: (First no yes)
for b.Controls[0].Op == OpS390XMOVDconst {
v_0 := b.Controls[0]
- x := v_0.AuxInt
- y := b.AuxInt
- c := b.Aux
- if !(c.(s390x.CCMask)&s390x.Less == 0 && int64(x) < int64(int8(y))) {
+ x := auxIntToInt64(v_0.AuxInt)
+ y := auxIntToInt8(b.AuxInt)
+ c := auxToS390xCCMask(b.Aux)
+ if !(c&s390x.Less == 0 && int64(x) < int64(y)) {
break
}
b.Reset(BlockFirst)
return true
}
// match: (CGIJ {c} (MOVDconst [x]) [y] yes no)
- // cond: c.(s390x.CCMask)&s390x.Greater == 0 && int64(x) > int64( int8(y))
+ // cond: c&s390x.Greater == 0 && int64(x) > int64(y)
// result: (First no yes)
for b.Controls[0].Op == OpS390XMOVDconst {
v_0 := b.Controls[0]
- x := v_0.AuxInt
- y := b.AuxInt
- c := b.Aux
- if !(c.(s390x.CCMask)&s390x.Greater == 0 && int64(x) > int64(int8(y))) {
+ x := auxIntToInt64(v_0.AuxInt)
+ y := auxIntToInt8(b.AuxInt)
+ c := auxToS390xCCMask(b.Aux)
+ if !(c&s390x.Greater == 0 && int64(x) > int64(y)) {
break
}
b.Reset(BlockFirst)
case BlockS390XCGRJ:
// match: (CGRJ {c} x (MOVDconst [y]) yes no)
// cond: is8Bit(y)
- // result: (CGIJ {c} x [int64(int8(y))] yes no)
+ // result: (CGIJ {c} x [ int8(y)] yes no)
for b.Controls[1].Op == OpS390XMOVDconst {
x := b.Controls[0]
v_1 := b.Controls[1]
- y := v_1.AuxInt
- c := b.Aux
+ y := auxIntToInt64(v_1.AuxInt)
+ c := auxToS390xCCMask(b.Aux)
if !(is8Bit(y)) {
break
}
b.resetWithControl(BlockS390XCGIJ, x)
- b.AuxInt = int64(int8(y))
- b.Aux = c
+ b.AuxInt = int8ToAuxInt(int8(y))
+ b.Aux = s390xCCMaskToAux(c)
return true
}
// match: (CGRJ {c} (MOVDconst [x]) y yes no)
// cond: is8Bit(x)
- // result: (CGIJ {c.(s390x.CCMask).ReverseComparison()} y [int64(int8(x))] yes no)
+ // result: (CGIJ {c.ReverseComparison()} y [ int8(x)] yes no)
for b.Controls[0].Op == OpS390XMOVDconst {
v_0 := b.Controls[0]
- x := v_0.AuxInt
+ x := auxIntToInt64(v_0.AuxInt)
y := b.Controls[1]
- c := b.Aux
+ c := auxToS390xCCMask(b.Aux)
if !(is8Bit(x)) {
break
}
b.resetWithControl(BlockS390XCGIJ, y)
- b.AuxInt = int64(int8(x))
- b.Aux = c.(s390x.CCMask).ReverseComparison()
+ b.AuxInt = int8ToAuxInt(int8(x))
+ b.Aux = s390xCCMaskToAux(c.ReverseComparison())
return true
}
// match: (CGRJ {c} x (MOVDconst [y]) yes no)
// cond: !is8Bit(y) && is32Bit(y)
- // result: (BRC {c} (CMPconst x [int64(int32(y))]) yes no)
+ // result: (BRC {c} (CMPconst x [int32(y)]) yes no)
for b.Controls[1].Op == OpS390XMOVDconst {
x := b.Controls[0]
v_1 := b.Controls[1]
- y := v_1.AuxInt
- c := b.Aux
+ y := auxIntToInt64(v_1.AuxInt)
+ c := auxToS390xCCMask(b.Aux)
if !(!is8Bit(y) && is32Bit(y)) {
break
}
v0 := b.NewValue0(x.Pos, OpS390XCMPconst, types.TypeFlags)
- v0.AuxInt = int64(int32(y))
+ v0.AuxInt = int32ToAuxInt(int32(y))
v0.AddArg(x)
b.resetWithControl(BlockS390XBRC, v0)
- b.Aux = c
+ b.Aux = s390xCCMaskToAux(c)
return true
}
// match: (CGRJ {c} (MOVDconst [x]) y yes no)
// cond: !is8Bit(x) && is32Bit(x)
- // result: (BRC {c.(s390x.CCMask).ReverseComparison()} (CMPconst y [int64(int32(x))]) yes no)
+ // result: (BRC {c.ReverseComparison()} (CMPconst y [int32(x)]) yes no)
for b.Controls[0].Op == OpS390XMOVDconst {
v_0 := b.Controls[0]
- x := v_0.AuxInt
+ x := auxIntToInt64(v_0.AuxInt)
y := b.Controls[1]
- c := b.Aux
+ c := auxToS390xCCMask(b.Aux)
if !(!is8Bit(x) && is32Bit(x)) {
break
}
v0 := b.NewValue0(v_0.Pos, OpS390XCMPconst, types.TypeFlags)
- v0.AuxInt = int64(int32(x))
+ v0.AuxInt = int32ToAuxInt(int32(x))
v0.AddArg(y)
b.resetWithControl(BlockS390XBRC, v0)
- b.Aux = c.(s390x.CCMask).ReverseComparison()
+ b.Aux = s390xCCMaskToAux(c.ReverseComparison())
return true
}
// match: (CGRJ {c} x y yes no)
- // cond: x == y && c.(s390x.CCMask)&s390x.Equal != 0
+ // cond: x == y && c&s390x.Equal != 0
// result: (First yes no)
for {
x := b.Controls[0]
y := b.Controls[1]
- c := b.Aux
- if !(x == y && c.(s390x.CCMask)&s390x.Equal != 0) {
+ c := auxToS390xCCMask(b.Aux)
+ if !(x == y && c&s390x.Equal != 0) {
break
}
b.Reset(BlockFirst)
return true
}
// match: (CGRJ {c} x y yes no)
- // cond: x == y && c.(s390x.CCMask)&s390x.Equal == 0
+ // cond: x == y && c&s390x.Equal == 0
// result: (First no yes)
for {
x := b.Controls[0]
y := b.Controls[1]
- c := b.Aux
- if !(x == y && c.(s390x.CCMask)&s390x.Equal == 0) {
+ c := auxToS390xCCMask(b.Aux)
+ if !(x == y && c&s390x.Equal == 0) {
break
}
b.Reset(BlockFirst)
for b.Controls[0].Op == OpS390XMOVWreg {
v_0 := b.Controls[0]
x := v_0.Args[0]
- y := b.AuxInt
- c := b.Aux
+ y := auxIntToInt8(b.AuxInt)
+ c := auxToS390xCCMask(b.Aux)
b.resetWithControl(BlockS390XCIJ, x)
- b.AuxInt = y
- b.Aux = c
+ b.AuxInt = int8ToAuxInt(y)
+ b.Aux = s390xCCMaskToAux(c)
return true
}
// match: (CIJ {c} (MOVWZreg x) [y] yes no)
for b.Controls[0].Op == OpS390XMOVWZreg {
v_0 := b.Controls[0]
x := v_0.Args[0]
- y := b.AuxInt
- c := b.Aux
+ y := auxIntToInt8(b.AuxInt)
+ c := auxToS390xCCMask(b.Aux)
b.resetWithControl(BlockS390XCIJ, x)
- b.AuxInt = y
- b.Aux = c
+ b.AuxInt = int8ToAuxInt(y)
+ b.Aux = s390xCCMaskToAux(c)
return true
}
// match: (CIJ {c} (MOVDconst [x]) [y] yes no)
- // cond: c.(s390x.CCMask)&s390x.Equal != 0 && int32(x) == int32( int8(y))
+ // cond: c&s390x.Equal != 0 && int32(x) == int32(y)
// result: (First yes no)
for b.Controls[0].Op == OpS390XMOVDconst {
v_0 := b.Controls[0]
- x := v_0.AuxInt
- y := b.AuxInt
- c := b.Aux
- if !(c.(s390x.CCMask)&s390x.Equal != 0 && int32(x) == int32(int8(y))) {
+ x := auxIntToInt64(v_0.AuxInt)
+ y := auxIntToInt8(b.AuxInt)
+ c := auxToS390xCCMask(b.Aux)
+ if !(c&s390x.Equal != 0 && int32(x) == int32(y)) {
break
}
b.Reset(BlockFirst)
return true
}
// match: (CIJ {c} (MOVDconst [x]) [y] yes no)
- // cond: c.(s390x.CCMask)&s390x.Less != 0 && int32(x) < int32( int8(y))
+ // cond: c&s390x.Less != 0 && int32(x) < int32(y)
// result: (First yes no)
for b.Controls[0].Op == OpS390XMOVDconst {
v_0 := b.Controls[0]
- x := v_0.AuxInt
- y := b.AuxInt
- c := b.Aux
- if !(c.(s390x.CCMask)&s390x.Less != 0 && int32(x) < int32(int8(y))) {
+ x := auxIntToInt64(v_0.AuxInt)
+ y := auxIntToInt8(b.AuxInt)
+ c := auxToS390xCCMask(b.Aux)
+ if !(c&s390x.Less != 0 && int32(x) < int32(y)) {
break
}
b.Reset(BlockFirst)
return true
}
// match: (CIJ {c} (MOVDconst [x]) [y] yes no)
- // cond: c.(s390x.CCMask)&s390x.Greater != 0 && int32(x) > int32( int8(y))
+ // cond: c&s390x.Greater != 0 && int32(x) > int32(y)
// result: (First yes no)
for b.Controls[0].Op == OpS390XMOVDconst {
v_0 := b.Controls[0]
- x := v_0.AuxInt
- y := b.AuxInt
- c := b.Aux
- if !(c.(s390x.CCMask)&s390x.Greater != 0 && int32(x) > int32(int8(y))) {
+ x := auxIntToInt64(v_0.AuxInt)
+ y := auxIntToInt8(b.AuxInt)
+ c := auxToS390xCCMask(b.Aux)
+ if !(c&s390x.Greater != 0 && int32(x) > int32(y)) {
break
}
b.Reset(BlockFirst)
return true
}
// match: (CIJ {c} (MOVDconst [x]) [y] yes no)
- // cond: c.(s390x.CCMask)&s390x.Equal == 0 && int32(x) == int32( int8(y))
+ // cond: c&s390x.Equal == 0 && int32(x) == int32(y)
// result: (First no yes)
for b.Controls[0].Op == OpS390XMOVDconst {
v_0 := b.Controls[0]
- x := v_0.AuxInt
- y := b.AuxInt
- c := b.Aux
- if !(c.(s390x.CCMask)&s390x.Equal == 0 && int32(x) == int32(int8(y))) {
+ x := auxIntToInt64(v_0.AuxInt)
+ y := auxIntToInt8(b.AuxInt)
+ c := auxToS390xCCMask(b.Aux)
+ if !(c&s390x.Equal == 0 && int32(x) == int32(y)) {
break
}
b.Reset(BlockFirst)
return true
}
// match: (CIJ {c} (MOVDconst [x]) [y] yes no)
- // cond: c.(s390x.CCMask)&s390x.Less == 0 && int32(x) < int32( int8(y))
+ // cond: c&s390x.Less == 0 && int32(x) < int32(y)
// result: (First no yes)
for b.Controls[0].Op == OpS390XMOVDconst {
v_0 := b.Controls[0]
- x := v_0.AuxInt
- y := b.AuxInt
- c := b.Aux
- if !(c.(s390x.CCMask)&s390x.Less == 0 && int32(x) < int32(int8(y))) {
+ x := auxIntToInt64(v_0.AuxInt)
+ y := auxIntToInt8(b.AuxInt)
+ c := auxToS390xCCMask(b.Aux)
+ if !(c&s390x.Less == 0 && int32(x) < int32(y)) {
break
}
b.Reset(BlockFirst)
return true
}
// match: (CIJ {c} (MOVDconst [x]) [y] yes no)
- // cond: c.(s390x.CCMask)&s390x.Greater == 0 && int32(x) > int32( int8(y))
+ // cond: c&s390x.Greater == 0 && int32(x) > int32(y)
// result: (First no yes)
for b.Controls[0].Op == OpS390XMOVDconst {
v_0 := b.Controls[0]
- x := v_0.AuxInt
- y := b.AuxInt
- c := b.Aux
- if !(c.(s390x.CCMask)&s390x.Greater == 0 && int32(x) > int32(int8(y))) {
+ x := auxIntToInt64(v_0.AuxInt)
+ y := auxIntToInt8(b.AuxInt)
+ c := auxToS390xCCMask(b.Aux)
+ if !(c&s390x.Greater == 0 && int32(x) > int32(y)) {
break
}
b.Reset(BlockFirst)
}
case BlockS390XCLGIJ:
// match: (CLGIJ {c} (MOVDconst [x]) [y] yes no)
- // cond: c.(s390x.CCMask)&s390x.Equal != 0 && uint64(x) == uint64(uint8(y))
+ // cond: c&s390x.Equal != 0 && uint64(x) == uint64(y)
// result: (First yes no)
for b.Controls[0].Op == OpS390XMOVDconst {
v_0 := b.Controls[0]
- x := v_0.AuxInt
- y := b.AuxInt
- c := b.Aux
- if !(c.(s390x.CCMask)&s390x.Equal != 0 && uint64(x) == uint64(uint8(y))) {
+ x := auxIntToInt64(v_0.AuxInt)
+ y := auxIntToUint8(b.AuxInt)
+ c := auxToS390xCCMask(b.Aux)
+ if !(c&s390x.Equal != 0 && uint64(x) == uint64(y)) {
break
}
b.Reset(BlockFirst)
return true
}
// match: (CLGIJ {c} (MOVDconst [x]) [y] yes no)
- // cond: c.(s390x.CCMask)&s390x.Less != 0 && uint64(x) < uint64(uint8(y))
+ // cond: c&s390x.Less != 0 && uint64(x) < uint64(y)
// result: (First yes no)
for b.Controls[0].Op == OpS390XMOVDconst {
v_0 := b.Controls[0]
- x := v_0.AuxInt
- y := b.AuxInt
- c := b.Aux
- if !(c.(s390x.CCMask)&s390x.Less != 0 && uint64(x) < uint64(uint8(y))) {
+ x := auxIntToInt64(v_0.AuxInt)
+ y := auxIntToUint8(b.AuxInt)
+ c := auxToS390xCCMask(b.Aux)
+ if !(c&s390x.Less != 0 && uint64(x) < uint64(y)) {
break
}
b.Reset(BlockFirst)
return true
}
// match: (CLGIJ {c} (MOVDconst [x]) [y] yes no)
- // cond: c.(s390x.CCMask)&s390x.Greater != 0 && uint64(x) > uint64(uint8(y))
+ // cond: c&s390x.Greater != 0 && uint64(x) > uint64(y)
// result: (First yes no)
for b.Controls[0].Op == OpS390XMOVDconst {
v_0 := b.Controls[0]
- x := v_0.AuxInt
- y := b.AuxInt
- c := b.Aux
- if !(c.(s390x.CCMask)&s390x.Greater != 0 && uint64(x) > uint64(uint8(y))) {
+ x := auxIntToInt64(v_0.AuxInt)
+ y := auxIntToUint8(b.AuxInt)
+ c := auxToS390xCCMask(b.Aux)
+ if !(c&s390x.Greater != 0 && uint64(x) > uint64(y)) {
break
}
b.Reset(BlockFirst)
return true
}
// match: (CLGIJ {c} (MOVDconst [x]) [y] yes no)
- // cond: c.(s390x.CCMask)&s390x.Equal == 0 && uint64(x) == uint64(uint8(y))
+ // cond: c&s390x.Equal == 0 && uint64(x) == uint64(y)
// result: (First no yes)
for b.Controls[0].Op == OpS390XMOVDconst {
v_0 := b.Controls[0]
- x := v_0.AuxInt
- y := b.AuxInt
- c := b.Aux
- if !(c.(s390x.CCMask)&s390x.Equal == 0 && uint64(x) == uint64(uint8(y))) {
+ x := auxIntToInt64(v_0.AuxInt)
+ y := auxIntToUint8(b.AuxInt)
+ c := auxToS390xCCMask(b.Aux)
+ if !(c&s390x.Equal == 0 && uint64(x) == uint64(y)) {
break
}
b.Reset(BlockFirst)
return true
}
// match: (CLGIJ {c} (MOVDconst [x]) [y] yes no)
- // cond: c.(s390x.CCMask)&s390x.Less == 0 && uint64(x) < uint64(uint8(y))
+ // cond: c&s390x.Less == 0 && uint64(x) < uint64(y)
// result: (First no yes)
for b.Controls[0].Op == OpS390XMOVDconst {
v_0 := b.Controls[0]
- x := v_0.AuxInt
- y := b.AuxInt
- c := b.Aux
- if !(c.(s390x.CCMask)&s390x.Less == 0 && uint64(x) < uint64(uint8(y))) {
+ x := auxIntToInt64(v_0.AuxInt)
+ y := auxIntToUint8(b.AuxInt)
+ c := auxToS390xCCMask(b.Aux)
+ if !(c&s390x.Less == 0 && uint64(x) < uint64(y)) {
break
}
b.Reset(BlockFirst)
return true
}
// match: (CLGIJ {c} (MOVDconst [x]) [y] yes no)
- // cond: c.(s390x.CCMask)&s390x.Greater == 0 && uint64(x) > uint64(uint8(y))
+ // cond: c&s390x.Greater == 0 && uint64(x) > uint64(y)
// result: (First no yes)
for b.Controls[0].Op == OpS390XMOVDconst {
v_0 := b.Controls[0]
- x := v_0.AuxInt
- y := b.AuxInt
- c := b.Aux
- if !(c.(s390x.CCMask)&s390x.Greater == 0 && uint64(x) > uint64(uint8(y))) {
+ x := auxIntToInt64(v_0.AuxInt)
+ y := auxIntToUint8(b.AuxInt)
+ c := auxToS390xCCMask(b.Aux)
+ if !(c&s390x.Greater == 0 && uint64(x) > uint64(y)) {
break
}
b.Reset(BlockFirst)
// match: (CLGIJ {s390x.GreaterOrEqual} _ [0] yes no)
// result: (First yes no)
for {
- if b.AuxInt != 0 || b.Aux != s390x.GreaterOrEqual {
+ if auxIntToUint8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.GreaterOrEqual {
break
}
b.Reset(BlockFirst)
// match: (CLGIJ {s390x.Less} _ [0] yes no)
// result: (First no yes)
for {
- if b.AuxInt != 0 || b.Aux != s390x.Less {
+ if auxIntToUint8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.Less {
break
}
b.Reset(BlockFirst)
case BlockS390XCLGRJ:
// match: (CLGRJ {c} x (MOVDconst [y]) yes no)
// cond: isU8Bit(y)
- // result: (CLGIJ {c} x [int64(int8(y))] yes no)
+ // result: (CLGIJ {c} x [uint8(y)] yes no)
for b.Controls[1].Op == OpS390XMOVDconst {
x := b.Controls[0]
v_1 := b.Controls[1]
- y := v_1.AuxInt
- c := b.Aux
+ y := auxIntToInt64(v_1.AuxInt)
+ c := auxToS390xCCMask(b.Aux)
if !(isU8Bit(y)) {
break
}
b.resetWithControl(BlockS390XCLGIJ, x)
- b.AuxInt = int64(int8(y))
- b.Aux = c
+ b.AuxInt = uint8ToAuxInt(uint8(y))
+ b.Aux = s390xCCMaskToAux(c)
return true
}
// match: (CLGRJ {c} (MOVDconst [x]) y yes no)
// cond: isU8Bit(x)
- // result: (CLGIJ {c.(s390x.CCMask).ReverseComparison()} y [int64(int8(x))] yes no)
+ // result: (CLGIJ {c.ReverseComparison()} y [uint8(x)] yes no)
for b.Controls[0].Op == OpS390XMOVDconst {
v_0 := b.Controls[0]
- x := v_0.AuxInt
+ x := auxIntToInt64(v_0.AuxInt)
y := b.Controls[1]
- c := b.Aux
+ c := auxToS390xCCMask(b.Aux)
if !(isU8Bit(x)) {
break
}
b.resetWithControl(BlockS390XCLGIJ, y)
- b.AuxInt = int64(int8(x))
- b.Aux = c.(s390x.CCMask).ReverseComparison()
+ b.AuxInt = uint8ToAuxInt(uint8(x))
+ b.Aux = s390xCCMaskToAux(c.ReverseComparison())
return true
}
// match: (CLGRJ {c} x (MOVDconst [y]) yes no)
// cond: !isU8Bit(y) && isU32Bit(y)
- // result: (BRC {c} (CMPUconst x [int64(int32(y))]) yes no)
+ // result: (BRC {c} (CMPUconst x [int32(y)]) yes no)
for b.Controls[1].Op == OpS390XMOVDconst {
x := b.Controls[0]
v_1 := b.Controls[1]
- y := v_1.AuxInt
- c := b.Aux
+ y := auxIntToInt64(v_1.AuxInt)
+ c := auxToS390xCCMask(b.Aux)
if !(!isU8Bit(y) && isU32Bit(y)) {
break
}
v0 := b.NewValue0(x.Pos, OpS390XCMPUconst, types.TypeFlags)
- v0.AuxInt = int64(int32(y))
+ v0.AuxInt = int32ToAuxInt(int32(y))
v0.AddArg(x)
b.resetWithControl(BlockS390XBRC, v0)
- b.Aux = c
+ b.Aux = s390xCCMaskToAux(c)
return true
}
// match: (CLGRJ {c} (MOVDconst [x]) y yes no)
// cond: !isU8Bit(x) && isU32Bit(x)
- // result: (BRC {c.(s390x.CCMask).ReverseComparison()} (CMPUconst y [int64(int32(x))]) yes no)
+ // result: (BRC {c.ReverseComparison()} (CMPUconst y [int32(x)]) yes no)
for b.Controls[0].Op == OpS390XMOVDconst {
v_0 := b.Controls[0]
- x := v_0.AuxInt
+ x := auxIntToInt64(v_0.AuxInt)
y := b.Controls[1]
- c := b.Aux
+ c := auxToS390xCCMask(b.Aux)
if !(!isU8Bit(x) && isU32Bit(x)) {
break
}
v0 := b.NewValue0(v_0.Pos, OpS390XCMPUconst, types.TypeFlags)
- v0.AuxInt = int64(int32(x))
+ v0.AuxInt = int32ToAuxInt(int32(x))
v0.AddArg(y)
b.resetWithControl(BlockS390XBRC, v0)
- b.Aux = c.(s390x.CCMask).ReverseComparison()
+ b.Aux = s390xCCMaskToAux(c.ReverseComparison())
return true
}
// match: (CLGRJ {c} x y yes no)
- // cond: x == y && c.(s390x.CCMask)&s390x.Equal != 0
+ // cond: x == y && c&s390x.Equal != 0
// result: (First yes no)
for {
x := b.Controls[0]
y := b.Controls[1]
- c := b.Aux
- if !(x == y && c.(s390x.CCMask)&s390x.Equal != 0) {
+ c := auxToS390xCCMask(b.Aux)
+ if !(x == y && c&s390x.Equal != 0) {
break
}
b.Reset(BlockFirst)
return true
}
// match: (CLGRJ {c} x y yes no)
- // cond: x == y && c.(s390x.CCMask)&s390x.Equal == 0
+ // cond: x == y && c&s390x.Equal == 0
// result: (First no yes)
for {
x := b.Controls[0]
y := b.Controls[1]
- c := b.Aux
- if !(x == y && c.(s390x.CCMask)&s390x.Equal == 0) {
+ c := auxToS390xCCMask(b.Aux)
+ if !(x == y && c&s390x.Equal == 0) {
break
}
b.Reset(BlockFirst)
// result: (BRC {d} cmp yes no)
for b.Controls[0].Op == OpS390XLOCGR {
v_0 := b.Controls[0]
- d := v_0.Aux
+ d := auxToS390xCCMask(v_0.Aux)
cmp := v_0.Args[2]
v_0_0 := v_0.Args[0]
- if v_0_0.Op != OpS390XMOVDconst || v_0_0.AuxInt != 0 {
+ if v_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0.AuxInt) != 0 {
break
}
v_0_1 := v_0.Args[1]
if v_0_1.Op != OpS390XMOVDconst {
break
}
- x := v_0_1.AuxInt
- if b.AuxInt != 0 || b.Aux != s390x.LessOrGreater || !(int32(x) != 0) {
+ x := auxIntToInt64(v_0_1.AuxInt)
+ if auxIntToUint8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.LessOrGreater || !(int32(x) != 0) {
break
}
b.resetWithControl(BlockS390XBRC, cmp)
- b.Aux = d
+ b.Aux = s390xCCMaskToAux(d)
return true
}
// match: (CLIJ {c} (MOVWreg x) [y] yes no)
for b.Controls[0].Op == OpS390XMOVWreg {
v_0 := b.Controls[0]
x := v_0.Args[0]
- y := b.AuxInt
- c := b.Aux
+ y := auxIntToUint8(b.AuxInt)
+ c := auxToS390xCCMask(b.Aux)
b.resetWithControl(BlockS390XCLIJ, x)
- b.AuxInt = y
- b.Aux = c
+ b.AuxInt = uint8ToAuxInt(y)
+ b.Aux = s390xCCMaskToAux(c)
return true
}
// match: (CLIJ {c} (MOVWZreg x) [y] yes no)
for b.Controls[0].Op == OpS390XMOVWZreg {
v_0 := b.Controls[0]
x := v_0.Args[0]
- y := b.AuxInt
- c := b.Aux
+ y := auxIntToUint8(b.AuxInt)
+ c := auxToS390xCCMask(b.Aux)
b.resetWithControl(BlockS390XCLIJ, x)
- b.AuxInt = y
- b.Aux = c
+ b.AuxInt = uint8ToAuxInt(y)
+ b.Aux = s390xCCMaskToAux(c)
return true
}
// match: (CLIJ {c} (MOVDconst [x]) [y] yes no)
- // cond: c.(s390x.CCMask)&s390x.Equal != 0 && uint32(x) == uint32(uint8(y))
+ // cond: c&s390x.Equal != 0 && uint32(x) == uint32(y)
// result: (First yes no)
for b.Controls[0].Op == OpS390XMOVDconst {
v_0 := b.Controls[0]
- x := v_0.AuxInt
- y := b.AuxInt
- c := b.Aux
- if !(c.(s390x.CCMask)&s390x.Equal != 0 && uint32(x) == uint32(uint8(y))) {
+ x := auxIntToInt64(v_0.AuxInt)
+ y := auxIntToUint8(b.AuxInt)
+ c := auxToS390xCCMask(b.Aux)
+ if !(c&s390x.Equal != 0 && uint32(x) == uint32(y)) {
break
}
b.Reset(BlockFirst)
return true
}
// match: (CLIJ {c} (MOVDconst [x]) [y] yes no)
- // cond: c.(s390x.CCMask)&s390x.Less != 0 && uint32(x) < uint32(uint8(y))
+ // cond: c&s390x.Less != 0 && uint32(x) < uint32(y)
// result: (First yes no)
for b.Controls[0].Op == OpS390XMOVDconst {
v_0 := b.Controls[0]
- x := v_0.AuxInt
- y := b.AuxInt
- c := b.Aux
- if !(c.(s390x.CCMask)&s390x.Less != 0 && uint32(x) < uint32(uint8(y))) {
+ x := auxIntToInt64(v_0.AuxInt)
+ y := auxIntToUint8(b.AuxInt)
+ c := auxToS390xCCMask(b.Aux)
+ if !(c&s390x.Less != 0 && uint32(x) < uint32(y)) {
break
}
b.Reset(BlockFirst)
return true
}
// match: (CLIJ {c} (MOVDconst [x]) [y] yes no)
- // cond: c.(s390x.CCMask)&s390x.Greater != 0 && uint32(x) > uint32(uint8(y))
+ // cond: c&s390x.Greater != 0 && uint32(x) > uint32(y)
// result: (First yes no)
for b.Controls[0].Op == OpS390XMOVDconst {
v_0 := b.Controls[0]
- x := v_0.AuxInt
- y := b.AuxInt
- c := b.Aux
- if !(c.(s390x.CCMask)&s390x.Greater != 0 && uint32(x) > uint32(uint8(y))) {
+ x := auxIntToInt64(v_0.AuxInt)
+ y := auxIntToUint8(b.AuxInt)
+ c := auxToS390xCCMask(b.Aux)
+ if !(c&s390x.Greater != 0 && uint32(x) > uint32(y)) {
break
}
b.Reset(BlockFirst)
return true
}
// match: (CLIJ {c} (MOVDconst [x]) [y] yes no)
- // cond: c.(s390x.CCMask)&s390x.Equal == 0 && uint32(x) == uint32(uint8(y))
+ // cond: c&s390x.Equal == 0 && uint32(x) == uint32(y)
// result: (First no yes)
for b.Controls[0].Op == OpS390XMOVDconst {
v_0 := b.Controls[0]
- x := v_0.AuxInt
- y := b.AuxInt
- c := b.Aux
- if !(c.(s390x.CCMask)&s390x.Equal == 0 && uint32(x) == uint32(uint8(y))) {
+ x := auxIntToInt64(v_0.AuxInt)
+ y := auxIntToUint8(b.AuxInt)
+ c := auxToS390xCCMask(b.Aux)
+ if !(c&s390x.Equal == 0 && uint32(x) == uint32(y)) {
break
}
b.Reset(BlockFirst)
return true
}
// match: (CLIJ {c} (MOVDconst [x]) [y] yes no)
- // cond: c.(s390x.CCMask)&s390x.Less == 0 && uint32(x) < uint32(uint8(y))
+ // cond: c&s390x.Less == 0 && uint32(x) < uint32(y)
// result: (First no yes)
for b.Controls[0].Op == OpS390XMOVDconst {
v_0 := b.Controls[0]
- x := v_0.AuxInt
- y := b.AuxInt
- c := b.Aux
- if !(c.(s390x.CCMask)&s390x.Less == 0 && uint32(x) < uint32(uint8(y))) {
+ x := auxIntToInt64(v_0.AuxInt)
+ y := auxIntToUint8(b.AuxInt)
+ c := auxToS390xCCMask(b.Aux)
+ if !(c&s390x.Less == 0 && uint32(x) < uint32(y)) {
break
}
b.Reset(BlockFirst)
return true
}
// match: (CLIJ {c} (MOVDconst [x]) [y] yes no)
- // cond: c.(s390x.CCMask)&s390x.Greater == 0 && uint32(x) > uint32(uint8(y))
+ // cond: c&s390x.Greater == 0 && uint32(x) > uint32(y)
// result: (First no yes)
for b.Controls[0].Op == OpS390XMOVDconst {
v_0 := b.Controls[0]
- x := v_0.AuxInt
- y := b.AuxInt
- c := b.Aux
- if !(c.(s390x.CCMask)&s390x.Greater == 0 && uint32(x) > uint32(uint8(y))) {
+ x := auxIntToInt64(v_0.AuxInt)
+ y := auxIntToUint8(b.AuxInt)
+ c := auxToS390xCCMask(b.Aux)
+ if !(c&s390x.Greater == 0 && uint32(x) > uint32(y)) {
break
}
b.Reset(BlockFirst)
// match: (CLIJ {s390x.GreaterOrEqual} _ [0] yes no)
// result: (First yes no)
for {
- if b.AuxInt != 0 || b.Aux != s390x.GreaterOrEqual {
+ if auxIntToUint8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.GreaterOrEqual {
break
}
b.Reset(BlockFirst)
// match: (CLIJ {s390x.Less} _ [0] yes no)
// result: (First no yes)
for {
- if b.AuxInt != 0 || b.Aux != s390x.Less {
+ if auxIntToUint8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.Less {
break
}
b.Reset(BlockFirst)
case BlockS390XCLRJ:
// match: (CLRJ {c} x (MOVDconst [y]) yes no)
// cond: isU8Bit(y)
- // result: (CLIJ {c} x [int64(int8(y))] yes no)
+ // result: (CLIJ {c} x [uint8(y)] yes no)
for b.Controls[1].Op == OpS390XMOVDconst {
x := b.Controls[0]
v_1 := b.Controls[1]
- y := v_1.AuxInt
- c := b.Aux
+ y := auxIntToInt64(v_1.AuxInt)
+ c := auxToS390xCCMask(b.Aux)
if !(isU8Bit(y)) {
break
}
b.resetWithControl(BlockS390XCLIJ, x)
- b.AuxInt = int64(int8(y))
- b.Aux = c
+ b.AuxInt = uint8ToAuxInt(uint8(y))
+ b.Aux = s390xCCMaskToAux(c)
return true
}
// match: (CLRJ {c} (MOVDconst [x]) y yes no)
// cond: isU8Bit(x)
- // result: (CLIJ {c.(s390x.CCMask).ReverseComparison()} y [int64(int8(x))] yes no)
+ // result: (CLIJ {c.ReverseComparison()} y [uint8(x)] yes no)
for b.Controls[0].Op == OpS390XMOVDconst {
v_0 := b.Controls[0]
- x := v_0.AuxInt
+ x := auxIntToInt64(v_0.AuxInt)
y := b.Controls[1]
- c := b.Aux
+ c := auxToS390xCCMask(b.Aux)
if !(isU8Bit(x)) {
break
}
b.resetWithControl(BlockS390XCLIJ, y)
- b.AuxInt = int64(int8(x))
- b.Aux = c.(s390x.CCMask).ReverseComparison()
+ b.AuxInt = uint8ToAuxInt(uint8(x))
+ b.Aux = s390xCCMaskToAux(c.ReverseComparison())
return true
}
// match: (CLRJ {c} x (MOVDconst [y]) yes no)
// cond: !isU8Bit(y) && isU32Bit(y)
- // result: (BRC {c} (CMPWUconst x [int64(int32(y))]) yes no)
+ // result: (BRC {c} (CMPWUconst x [int32(y)]) yes no)
for b.Controls[1].Op == OpS390XMOVDconst {
x := b.Controls[0]
v_1 := b.Controls[1]
- y := v_1.AuxInt
- c := b.Aux
+ y := auxIntToInt64(v_1.AuxInt)
+ c := auxToS390xCCMask(b.Aux)
if !(!isU8Bit(y) && isU32Bit(y)) {
break
}
v0 := b.NewValue0(x.Pos, OpS390XCMPWUconst, types.TypeFlags)
- v0.AuxInt = int64(int32(y))
+ v0.AuxInt = int32ToAuxInt(int32(y))
v0.AddArg(x)
b.resetWithControl(BlockS390XBRC, v0)
- b.Aux = c
+ b.Aux = s390xCCMaskToAux(c)
return true
}
// match: (CLRJ {c} (MOVDconst [x]) y yes no)
// cond: !isU8Bit(x) && isU32Bit(x)
- // result: (BRC {c.(s390x.CCMask).ReverseComparison()} (CMPWUconst y [int64(int32(x))]) yes no)
+ // result: (BRC {c.ReverseComparison()} (CMPWUconst y [int32(x)]) yes no)
for b.Controls[0].Op == OpS390XMOVDconst {
v_0 := b.Controls[0]
- x := v_0.AuxInt
+ x := auxIntToInt64(v_0.AuxInt)
y := b.Controls[1]
- c := b.Aux
+ c := auxToS390xCCMask(b.Aux)
if !(!isU8Bit(x) && isU32Bit(x)) {
break
}
v0 := b.NewValue0(v_0.Pos, OpS390XCMPWUconst, types.TypeFlags)
- v0.AuxInt = int64(int32(x))
+ v0.AuxInt = int32ToAuxInt(int32(x))
v0.AddArg(y)
b.resetWithControl(BlockS390XBRC, v0)
- b.Aux = c.(s390x.CCMask).ReverseComparison()
+ b.Aux = s390xCCMaskToAux(c.ReverseComparison())
return true
}
// match: (CLRJ {c} x y yes no)
- // cond: x == y && c.(s390x.CCMask)&s390x.Equal != 0
+ // cond: x == y && c&s390x.Equal != 0
// result: (First yes no)
for {
x := b.Controls[0]
y := b.Controls[1]
- c := b.Aux
- if !(x == y && c.(s390x.CCMask)&s390x.Equal != 0) {
+ c := auxToS390xCCMask(b.Aux)
+ if !(x == y && c&s390x.Equal != 0) {
break
}
b.Reset(BlockFirst)
return true
}
// match: (CLRJ {c} x y yes no)
- // cond: x == y && c.(s390x.CCMask)&s390x.Equal == 0
+ // cond: x == y && c&s390x.Equal == 0
// result: (First no yes)
for {
x := b.Controls[0]
y := b.Controls[1]
- c := b.Aux
- if !(x == y && c.(s390x.CCMask)&s390x.Equal == 0) {
+ c := auxToS390xCCMask(b.Aux)
+ if !(x == y && c&s390x.Equal == 0) {
break
}
b.Reset(BlockFirst)
case BlockS390XCRJ:
// match: (CRJ {c} x (MOVDconst [y]) yes no)
// cond: is8Bit(y)
- // result: (CIJ {c} x [int64(int8(y))] yes no)
+ // result: (CIJ {c} x [ int8(y)] yes no)
for b.Controls[1].Op == OpS390XMOVDconst {
x := b.Controls[0]
v_1 := b.Controls[1]
- y := v_1.AuxInt
- c := b.Aux
+ y := auxIntToInt64(v_1.AuxInt)
+ c := auxToS390xCCMask(b.Aux)
if !(is8Bit(y)) {
break
}
b.resetWithControl(BlockS390XCIJ, x)
- b.AuxInt = int64(int8(y))
- b.Aux = c
+ b.AuxInt = int8ToAuxInt(int8(y))
+ b.Aux = s390xCCMaskToAux(c)
return true
}
// match: (CRJ {c} (MOVDconst [x]) y yes no)
// cond: is8Bit(x)
- // result: (CIJ {c.(s390x.CCMask).ReverseComparison()} y [int64(int8(x))] yes no)
+ // result: (CIJ {c.ReverseComparison()} y [ int8(x)] yes no)
for b.Controls[0].Op == OpS390XMOVDconst {
v_0 := b.Controls[0]
- x := v_0.AuxInt
+ x := auxIntToInt64(v_0.AuxInt)
y := b.Controls[1]
- c := b.Aux
+ c := auxToS390xCCMask(b.Aux)
if !(is8Bit(x)) {
break
}
b.resetWithControl(BlockS390XCIJ, y)
- b.AuxInt = int64(int8(x))
- b.Aux = c.(s390x.CCMask).ReverseComparison()
+ b.AuxInt = int8ToAuxInt(int8(x))
+ b.Aux = s390xCCMaskToAux(c.ReverseComparison())
return true
}
// match: (CRJ {c} x (MOVDconst [y]) yes no)
// cond: !is8Bit(y) && is32Bit(y)
- // result: (BRC {c} (CMPWconst x [int64(int32(y))]) yes no)
+ // result: (BRC {c} (CMPWconst x [int32(y)]) yes no)
for b.Controls[1].Op == OpS390XMOVDconst {
x := b.Controls[0]
v_1 := b.Controls[1]
- y := v_1.AuxInt
- c := b.Aux
+ y := auxIntToInt64(v_1.AuxInt)
+ c := auxToS390xCCMask(b.Aux)
if !(!is8Bit(y) && is32Bit(y)) {
break
}
v0 := b.NewValue0(x.Pos, OpS390XCMPWconst, types.TypeFlags)
- v0.AuxInt = int64(int32(y))
+ v0.AuxInt = int32ToAuxInt(int32(y))
v0.AddArg(x)
b.resetWithControl(BlockS390XBRC, v0)
- b.Aux = c
+ b.Aux = s390xCCMaskToAux(c)
return true
}
// match: (CRJ {c} (MOVDconst [x]) y yes no)
// cond: !is8Bit(x) && is32Bit(x)
- // result: (BRC {c.(s390x.CCMask).ReverseComparison()} (CMPWconst y [int64(int32(x))]) yes no)
+ // result: (BRC {c.ReverseComparison()} (CMPWconst y [int32(x)]) yes no)
for b.Controls[0].Op == OpS390XMOVDconst {
v_0 := b.Controls[0]
- x := v_0.AuxInt
+ x := auxIntToInt64(v_0.AuxInt)
y := b.Controls[1]
- c := b.Aux
+ c := auxToS390xCCMask(b.Aux)
if !(!is8Bit(x) && is32Bit(x)) {
break
}
v0 := b.NewValue0(v_0.Pos, OpS390XCMPWconst, types.TypeFlags)
- v0.AuxInt = int64(int32(x))
+ v0.AuxInt = int32ToAuxInt(int32(x))
v0.AddArg(y)
b.resetWithControl(BlockS390XBRC, v0)
- b.Aux = c.(s390x.CCMask).ReverseComparison()
+ b.Aux = s390xCCMaskToAux(c.ReverseComparison())
return true
}
// match: (CRJ {c} x y yes no)
- // cond: x == y && c.(s390x.CCMask)&s390x.Equal != 0
+ // cond: x == y && c&s390x.Equal != 0
// result: (First yes no)
for {
x := b.Controls[0]
y := b.Controls[1]
- c := b.Aux
- if !(x == y && c.(s390x.CCMask)&s390x.Equal != 0) {
+ c := auxToS390xCCMask(b.Aux)
+ if !(x == y && c&s390x.Equal != 0) {
break
}
b.Reset(BlockFirst)
return true
}
// match: (CRJ {c} x y yes no)
- // cond: x == y && c.(s390x.CCMask)&s390x.Equal == 0
+ // cond: x == y && c&s390x.Equal == 0
// result: (First no yes)
for {
x := b.Controls[0]
y := b.Controls[1]
- c := b.Aux
- if !(x == y && c.(s390x.CCMask)&s390x.Equal == 0) {
+ c := auxToS390xCCMask(b.Aux)
+ if !(x == y && c&s390x.Equal == 0) {
break
}
b.Reset(BlockFirst)