]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: adopt strong aux typing for some s390x rules
authorRuixin Bao <ruixin.bao@ibm.com>
Wed, 29 Apr 2020 01:19:17 +0000 (18:19 -0700)
committerMichael Munday <mike.munday@ibm.com>
Wed, 29 Apr 2020 08:57:33 +0000 (08:57 +0000)
Convert some optimizations rules to strongly-typed versions. Similar to
CL 230338, this CL only converts rules that need no additional changes
(i.e: only need to change '->' to '=>').

This CL covers the rules from line 800 - 1219.

Passes toolstash-check

Change-Id: I94181a809fa38918b78301f1c0c680b7a8ab552f
Reviewed-on: https://go-review.googlesource.com/c/go/+/230738
Reviewed-by: Michael Munday <mike.munday@ibm.com>
Run-TryBot: Michael Munday <mike.munday@ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/cmd/compile/internal/ssa/gen/S390X.rules
src/cmd/compile/internal/ssa/rewriteS390X.go

index ef1fa741218eedd3b4a1b12f83e2b62f5efaaec8..82b60895ff72ee1833f5a85c37ac83b166c0697e 100644 (file)
 (LGDR (LDGR x)) => x
 
 // Don't extend before storing
-(MOVWstore [off] {sym} ptr (MOVWreg x) mem) -> (MOVWstore [off] {sym} ptr x mem)
-(MOVHstore [off] {sym} ptr (MOVHreg x) mem) -> (MOVHstore [off] {sym} ptr x mem)
-(MOVBstore [off] {sym} ptr (MOVBreg x) mem) -> (MOVBstore [off] {sym} ptr x mem)
-(MOVWstore [off] {sym} ptr (MOVWZreg x) mem) -> (MOVWstore [off] {sym} ptr x mem)
-(MOVHstore [off] {sym} ptr (MOVHZreg x) mem) -> (MOVHstore [off] {sym} ptr x mem)
-(MOVBstore [off] {sym} ptr (MOVBZreg x) mem) -> (MOVBstore [off] {sym} ptr x mem)
+(MOVWstore [off] {sym} ptr (MOVWreg x) mem) => (MOVWstore [off] {sym} ptr x mem)
+(MOVHstore [off] {sym} ptr (MOVHreg x) mem) => (MOVHstore [off] {sym} ptr x mem)
+(MOVBstore [off] {sym} ptr (MOVBreg x) mem) => (MOVBstore [off] {sym} ptr x mem)
+(MOVWstore [off] {sym} ptr (MOVWZreg x) mem) => (MOVWstore [off] {sym} ptr x mem)
+(MOVHstore [off] {sym} ptr (MOVHZreg x) mem) => (MOVHstore [off] {sym} ptr x mem)
+(MOVBstore [off] {sym} ptr (MOVBZreg x) mem) => (MOVBstore [off] {sym} ptr x mem)
 
 // Fold constants into memory operations.
 // Note that this is not always a good idea because if not all the uses of
 (FMOVDstore [off1] {sym1} (MOVDaddridx [off2] {sym2} ptr idx) val mem) && is32Bit(off1+off2) && canMergeSym(sym1, sym2) ->
        (FMOVDstoreidx [off1+off2] {mergeSym(sym1,sym2)} ptr idx val mem)
 
-(MOVBZload [off] {sym} (ADD ptr idx) mem) && ptr.Op != OpSB -> (MOVBZloadidx [off] {sym} ptr idx mem)
-(MOVBload  [off] {sym} (ADD ptr idx) mem) && ptr.Op != OpSB -> (MOVBloadidx  [off] {sym} ptr idx mem)
-(MOVHZload [off] {sym} (ADD ptr idx) mem) && ptr.Op != OpSB -> (MOVHZloadidx [off] {sym} ptr idx mem)
-(MOVHload  [off] {sym} (ADD ptr idx) mem) && ptr.Op != OpSB -> (MOVHloadidx  [off] {sym} ptr idx mem)
-(MOVWZload [off] {sym} (ADD ptr idx) mem) && ptr.Op != OpSB -> (MOVWZloadidx [off] {sym} ptr idx mem)
-(MOVWload  [off] {sym} (ADD ptr idx) mem) && ptr.Op != OpSB -> (MOVWloadidx  [off] {sym} ptr idx mem)
-(MOVDload  [off] {sym} (ADD ptr idx) mem) && ptr.Op != OpSB -> (MOVDloadidx  [off] {sym} ptr idx mem)
-(FMOVSload [off] {sym} (ADD ptr idx) mem) && ptr.Op != OpSB -> (FMOVSloadidx [off] {sym} ptr idx mem)
-(FMOVDload [off] {sym} (ADD ptr idx) mem) && ptr.Op != OpSB -> (FMOVDloadidx [off] {sym} ptr idx mem)
-
-(MOVBstore  [off] {sym} (ADD ptr idx) val mem) && ptr.Op != OpSB -> (MOVBstoreidx  [off] {sym} ptr idx val mem)
-(MOVHstore  [off] {sym} (ADD ptr idx) val mem) && ptr.Op != OpSB -> (MOVHstoreidx  [off] {sym} ptr idx val mem)
-(MOVWstore  [off] {sym} (ADD ptr idx) val mem) && ptr.Op != OpSB -> (MOVWstoreidx  [off] {sym} ptr idx val mem)
-(MOVDstore  [off] {sym} (ADD ptr idx) val mem) && ptr.Op != OpSB -> (MOVDstoreidx  [off] {sym} ptr idx val mem)
-(FMOVSstore [off] {sym} (ADD ptr idx) val mem) && ptr.Op != OpSB -> (FMOVSstoreidx [off] {sym} ptr idx val mem)
-(FMOVDstore [off] {sym} (ADD ptr idx) val mem) && ptr.Op != OpSB -> (FMOVDstoreidx [off] {sym} ptr idx val mem)
+(MOVBZload [off] {sym} (ADD ptr idx) mem) && ptr.Op != OpSB => (MOVBZloadidx [off] {sym} ptr idx mem)
+(MOVBload  [off] {sym} (ADD ptr idx) mem) && ptr.Op != OpSB => (MOVBloadidx  [off] {sym} ptr idx mem)
+(MOVHZload [off] {sym} (ADD ptr idx) mem) && ptr.Op != OpSB => (MOVHZloadidx [off] {sym} ptr idx mem)
+(MOVHload  [off] {sym} (ADD ptr idx) mem) && ptr.Op != OpSB => (MOVHloadidx  [off] {sym} ptr idx mem)
+(MOVWZload [off] {sym} (ADD ptr idx) mem) && ptr.Op != OpSB => (MOVWZloadidx [off] {sym} ptr idx mem)
+(MOVWload  [off] {sym} (ADD ptr idx) mem) && ptr.Op != OpSB => (MOVWloadidx  [off] {sym} ptr idx mem)
+(MOVDload  [off] {sym} (ADD ptr idx) mem) && ptr.Op != OpSB => (MOVDloadidx  [off] {sym} ptr idx mem)
+(FMOVSload [off] {sym} (ADD ptr idx) mem) && ptr.Op != OpSB => (FMOVSloadidx [off] {sym} ptr idx mem)
+(FMOVDload [off] {sym} (ADD ptr idx) mem) && ptr.Op != OpSB => (FMOVDloadidx [off] {sym} ptr idx mem)
+
+(MOVBstore  [off] {sym} (ADD ptr idx) val mem) && ptr.Op != OpSB => (MOVBstoreidx  [off] {sym} ptr idx val mem)
+(MOVHstore  [off] {sym} (ADD ptr idx) val mem) && ptr.Op != OpSB => (MOVHstoreidx  [off] {sym} ptr idx val mem)
+(MOVWstore  [off] {sym} (ADD ptr idx) val mem) && ptr.Op != OpSB => (MOVWstoreidx  [off] {sym} ptr idx val mem)
+(MOVDstore  [off] {sym} (ADD ptr idx) val mem) && ptr.Op != OpSB => (MOVDstoreidx  [off] {sym} ptr idx val mem)
+(FMOVSstore [off] {sym} (ADD ptr idx) val mem) && ptr.Op != OpSB => (FMOVSstoreidx [off] {sym} ptr idx val mem)
+(FMOVDstore [off] {sym} (ADD ptr idx) val mem) && ptr.Op != OpSB => (FMOVDstoreidx [off] {sym} ptr idx val mem)
 
 // combine ADD into indexed loads and stores
 (MOVBZloadidx [c] {sym} (ADDconst [d] ptr) idx mem) && is20Bit(c+d) -> (MOVBZloadidx [c+d] {sym} ptr idx mem)
 (CMPconst (MOVDconst [x]) [y]) && x==y -> (FlagEQ)
 (CMPconst (MOVDconst [x]) [y]) && x<y -> (FlagLT)
 (CMPconst (MOVDconst [x]) [y]) && x>y -> (FlagGT)
-(CMPUconst (MOVDconst [x]) [y]) && uint64(x)==uint64(y) -> (FlagEQ)
-(CMPUconst (MOVDconst [x]) [y]) && uint64(x)<uint64(y) -> (FlagLT)
-(CMPUconst (MOVDconst [x]) [y]) && uint64(x)>uint64(y) -> (FlagGT)
+(CMPUconst (MOVDconst [x]) [y]) && uint64(x)==uint64(y) => (FlagEQ)
+(CMPUconst (MOVDconst [x]) [y]) && uint64(x)<uint64(y) => (FlagLT)
+(CMPUconst (MOVDconst [x]) [y]) && uint64(x)>uint64(y) => (FlagGT)
 
-(CMPWconst (MOVDconst [x]) [y]) && int32(x)==int32(y) -> (FlagEQ)
-(CMPWconst (MOVDconst [x]) [y]) && int32(x)<int32(y) -> (FlagLT)
-(CMPWconst (MOVDconst [x]) [y]) && int32(x)>int32(y) -> (FlagGT)
-(CMPWUconst (MOVDconst [x]) [y]) && uint32(x)==uint32(y) -> (FlagEQ)
-(CMPWUconst (MOVDconst [x]) [y]) && uint32(x)<uint32(y) -> (FlagLT)
-(CMPWUconst (MOVDconst [x]) [y]) && uint32(x)>uint32(y) -> (FlagGT)
+(CMPWconst (MOVDconst [x]) [y]) && int32(x)==int32(y) => (FlagEQ)
+(CMPWconst (MOVDconst [x]) [y]) && int32(x)<int32(y) => (FlagLT)
+(CMPWconst (MOVDconst [x]) [y]) && int32(x)>int32(y) => (FlagGT)
+(CMPWUconst (MOVDconst [x]) [y]) && uint32(x)==uint32(y) => (FlagEQ)
+(CMPWUconst (MOVDconst [x]) [y]) && uint32(x)<uint32(y) => (FlagLT)
+(CMPWUconst (MOVDconst [x]) [y]) && uint32(x)>uint32(y) => (FlagGT)
 
-(CMP(W|WU)const (MOVBZreg _) [c]) &&   0xff < c -> (FlagLT)
-(CMP(W|WU)const (MOVHZreg _) [c]) && 0xffff < c -> (FlagLT)
+(CMP(W|WU)const (MOVBZreg _) [c]) &&   0xff < c => (FlagLT)
+(CMP(W|WU)const (MOVHZreg _) [c]) && 0xffff < c => (FlagLT)
 
-(CMPconst  (SRDconst _ [c]) [n]) && c > 0 && n < 0 -> (FlagGT)
-(CMPWconst (SRWconst _ [c]) [n]) && c > 0 && n < 0 -> (FlagGT)
+(CMPconst  (SRDconst _ [c]) [n]) && c > 0 && n < 0 => (FlagGT)
+(CMPWconst (SRWconst _ [c]) [n]) && c > 0 && n < 0 => (FlagGT)
 
-(CMPUconst  (SRDconst _ [c]) [n]) && c > 0 && c < 64 && (1<<uint(64-c)) <= uint64(n) -> (FlagLT)
-(CMPWUconst (SRWconst _ [c]) [n]) && c > 0 && c < 32 && (1<<uint(32-c)) <= uint32(n) -> (FlagLT)
+(CMPUconst  (SRDconst _ [c]) [n]) && c > 0 && c < 64 && (1<<uint(64-c)) <= uint64(n) => (FlagLT)
+(CMPWUconst (SRWconst _ [c]) [n]) && c > 0 && c < 32 && (1<<uint(32-c)) <= uint32(n) => (FlagLT)
 
-(CMPWconst  (ANDWconst _ [m]) [n]) && int32(m) >= 0 &&  int32(m) <  int32(n) -> (FlagLT)
-(CMPWUconst (ANDWconst _ [m]) [n]) && uint32(m) < uint32(n) -> (FlagLT)
+(CMPWconst  (ANDWconst _ [m]) [n]) && int32(m) >= 0 &&  int32(m) <  int32(n) => (FlagLT)
+(CMPWUconst (ANDWconst _ [m]) [n]) && uint32(m) < uint32(n) => (FlagLT)
 
 // Constant compare-and-branch with immediate.
 (CGIJ  {c} (MOVDconst [x]) [y] yes no) && c&s390x.Equal   != 0 &&  int64(x) ==  int64(y) => (First yes no)
 // Convert 64-bit comparisons to 32-bit comparisons and signed comparisons
 // to unsigned comparisons.
 // Helps simplify constant comparison detection.
-(CM(P|PU)const (MOV(W|WZ)reg x) [c]) -> (CMP(W|WU)const x [c])
-(CM(P|P|PU|PU)const x:(MOV(H|HZ|H|HZ)reg _) [c]) -> (CMP(W|W|WU|WU)const x [c])
-(CM(P|P|PU|PU)const x:(MOV(B|BZ|B|BZ)reg _) [c]) -> (CMP(W|W|WU|WU)const x [c])
-(CMPconst  (MOV(WZ|W)reg x:(ANDWconst [m] _)) [c]) && int32(m) >= 0 && c >= 0 -> (CMPWUconst x [c])
-(CMPUconst (MOV(WZ|W)reg x:(ANDWconst [m] _)) [c]) && int32(m) >= 0           -> (CMPWUconst x [c])
-(CMPconst  x:(SRDconst _ [c]) [n]) && c > 0 && n >= 0 -> (CMPUconst  x [n])
-(CMPWconst x:(SRWconst _ [c]) [n]) && c > 0 && n >= 0 -> (CMPWUconst x [n])
+(CM(P|PU)const (MOV(W|WZ)reg x) [c]) => (CMP(W|WU)const x [c])
+(CM(P|P|PU|PU)const x:(MOV(H|HZ|H|HZ)reg _) [c]) => (CMP(W|W|WU|WU)const x [c])
+(CM(P|P|PU|PU)const x:(MOV(B|BZ|B|BZ)reg _) [c]) => (CMP(W|W|WU|WU)const x [c])
+(CMPconst  (MOV(WZ|W)reg x:(ANDWconst [m] _)) [c]) && int32(m) >= 0 && c >= 0 => (CMPWUconst x [c])
+(CMPUconst (MOV(WZ|W)reg x:(ANDWconst [m] _)) [c]) && int32(m) >= 0           => (CMPWUconst x [c])
+(CMPconst  x:(SRDconst _ [c]) [n]) && c > 0 && n >= 0 => (CMPUconst  x [n])
+(CMPWconst x:(SRWconst _ [c]) [n]) && c > 0 && n >= 0 => (CMPWUconst x [n])
 
 // Absorb sign and zero extensions into 32-bit comparisons.
-(CMP(W|W|WU|WU)      x (MOV(W|WZ|W|WZ)reg y))   -> (CMP(W|W|WU|WU) x y)
-(CMP(W|W|WU|WU)      (MOV(W|WZ|W|WZ)reg x) y)   -> (CMP(W|W|WU|WU) x y)
-(CMP(W|W|WU|WU)const (MOV(W|WZ|W|WZ)reg x) [c]) -> (CMP(W|W|WU|WU)const x [c])
+(CMP(W|W|WU|WU)      x (MOV(W|WZ|W|WZ)reg y))   => (CMP(W|W|WU|WU) x y)
+(CMP(W|W|WU|WU)      (MOV(W|WZ|W|WZ)reg x) y)   => (CMP(W|W|WU|WU) x y)
+(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.Equal     != 0 => (First yes no)
 (LOCGR {c} x _ (FlagOV)) && c&s390x.Unordered == 0 => x
 
 // Remove redundant *const ops
-(ADDconst [0] x) -> x
-(ADDWconst [c] x) && int32(c)==0 -> x
-(SUBconst [0] x) -> x
-(SUBWconst [c] x) && int32(c) == 0 -> x
-(ANDconst [0] _)                 -> (MOVDconst [0])
-(ANDWconst [c] _) && int32(c)==0  -> (MOVDconst [0])
-(ANDconst [-1] x)                -> x
-(ANDWconst [c] x) && int32(c)==-1 -> x
-(ORconst [0] x)                  -> x
-(ORWconst [c] x) && int32(c)==0   -> x
-(ORconst [-1] _)                 -> (MOVDconst [-1])
-(ORWconst [c] _) && int32(c)==-1  -> (MOVDconst [-1])
-(XORconst [0] x)                  -> x
-(XORWconst [c] x) && int32(c)==0   -> x
+(ADDconst [0] x) => x
+(ADDWconst [c] x) && int32(c)==0 => x
+(SUBconst [0] x) => x
+(SUBWconst [c] x) && int32(c) == 0 => x
+(ANDconst [0] _)                 => (MOVDconst [0])
+(ANDWconst [c] _) && int32(c)==0  => (MOVDconst [0])
+(ANDconst [-1] x)                => x
+(ANDWconst [c] x) && int32(c)==-1 => x
+(ORconst [0] x)                  => x
+(ORWconst [c] x) && int32(c)==0   => x
+(ORconst [-1] _)                 => (MOVDconst [-1])
+(ORWconst [c] _) && int32(c)==-1  => (MOVDconst [-1])
+(XORconst [0] x)                  => x
+(XORWconst [c] x) && int32(c)==0   => x
 
 // Convert constant subtracts to constant adds.
-(SUBconst [c] x) && c != -(1<<31) -> (ADDconst [-c] x)
+(SUBconst [c] x) && c != -(1<<31) => (ADDconst [-c] x)
 (SUBWconst [c] x) -> (ADDWconst [int64(int32(-c))] x)
 
 // generic constant folding
 (ADDWconst [c] (ADDWconst [d] x)) -> (ADDWconst [int64(int32(c+d))] x)
 (SUBconst (MOVDconst [d]) [c]) -> (MOVDconst [d-c])
 (SUBconst (SUBconst x [d]) [c]) && is32Bit(-c-d) -> (ADDconst [-c-d] x)
-(SRADconst [c] (MOVDconst [d])) -> (MOVDconst [d>>uint64(c)])
-(SRAWconst [c] (MOVDconst [d])) -> (MOVDconst [int64(int32(d))>>uint64(c)])
-(NEG (MOVDconst [c])) -> (MOVDconst [-c])
-(NEGW (MOVDconst [c])) -> (MOVDconst [int64(int32(-c))])
+(SRADconst [c] (MOVDconst [d])) => (MOVDconst [d>>uint64(c)])
+(SRAWconst [c] (MOVDconst [d])) => (MOVDconst [int64(int32(d))>>uint64(c)])
+(NEG (MOVDconst [c])) => (MOVDconst [-c])
+(NEGW (MOVDconst [c])) => (MOVDconst [int64(int32(-c))])
 (MULLDconst [c] (MOVDconst [d])) -> (MOVDconst [c*d])
 (MULLWconst [c] (MOVDconst [d])) -> (MOVDconst [int64(int32(c*d))])
-(AND (MOVDconst [c]) (MOVDconst [d])) -> (MOVDconst [c&d])
-(ANDconst [c] (MOVDconst [d])) -> (MOVDconst [c&d])
+(AND (MOVDconst [c]) (MOVDconst [d])) => (MOVDconst [c&d])
+(ANDconst [c] (MOVDconst [d])) => (MOVDconst [c&d])
 (ANDWconst [c] (MOVDconst [d])) -> (MOVDconst [c&d])
-(OR (MOVDconst [c]) (MOVDconst [d])) -> (MOVDconst [c|d])
-(ORconst [c] (MOVDconst [d])) -> (MOVDconst [c|d])
+(OR (MOVDconst [c]) (MOVDconst [d])) => (MOVDconst [c|d])
+(ORconst [c] (MOVDconst [d])) => (MOVDconst [c|d])
 (ORWconst [c] (MOVDconst [d])) -> (MOVDconst [c|d])
-(XOR (MOVDconst [c]) (MOVDconst [d])) -> (MOVDconst [c^d])
-(XORconst [c] (MOVDconst [d])) -> (MOVDconst [c^d])
+(XOR (MOVDconst [c]) (MOVDconst [d])) => (MOVDconst [c^d])
+(XORconst [c] (MOVDconst [d])) => (MOVDconst [c^d])
 (XORWconst [c] (MOVDconst [d])) -> (MOVDconst [c^d])
-(LoweredRound32F x:(FMOVSconst)) -> x
-(LoweredRound64F x:(FMOVDconst)) -> x
+(LoweredRound32F x:(FMOVSconst)) => x
+(LoweredRound64F x:(FMOVDconst)) => x
 
 // generic simplifications
 // TODO: more of this
-(ADD x (NEG y)) -> (SUB x y)
-(ADDW x (NEGW y)) -> (SUBW x y)
-(SUB x x) -> (MOVDconst [0])
-(SUBW x x) -> (MOVDconst [0])
-(AND x x) -> x
-(ANDW x x) -> x
-(OR x x) -> x
-(ORW x x) -> x
-(XOR x x) -> (MOVDconst [0])
-(XORW x x) -> (MOVDconst [0])
-(NEG (ADDconst [c] (NEG x))) && c != -(1<<31) -> (ADDconst [-c] x)
+(ADD x (NEG y)) => (SUB x y)
+(ADDW x (NEGW y)) => (SUBW x y)
+(SUB x x) => (MOVDconst [0])
+(SUBW x x) => (MOVDconst [0])
+(AND x x) => x
+(ANDW x x) => x
+(OR x x) => x
+(ORW x x) => x
+(XOR x x) => (MOVDconst [0])
+(XORW x x) => (MOVDconst [0])
+(NEG (ADDconst [c] (NEG x))) && c != -(1<<31) => (ADDconst [-c] x)
 (MOVBZreg (ANDWconst [m] x)) -> (MOVWZreg (ANDWconst <typ.UInt32> [int64( uint8(m))] x))
 (MOVHZreg (ANDWconst [m] x)) -> (MOVWZreg (ANDWconst <typ.UInt32> [int64(uint16(m))] x))
 (MOVBreg  (ANDWconst [m] x)) &&  int8(m) >= 0 -> (MOVWZreg (ANDWconst <typ.UInt32> [int64( uint8(m))] x))
 // (only constant fold borrow of zero)
 (Select1 (SUBC (MOVDconst [c]) (MOVDconst [d])))
   && uint64(d) <= uint64(c) && c-d == 0
-  -> (FlagGT)
+  => (FlagGT)
 (Select1 (SUBC (MOVDconst [c]) (MOVDconst [d])))
   && uint64(d) <= uint64(c) && c-d != 0
-  -> (FlagOV)
+  => (FlagOV)
 
 // add with carry
-(ADDE x y (FlagEQ)) -> (ADDC x y)
-(ADDE x y (FlagLT)) -> (ADDC x y)
+(ADDE x y (FlagEQ)) => (ADDC x y)
+(ADDE x y (FlagLT)) => (ADDC x y)
 (ADDC x (MOVDconst [c])) && is16Bit(c) -> (ADDCconst x [c])
 (Select0 (ADDCconst (MOVDconst [c]) [d])) -> (MOVDconst [c+d])
 
 // subtract with borrow
-(SUBE x y (FlagGT)) -> (SUBC x y)
-(SUBE x y (FlagOV)) -> (SUBC x y)
-(Select0 (SUBC (MOVDconst [c]) (MOVDconst [d]))) -> (MOVDconst [c-d])
+(SUBE x y (FlagGT)) => (SUBC x y)
+(SUBE x y (FlagOV)) => (SUBC x y)
+(Select0 (SUBC (MOVDconst [c]) (MOVDconst [d]))) => (MOVDconst [c-d])
 
 // collapse carry chain
 (ADDE x y (Select1 (ADDCconst [-1] (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) c)))))
-  -> (ADDE x y c)
+  => (ADDE x y c)
 
 // collapse borrow chain
 (SUBE x y (Select1 (SUBC (MOVDconst [0]) (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) c))))))
-  -> (SUBE x y c)
+  => (SUBE x y c)
 
 // branch on carry
 (C(G|LG)IJ {s390x.Equal}         (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) carry)) [0]) => (BRC {s390x.NoCarry} carry)
index 2dfc60bf9e0ba3417c904d92c1969b9b4d846c51..072de24fe7a151f347a715694e1d1573396f9ce9 100644 (file)
@@ -5231,7 +5231,7 @@ func rewriteValueS390X_OpS390XADDE(v *Value) bool {
                        break
                }
                v_2_0 := v_2.Args[0]
-               if v_2_0.Op != OpS390XADDCconst || v_2_0.AuxInt != -1 {
+               if v_2_0.Op != OpS390XADDCconst || auxIntToInt16(v_2_0.AuxInt) != -1 {
                        break
                }
                v_2_0_0 := v_2_0.Args[0]
@@ -5244,11 +5244,11 @@ func rewriteValueS390X_OpS390XADDE(v *Value) bool {
                }
                c := v_2_0_0_0.Args[2]
                v_2_0_0_0_0 := v_2_0_0_0.Args[0]
-               if v_2_0_0_0_0.Op != OpS390XMOVDconst || v_2_0_0_0_0.AuxInt != 0 {
+               if v_2_0_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_2_0_0_0_0.AuxInt) != 0 {
                        break
                }
                v_2_0_0_0_1 := v_2_0_0_0.Args[1]
-               if v_2_0_0_0_1.Op != OpS390XMOVDconst || v_2_0_0_0_1.AuxInt != 0 {
+               if v_2_0_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_2_0_0_0_1.AuxInt) != 0 {
                        break
                }
                v.reset(OpS390XADDE)
@@ -5377,7 +5377,7 @@ func rewriteValueS390X_OpS390XADDWconst(v *Value) bool {
        // cond: int32(c)==0
        // result: x
        for {
-               c := v.AuxInt
+               c := auxIntToInt32(v.AuxInt)
                x := v_0
                if !(int32(c) == 0) {
                        break
@@ -5530,7 +5530,7 @@ func rewriteValueS390X_OpS390XADDconst(v *Value) bool {
        // match: (ADDconst [0] x)
        // result: x
        for {
-               if v.AuxInt != 0 {
+               if auxIntToInt32(v.AuxInt) != 0 {
                        break
                }
                x := v_0
@@ -5758,13 +5758,13 @@ func rewriteValueS390X_OpS390XAND(v *Value) bool {
                        if v_0.Op != OpS390XMOVDconst {
                                continue
                        }
-                       c := v_0.AuxInt
+                       c := auxIntToInt64(v_0.AuxInt)
                        if v_1.Op != OpS390XMOVDconst {
                                continue
                        }
-                       d := v_1.AuxInt
+                       d := auxIntToInt64(v_1.AuxInt)
                        v.reset(OpS390XMOVDconst)
-                       v.AuxInt = c & d
+                       v.AuxInt = int64ToAuxInt(c & d)
                        return true
                }
                break
@@ -5935,19 +5935,19 @@ func rewriteValueS390X_OpS390XANDWconst(v *Value) bool {
        // cond: int32(c)==0
        // result: (MOVDconst [0])
        for {
-               c := v.AuxInt
+               c := auxIntToInt32(v.AuxInt)
                if !(int32(c) == 0) {
                        break
                }
                v.reset(OpS390XMOVDconst)
-               v.AuxInt = 0
+               v.AuxInt = int64ToAuxInt(0)
                return true
        }
        // match: (ANDWconst [c] x)
        // cond: int32(c)==-1
        // result: x
        for {
-               c := v.AuxInt
+               c := auxIntToInt32(v.AuxInt)
                x := v_0
                if !(int32(c) == -1) {
                        break
@@ -6039,17 +6039,17 @@ func rewriteValueS390X_OpS390XANDconst(v *Value) bool {
        // match: (ANDconst [0] _)
        // result: (MOVDconst [0])
        for {
-               if v.AuxInt != 0 {
+               if auxIntToInt64(v.AuxInt) != 0 {
                        break
                }
                v.reset(OpS390XMOVDconst)
-               v.AuxInt = 0
+               v.AuxInt = int64ToAuxInt(0)
                return true
        }
        // match: (ANDconst [-1] x)
        // result: x
        for {
-               if v.AuxInt != -1 {
+               if auxIntToInt64(v.AuxInt) != -1 {
                        break
                }
                x := v_0
@@ -6059,13 +6059,13 @@ func rewriteValueS390X_OpS390XANDconst(v *Value) bool {
        // match: (ANDconst [c] (MOVDconst [d]))
        // result: (MOVDconst [c&d])
        for {
-               c := v.AuxInt
+               c := auxIntToInt64(v.AuxInt)
                if v_0.Op != OpS390XMOVDconst {
                        break
                }
-               d := v_0.AuxInt
+               d := auxIntToInt64(v_0.AuxInt)
                v.reset(OpS390XMOVDconst)
-               v.AuxInt = c & d
+               v.AuxInt = int64ToAuxInt(c & d)
                return true
        }
        return false
@@ -6265,11 +6265,11 @@ func rewriteValueS390X_OpS390XCMPUconst(v *Value) bool {
        // cond: uint64(x)==uint64(y)
        // result: (FlagEQ)
        for {
-               y := v.AuxInt
+               y := auxIntToInt32(v.AuxInt)
                if v_0.Op != OpS390XMOVDconst {
                        break
                }
-               x := v_0.AuxInt
+               x := auxIntToInt64(v_0.AuxInt)
                if !(uint64(x) == uint64(y)) {
                        break
                }
@@ -6280,11 +6280,11 @@ func rewriteValueS390X_OpS390XCMPUconst(v *Value) bool {
        // cond: uint64(x)<uint64(y)
        // result: (FlagLT)
        for {
-               y := v.AuxInt
+               y := auxIntToInt32(v.AuxInt)
                if v_0.Op != OpS390XMOVDconst {
                        break
                }
-               x := v_0.AuxInt
+               x := auxIntToInt64(v_0.AuxInt)
                if !(uint64(x) < uint64(y)) {
                        break
                }
@@ -6295,11 +6295,11 @@ func rewriteValueS390X_OpS390XCMPUconst(v *Value) bool {
        // cond: uint64(x)>uint64(y)
        // result: (FlagGT)
        for {
-               y := v.AuxInt
+               y := auxIntToInt32(v.AuxInt)
                if v_0.Op != OpS390XMOVDconst {
                        break
                }
-               x := v_0.AuxInt
+               x := auxIntToInt64(v_0.AuxInt)
                if !(uint64(x) > uint64(y)) {
                        break
                }
@@ -6310,11 +6310,11 @@ func rewriteValueS390X_OpS390XCMPUconst(v *Value) bool {
        // cond: c > 0 && c < 64 && (1<<uint(64-c)) <= uint64(n)
        // result: (FlagLT)
        for {
-               n := v.AuxInt
+               n := auxIntToInt32(v.AuxInt)
                if v_0.Op != OpS390XSRDconst {
                        break
                }
-               c := v_0.AuxInt
+               c := auxIntToInt8(v_0.AuxInt)
                if !(c > 0 && c < 64 && (1<<uint(64-c)) <= uint64(n)) {
                        break
                }
@@ -6324,65 +6324,65 @@ func rewriteValueS390X_OpS390XCMPUconst(v *Value) bool {
        // match: (CMPUconst (MOVWZreg x) [c])
        // result: (CMPWUconst x [c])
        for {
-               c := v.AuxInt
+               c := auxIntToInt32(v.AuxInt)
                if v_0.Op != OpS390XMOVWZreg {
                        break
                }
                x := v_0.Args[0]
                v.reset(OpS390XCMPWUconst)
-               v.AuxInt = c
+               v.AuxInt = int32ToAuxInt(c)
                v.AddArg(x)
                return true
        }
        // match: (CMPUconst x:(MOVHreg _) [c])
        // result: (CMPWUconst x [c])
        for {
-               c := v.AuxInt
+               c := auxIntToInt32(v.AuxInt)
                x := v_0
                if x.Op != OpS390XMOVHreg {
                        break
                }
                v.reset(OpS390XCMPWUconst)
-               v.AuxInt = c
+               v.AuxInt = int32ToAuxInt(c)
                v.AddArg(x)
                return true
        }
        // match: (CMPUconst x:(MOVHZreg _) [c])
        // result: (CMPWUconst x [c])
        for {
-               c := v.AuxInt
+               c := auxIntToInt32(v.AuxInt)
                x := v_0
                if x.Op != OpS390XMOVHZreg {
                        break
                }
                v.reset(OpS390XCMPWUconst)
-               v.AuxInt = c
+               v.AuxInt = int32ToAuxInt(c)
                v.AddArg(x)
                return true
        }
        // match: (CMPUconst x:(MOVBreg _) [c])
        // result: (CMPWUconst x [c])
        for {
-               c := v.AuxInt
+               c := auxIntToInt32(v.AuxInt)
                x := v_0
                if x.Op != OpS390XMOVBreg {
                        break
                }
                v.reset(OpS390XCMPWUconst)
-               v.AuxInt = c
+               v.AuxInt = int32ToAuxInt(c)
                v.AddArg(x)
                return true
        }
        // match: (CMPUconst x:(MOVBZreg _) [c])
        // result: (CMPWUconst x [c])
        for {
-               c := v.AuxInt
+               c := auxIntToInt32(v.AuxInt)
                x := v_0
                if x.Op != OpS390XMOVBZreg {
                        break
                }
                v.reset(OpS390XCMPWUconst)
-               v.AuxInt = c
+               v.AuxInt = int32ToAuxInt(c)
                v.AddArg(x)
                return true
        }
@@ -6390,7 +6390,7 @@ func rewriteValueS390X_OpS390XCMPUconst(v *Value) bool {
        // cond: int32(m) >= 0
        // result: (CMPWUconst x [c])
        for {
-               c := v.AuxInt
+               c := auxIntToInt32(v.AuxInt)
                if v_0.Op != OpS390XMOVWZreg {
                        break
                }
@@ -6398,12 +6398,12 @@ func rewriteValueS390X_OpS390XCMPUconst(v *Value) bool {
                if x.Op != OpS390XANDWconst {
                        break
                }
-               m := x.AuxInt
+               m := auxIntToInt32(x.AuxInt)
                if !(int32(m) >= 0) {
                        break
                }
                v.reset(OpS390XCMPWUconst)
-               v.AuxInt = c
+               v.AuxInt = int32ToAuxInt(c)
                v.AddArg(x)
                return true
        }
@@ -6411,7 +6411,7 @@ func rewriteValueS390X_OpS390XCMPUconst(v *Value) bool {
        // cond: int32(m) >= 0
        // result: (CMPWUconst x [c])
        for {
-               c := v.AuxInt
+               c := auxIntToInt32(v.AuxInt)
                if v_0.Op != OpS390XMOVWreg {
                        break
                }
@@ -6419,12 +6419,12 @@ func rewriteValueS390X_OpS390XCMPUconst(v *Value) bool {
                if x.Op != OpS390XANDWconst {
                        break
                }
-               m := x.AuxInt
+               m := auxIntToInt32(x.AuxInt)
                if !(int32(m) >= 0) {
                        break
                }
                v.reset(OpS390XCMPWUconst)
-               v.AuxInt = c
+               v.AuxInt = int32ToAuxInt(c)
                v.AddArg(x)
                return true
        }
@@ -6630,11 +6630,11 @@ func rewriteValueS390X_OpS390XCMPWUconst(v *Value) bool {
        // cond: uint32(x)==uint32(y)
        // result: (FlagEQ)
        for {
-               y := v.AuxInt
+               y := auxIntToInt32(v.AuxInt)
                if v_0.Op != OpS390XMOVDconst {
                        break
                }
-               x := v_0.AuxInt
+               x := auxIntToInt64(v_0.AuxInt)
                if !(uint32(x) == uint32(y)) {
                        break
                }
@@ -6645,11 +6645,11 @@ func rewriteValueS390X_OpS390XCMPWUconst(v *Value) bool {
        // cond: uint32(x)<uint32(y)
        // result: (FlagLT)
        for {
-               y := v.AuxInt
+               y := auxIntToInt32(v.AuxInt)
                if v_0.Op != OpS390XMOVDconst {
                        break
                }
-               x := v_0.AuxInt
+               x := auxIntToInt64(v_0.AuxInt)
                if !(uint32(x) < uint32(y)) {
                        break
                }
@@ -6660,11 +6660,11 @@ func rewriteValueS390X_OpS390XCMPWUconst(v *Value) bool {
        // cond: uint32(x)>uint32(y)
        // result: (FlagGT)
        for {
-               y := v.AuxInt
+               y := auxIntToInt32(v.AuxInt)
                if v_0.Op != OpS390XMOVDconst {
                        break
                }
-               x := v_0.AuxInt
+               x := auxIntToInt64(v_0.AuxInt)
                if !(uint32(x) > uint32(y)) {
                        break
                }
@@ -6675,7 +6675,7 @@ func rewriteValueS390X_OpS390XCMPWUconst(v *Value) bool {
        // cond: 0xff < c
        // result: (FlagLT)
        for {
-               c := v.AuxInt
+               c := auxIntToInt32(v.AuxInt)
                if v_0.Op != OpS390XMOVBZreg || !(0xff < c) {
                        break
                }
@@ -6686,7 +6686,7 @@ func rewriteValueS390X_OpS390XCMPWUconst(v *Value) bool {
        // cond: 0xffff < c
        // result: (FlagLT)
        for {
-               c := v.AuxInt
+               c := auxIntToInt32(v.AuxInt)
                if v_0.Op != OpS390XMOVHZreg || !(0xffff < c) {
                        break
                }
@@ -6697,11 +6697,11 @@ func rewriteValueS390X_OpS390XCMPWUconst(v *Value) bool {
        // cond: c > 0 && c < 32 && (1<<uint(32-c)) <= uint32(n)
        // result: (FlagLT)
        for {
-               n := v.AuxInt
+               n := auxIntToInt32(v.AuxInt)
                if v_0.Op != OpS390XSRWconst {
                        break
                }
-               c := v_0.AuxInt
+               c := auxIntToInt8(v_0.AuxInt)
                if !(c > 0 && c < 32 && (1<<uint(32-c)) <= uint32(n)) {
                        break
                }
@@ -6712,11 +6712,11 @@ func rewriteValueS390X_OpS390XCMPWUconst(v *Value) bool {
        // cond: uint32(m) < uint32(n)
        // result: (FlagLT)
        for {
-               n := v.AuxInt
+               n := auxIntToInt32(v.AuxInt)
                if v_0.Op != OpS390XANDWconst {
                        break
                }
-               m := v_0.AuxInt
+               m := auxIntToInt32(v_0.AuxInt)
                if !(uint32(m) < uint32(n)) {
                        break
                }
@@ -6726,26 +6726,26 @@ func rewriteValueS390X_OpS390XCMPWUconst(v *Value) bool {
        // match: (CMPWUconst (MOVWreg x) [c])
        // result: (CMPWUconst x [c])
        for {
-               c := v.AuxInt
+               c := auxIntToInt32(v.AuxInt)
                if v_0.Op != OpS390XMOVWreg {
                        break
                }
                x := v_0.Args[0]
                v.reset(OpS390XCMPWUconst)
-               v.AuxInt = c
+               v.AuxInt = int32ToAuxInt(c)
                v.AddArg(x)
                return true
        }
        // match: (CMPWUconst (MOVWZreg x) [c])
        // result: (CMPWUconst x [c])
        for {
-               c := v.AuxInt
+               c := auxIntToInt32(v.AuxInt)
                if v_0.Op != OpS390XMOVWZreg {
                        break
                }
                x := v_0.Args[0]
                v.reset(OpS390XCMPWUconst)
-               v.AuxInt = c
+               v.AuxInt = int32ToAuxInt(c)
                v.AddArg(x)
                return true
        }
@@ -6757,11 +6757,11 @@ func rewriteValueS390X_OpS390XCMPWconst(v *Value) bool {
        // cond: int32(x)==int32(y)
        // result: (FlagEQ)
        for {
-               y := v.AuxInt
+               y := auxIntToInt32(v.AuxInt)
                if v_0.Op != OpS390XMOVDconst {
                        break
                }
-               x := v_0.AuxInt
+               x := auxIntToInt64(v_0.AuxInt)
                if !(int32(x) == int32(y)) {
                        break
                }
@@ -6772,11 +6772,11 @@ func rewriteValueS390X_OpS390XCMPWconst(v *Value) bool {
        // cond: int32(x)<int32(y)
        // result: (FlagLT)
        for {
-               y := v.AuxInt
+               y := auxIntToInt32(v.AuxInt)
                if v_0.Op != OpS390XMOVDconst {
                        break
                }
-               x := v_0.AuxInt
+               x := auxIntToInt64(v_0.AuxInt)
                if !(int32(x) < int32(y)) {
                        break
                }
@@ -6787,11 +6787,11 @@ func rewriteValueS390X_OpS390XCMPWconst(v *Value) bool {
        // cond: int32(x)>int32(y)
        // result: (FlagGT)
        for {
-               y := v.AuxInt
+               y := auxIntToInt32(v.AuxInt)
                if v_0.Op != OpS390XMOVDconst {
                        break
                }
-               x := v_0.AuxInt
+               x := auxIntToInt64(v_0.AuxInt)
                if !(int32(x) > int32(y)) {
                        break
                }
@@ -6802,7 +6802,7 @@ func rewriteValueS390X_OpS390XCMPWconst(v *Value) bool {
        // cond: 0xff < c
        // result: (FlagLT)
        for {
-               c := v.AuxInt
+               c := auxIntToInt32(v.AuxInt)
                if v_0.Op != OpS390XMOVBZreg || !(0xff < c) {
                        break
                }
@@ -6813,7 +6813,7 @@ func rewriteValueS390X_OpS390XCMPWconst(v *Value) bool {
        // cond: 0xffff < c
        // result: (FlagLT)
        for {
-               c := v.AuxInt
+               c := auxIntToInt32(v.AuxInt)
                if v_0.Op != OpS390XMOVHZreg || !(0xffff < c) {
                        break
                }
@@ -6824,11 +6824,11 @@ func rewriteValueS390X_OpS390XCMPWconst(v *Value) bool {
        // cond: c > 0 && n < 0
        // result: (FlagGT)
        for {
-               n := v.AuxInt
+               n := auxIntToInt32(v.AuxInt)
                if v_0.Op != OpS390XSRWconst {
                        break
                }
-               c := v_0.AuxInt
+               c := auxIntToInt8(v_0.AuxInt)
                if !(c > 0 && n < 0) {
                        break
                }
@@ -6839,11 +6839,11 @@ func rewriteValueS390X_OpS390XCMPWconst(v *Value) bool {
        // cond: int32(m) >= 0 && int32(m) < int32(n)
        // result: (FlagLT)
        for {
-               n := v.AuxInt
+               n := auxIntToInt32(v.AuxInt)
                if v_0.Op != OpS390XANDWconst {
                        break
                }
-               m := v_0.AuxInt
+               m := auxIntToInt32(v_0.AuxInt)
                if !(int32(m) >= 0 && int32(m) < int32(n)) {
                        break
                }
@@ -6854,43 +6854,43 @@ func rewriteValueS390X_OpS390XCMPWconst(v *Value) bool {
        // cond: c > 0 && n >= 0
        // result: (CMPWUconst x [n])
        for {
-               n := v.AuxInt
+               n := auxIntToInt32(v.AuxInt)
                x := v_0
                if x.Op != OpS390XSRWconst {
                        break
                }
-               c := x.AuxInt
+               c := auxIntToInt8(x.AuxInt)
                if !(c > 0 && n >= 0) {
                        break
                }
                v.reset(OpS390XCMPWUconst)
-               v.AuxInt = n
+               v.AuxInt = int32ToAuxInt(n)
                v.AddArg(x)
                return true
        }
        // match: (CMPWconst (MOVWreg x) [c])
        // result: (CMPWconst x [c])
        for {
-               c := v.AuxInt
+               c := auxIntToInt32(v.AuxInt)
                if v_0.Op != OpS390XMOVWreg {
                        break
                }
                x := v_0.Args[0]
                v.reset(OpS390XCMPWconst)
-               v.AuxInt = c
+               v.AuxInt = int32ToAuxInt(c)
                v.AddArg(x)
                return true
        }
        // match: (CMPWconst (MOVWZreg x) [c])
        // result: (CMPWconst x [c])
        for {
-               c := v.AuxInt
+               c := auxIntToInt32(v.AuxInt)
                if v_0.Op != OpS390XMOVWZreg {
                        break
                }
                x := v_0.Args[0]
                v.reset(OpS390XCMPWconst)
-               v.AuxInt = c
+               v.AuxInt = int32ToAuxInt(c)
                v.AddArg(x)
                return true
        }
@@ -6947,11 +6947,11 @@ func rewriteValueS390X_OpS390XCMPconst(v *Value) bool {
        // cond: c > 0 && n < 0
        // result: (FlagGT)
        for {
-               n := v.AuxInt
+               n := auxIntToInt32(v.AuxInt)
                if v_0.Op != OpS390XSRDconst {
                        break
                }
-               c := v_0.AuxInt
+               c := auxIntToInt8(v_0.AuxInt)
                if !(c > 0 && n < 0) {
                        break
                }
@@ -6961,65 +6961,65 @@ func rewriteValueS390X_OpS390XCMPconst(v *Value) bool {
        // match: (CMPconst (MOVWreg x) [c])
        // result: (CMPWconst x [c])
        for {
-               c := v.AuxInt
+               c := auxIntToInt32(v.AuxInt)
                if v_0.Op != OpS390XMOVWreg {
                        break
                }
                x := v_0.Args[0]
                v.reset(OpS390XCMPWconst)
-               v.AuxInt = c
+               v.AuxInt = int32ToAuxInt(c)
                v.AddArg(x)
                return true
        }
        // match: (CMPconst x:(MOVHreg _) [c])
        // result: (CMPWconst x [c])
        for {
-               c := v.AuxInt
+               c := auxIntToInt32(v.AuxInt)
                x := v_0
                if x.Op != OpS390XMOVHreg {
                        break
                }
                v.reset(OpS390XCMPWconst)
-               v.AuxInt = c
+               v.AuxInt = int32ToAuxInt(c)
                v.AddArg(x)
                return true
        }
        // match: (CMPconst x:(MOVHZreg _) [c])
        // result: (CMPWconst x [c])
        for {
-               c := v.AuxInt
+               c := auxIntToInt32(v.AuxInt)
                x := v_0
                if x.Op != OpS390XMOVHZreg {
                        break
                }
                v.reset(OpS390XCMPWconst)
-               v.AuxInt = c
+               v.AuxInt = int32ToAuxInt(c)
                v.AddArg(x)
                return true
        }
        // match: (CMPconst x:(MOVBreg _) [c])
        // result: (CMPWconst x [c])
        for {
-               c := v.AuxInt
+               c := auxIntToInt32(v.AuxInt)
                x := v_0
                if x.Op != OpS390XMOVBreg {
                        break
                }
                v.reset(OpS390XCMPWconst)
-               v.AuxInt = c
+               v.AuxInt = int32ToAuxInt(c)
                v.AddArg(x)
                return true
        }
        // match: (CMPconst x:(MOVBZreg _) [c])
        // result: (CMPWconst x [c])
        for {
-               c := v.AuxInt
+               c := auxIntToInt32(v.AuxInt)
                x := v_0
                if x.Op != OpS390XMOVBZreg {
                        break
                }
                v.reset(OpS390XCMPWconst)
-               v.AuxInt = c
+               v.AuxInt = int32ToAuxInt(c)
                v.AddArg(x)
                return true
        }
@@ -7027,7 +7027,7 @@ func rewriteValueS390X_OpS390XCMPconst(v *Value) bool {
        // cond: int32(m) >= 0 && c >= 0
        // result: (CMPWUconst x [c])
        for {
-               c := v.AuxInt
+               c := auxIntToInt32(v.AuxInt)
                if v_0.Op != OpS390XMOVWZreg {
                        break
                }
@@ -7035,12 +7035,12 @@ func rewriteValueS390X_OpS390XCMPconst(v *Value) bool {
                if x.Op != OpS390XANDWconst {
                        break
                }
-               m := x.AuxInt
+               m := auxIntToInt32(x.AuxInt)
                if !(int32(m) >= 0 && c >= 0) {
                        break
                }
                v.reset(OpS390XCMPWUconst)
-               v.AuxInt = c
+               v.AuxInt = int32ToAuxInt(c)
                v.AddArg(x)
                return true
        }
@@ -7048,7 +7048,7 @@ func rewriteValueS390X_OpS390XCMPconst(v *Value) bool {
        // cond: int32(m) >= 0 && c >= 0
        // result: (CMPWUconst x [c])
        for {
-               c := v.AuxInt
+               c := auxIntToInt32(v.AuxInt)
                if v_0.Op != OpS390XMOVWreg {
                        break
                }
@@ -7056,12 +7056,12 @@ func rewriteValueS390X_OpS390XCMPconst(v *Value) bool {
                if x.Op != OpS390XANDWconst {
                        break
                }
-               m := x.AuxInt
+               m := auxIntToInt32(x.AuxInt)
                if !(int32(m) >= 0 && c >= 0) {
                        break
                }
                v.reset(OpS390XCMPWUconst)
-               v.AuxInt = c
+               v.AuxInt = int32ToAuxInt(c)
                v.AddArg(x)
                return true
        }
@@ -7069,17 +7069,17 @@ func rewriteValueS390X_OpS390XCMPconst(v *Value) bool {
        // cond: c > 0 && n >= 0
        // result: (CMPUconst x [n])
        for {
-               n := v.AuxInt
+               n := auxIntToInt32(v.AuxInt)
                x := v_0
                if x.Op != OpS390XSRDconst {
                        break
                }
-               c := x.AuxInt
+               c := auxIntToInt8(x.AuxInt)
                if !(c > 0 && n >= 0) {
                        break
                }
                v.reset(OpS390XCMPUconst)
-               v.AuxInt = n
+               v.AuxInt = int32ToAuxInt(n)
                v.AddArg(x)
                return true
        }
@@ -7312,8 +7312,8 @@ func rewriteValueS390X_OpS390XFMOVDload(v *Value) bool {
        // cond: ptr.Op != OpSB
        // result: (FMOVDloadidx [off] {sym} ptr idx mem)
        for {
-               off := v.AuxInt
-               sym := v.Aux
+               off := auxIntToInt32(v.AuxInt)
+               sym := auxToSym(v.Aux)
                if v_0.Op != OpS390XADD {
                        break
                }
@@ -7328,8 +7328,8 @@ func rewriteValueS390X_OpS390XFMOVDload(v *Value) bool {
                                continue
                        }
                        v.reset(OpS390XFMOVDloadidx)
-                       v.AuxInt = off
-                       v.Aux = sym
+                       v.AuxInt = int32ToAuxInt(off)
+                       v.Aux = symToAux(sym)
                        v.AddArg3(ptr, idx, mem)
                        return true
                }
@@ -7464,8 +7464,8 @@ func rewriteValueS390X_OpS390XFMOVDstore(v *Value) bool {
        // cond: ptr.Op != OpSB
        // result: (FMOVDstoreidx [off] {sym} ptr idx val mem)
        for {
-               off := v.AuxInt
-               sym := v.Aux
+               off := auxIntToInt32(v.AuxInt)
+               sym := auxToSym(v.Aux)
                if v_0.Op != OpS390XADD {
                        break
                }
@@ -7481,8 +7481,8 @@ func rewriteValueS390X_OpS390XFMOVDstore(v *Value) bool {
                                continue
                        }
                        v.reset(OpS390XFMOVDstoreidx)
-                       v.AuxInt = off
-                       v.Aux = sym
+                       v.AuxInt = int32ToAuxInt(off)
+                       v.Aux = symToAux(sym)
                        v.AddArg4(ptr, idx, val, mem)
                        return true
                }
@@ -7634,8 +7634,8 @@ func rewriteValueS390X_OpS390XFMOVSload(v *Value) bool {
        // cond: ptr.Op != OpSB
        // result: (FMOVSloadidx [off] {sym} ptr idx mem)
        for {
-               off := v.AuxInt
-               sym := v.Aux
+               off := auxIntToInt32(v.AuxInt)
+               sym := auxToSym(v.Aux)
                if v_0.Op != OpS390XADD {
                        break
                }
@@ -7650,8 +7650,8 @@ func rewriteValueS390X_OpS390XFMOVSload(v *Value) bool {
                                continue
                        }
                        v.reset(OpS390XFMOVSloadidx)
-                       v.AuxInt = off
-                       v.Aux = sym
+                       v.AuxInt = int32ToAuxInt(off)
+                       v.Aux = symToAux(sym)
                        v.AddArg3(ptr, idx, mem)
                        return true
                }
@@ -7786,8 +7786,8 @@ func rewriteValueS390X_OpS390XFMOVSstore(v *Value) bool {
        // cond: ptr.Op != OpSB
        // result: (FMOVSstoreidx [off] {sym} ptr idx val mem)
        for {
-               off := v.AuxInt
-               sym := v.Aux
+               off := auxIntToInt32(v.AuxInt)
+               sym := auxToSym(v.Aux)
                if v_0.Op != OpS390XADD {
                        break
                }
@@ -7803,8 +7803,8 @@ func rewriteValueS390X_OpS390XFMOVSstore(v *Value) bool {
                                continue
                        }
                        v.reset(OpS390XFMOVSstoreidx)
-                       v.AuxInt = off
-                       v.Aux = sym
+                       v.AuxInt = int32ToAuxInt(off)
+                       v.Aux = symToAux(sym)
                        v.AddArg4(ptr, idx, val, mem)
                        return true
                }
@@ -8384,8 +8384,8 @@ func rewriteValueS390X_OpS390XMOVBZload(v *Value) bool {
        // cond: ptr.Op != OpSB
        // result: (MOVBZloadidx [off] {sym} ptr idx mem)
        for {
-               off := v.AuxInt
-               sym := v.Aux
+               off := auxIntToInt32(v.AuxInt)
+               sym := auxToSym(v.Aux)
                if v_0.Op != OpS390XADD {
                        break
                }
@@ -8400,8 +8400,8 @@ func rewriteValueS390X_OpS390XMOVBZload(v *Value) bool {
                                continue
                        }
                        v.reset(OpS390XMOVBZloadidx)
-                       v.AuxInt = off
-                       v.Aux = sym
+                       v.AuxInt = int32ToAuxInt(off)
+                       v.Aux = symToAux(sym)
                        v.AddArg3(ptr, idx, mem)
                        return true
                }
@@ -8796,8 +8796,8 @@ func rewriteValueS390X_OpS390XMOVBload(v *Value) bool {
        // cond: ptr.Op != OpSB
        // result: (MOVBloadidx [off] {sym} ptr idx mem)
        for {
-               off := v.AuxInt
-               sym := v.Aux
+               off := auxIntToInt32(v.AuxInt)
+               sym := auxToSym(v.Aux)
                if v_0.Op != OpS390XADD {
                        break
                }
@@ -8812,8 +8812,8 @@ func rewriteValueS390X_OpS390XMOVBload(v *Value) bool {
                                continue
                        }
                        v.reset(OpS390XMOVBloadidx)
-                       v.AuxInt = off
-                       v.Aux = sym
+                       v.AuxInt = int32ToAuxInt(off)
+                       v.Aux = symToAux(sym)
                        v.AddArg3(ptr, idx, mem)
                        return true
                }
@@ -9102,8 +9102,8 @@ func rewriteValueS390X_OpS390XMOVBstore(v *Value) bool {
        // match: (MOVBstore [off] {sym} ptr (MOVBreg x) mem)
        // result: (MOVBstore [off] {sym} ptr x mem)
        for {
-               off := v.AuxInt
-               sym := v.Aux
+               off := auxIntToInt32(v.AuxInt)
+               sym := auxToSym(v.Aux)
                ptr := v_0
                if v_1.Op != OpS390XMOVBreg {
                        break
@@ -9111,16 +9111,16 @@ func rewriteValueS390X_OpS390XMOVBstore(v *Value) bool {
                x := v_1.Args[0]
                mem := v_2
                v.reset(OpS390XMOVBstore)
-               v.AuxInt = off
-               v.Aux = sym
+               v.AuxInt = int32ToAuxInt(off)
+               v.Aux = symToAux(sym)
                v.AddArg3(ptr, x, mem)
                return true
        }
        // match: (MOVBstore [off] {sym} ptr (MOVBZreg x) mem)
        // result: (MOVBstore [off] {sym} ptr x mem)
        for {
-               off := v.AuxInt
-               sym := v.Aux
+               off := auxIntToInt32(v.AuxInt)
+               sym := auxToSym(v.Aux)
                ptr := v_0
                if v_1.Op != OpS390XMOVBZreg {
                        break
@@ -9128,8 +9128,8 @@ func rewriteValueS390X_OpS390XMOVBstore(v *Value) bool {
                x := v_1.Args[0]
                mem := v_2
                v.reset(OpS390XMOVBstore)
-               v.AuxInt = off
-               v.Aux = sym
+               v.AuxInt = int32ToAuxInt(off)
+               v.Aux = symToAux(sym)
                v.AddArg3(ptr, x, mem)
                return true
        }
@@ -9227,8 +9227,8 @@ func rewriteValueS390X_OpS390XMOVBstore(v *Value) bool {
        // cond: ptr.Op != OpSB
        // result: (MOVBstoreidx [off] {sym} ptr idx val mem)
        for {
-               off := v.AuxInt
-               sym := v.Aux
+               off := auxIntToInt32(v.AuxInt)
+               sym := auxToSym(v.Aux)
                if v_0.Op != OpS390XADD {
                        break
                }
@@ -9244,8 +9244,8 @@ func rewriteValueS390X_OpS390XMOVBstore(v *Value) bool {
                                continue
                        }
                        v.reset(OpS390XMOVBstoreidx)
-                       v.AuxInt = off
-                       v.Aux = sym
+                       v.AuxInt = int32ToAuxInt(off)
+                       v.Aux = symToAux(sym)
                        v.AddArg4(ptr, idx, val, mem)
                        return true
                }
@@ -10099,8 +10099,8 @@ func rewriteValueS390X_OpS390XMOVDload(v *Value) bool {
        // cond: ptr.Op != OpSB
        // result: (MOVDloadidx [off] {sym} ptr idx mem)
        for {
-               off := v.AuxInt
-               sym := v.Aux
+               off := auxIntToInt32(v.AuxInt)
+               sym := auxToSym(v.Aux)
                if v_0.Op != OpS390XADD {
                        break
                }
@@ -10115,8 +10115,8 @@ func rewriteValueS390X_OpS390XMOVDload(v *Value) bool {
                                continue
                        }
                        v.reset(OpS390XMOVDloadidx)
-                       v.AuxInt = off
-                       v.Aux = sym
+                       v.AuxInt = int32ToAuxInt(off)
+                       v.Aux = symToAux(sym)
                        v.AddArg3(ptr, idx, mem)
                        return true
                }
@@ -10279,8 +10279,8 @@ func rewriteValueS390X_OpS390XMOVDstore(v *Value) bool {
        // cond: ptr.Op != OpSB
        // result: (MOVDstoreidx [off] {sym} ptr idx val mem)
        for {
-               off := v.AuxInt
-               sym := v.Aux
+               off := auxIntToInt32(v.AuxInt)
+               sym := auxToSym(v.Aux)
                if v_0.Op != OpS390XADD {
                        break
                }
@@ -10296,8 +10296,8 @@ func rewriteValueS390X_OpS390XMOVDstore(v *Value) bool {
                                continue
                        }
                        v.reset(OpS390XMOVDstoreidx)
-                       v.AuxInt = off
-                       v.Aux = sym
+                       v.AuxInt = int32ToAuxInt(off)
+                       v.Aux = symToAux(sym)
                        v.AddArg4(ptr, idx, val, mem)
                        return true
                }
@@ -10851,8 +10851,8 @@ func rewriteValueS390X_OpS390XMOVHZload(v *Value) bool {
        // cond: ptr.Op != OpSB
        // result: (MOVHZloadidx [off] {sym} ptr idx mem)
        for {
-               off := v.AuxInt
-               sym := v.Aux
+               off := auxIntToInt32(v.AuxInt)
+               sym := auxToSym(v.Aux)
                if v_0.Op != OpS390XADD {
                        break
                }
@@ -10867,8 +10867,8 @@ func rewriteValueS390X_OpS390XMOVHZload(v *Value) bool {
                                continue
                        }
                        v.reset(OpS390XMOVHZloadidx)
-                       v.AuxInt = off
-                       v.Aux = sym
+                       v.AuxInt = int32ToAuxInt(off)
+                       v.Aux = symToAux(sym)
                        v.AddArg3(ptr, idx, mem)
                        return true
                }
@@ -11245,8 +11245,8 @@ func rewriteValueS390X_OpS390XMOVHload(v *Value) bool {
        // cond: ptr.Op != OpSB
        // result: (MOVHloadidx [off] {sym} ptr idx mem)
        for {
-               off := v.AuxInt
-               sym := v.Aux
+               off := auxIntToInt32(v.AuxInt)
+               sym := auxToSym(v.Aux)
                if v_0.Op != OpS390XADD {
                        break
                }
@@ -11261,8 +11261,8 @@ func rewriteValueS390X_OpS390XMOVHload(v *Value) bool {
                                continue
                        }
                        v.reset(OpS390XMOVHloadidx)
-                       v.AuxInt = off
-                       v.Aux = sym
+                       v.AuxInt = int32ToAuxInt(off)
+                       v.Aux = symToAux(sym)
                        v.AddArg3(ptr, idx, mem)
                        return true
                }
@@ -11579,8 +11579,8 @@ func rewriteValueS390X_OpS390XMOVHstore(v *Value) bool {
        // match: (MOVHstore [off] {sym} ptr (MOVHreg x) mem)
        // result: (MOVHstore [off] {sym} ptr x mem)
        for {
-               off := v.AuxInt
-               sym := v.Aux
+               off := auxIntToInt32(v.AuxInt)
+               sym := auxToSym(v.Aux)
                ptr := v_0
                if v_1.Op != OpS390XMOVHreg {
                        break
@@ -11588,16 +11588,16 @@ func rewriteValueS390X_OpS390XMOVHstore(v *Value) bool {
                x := v_1.Args[0]
                mem := v_2
                v.reset(OpS390XMOVHstore)
-               v.AuxInt = off
-               v.Aux = sym
+               v.AuxInt = int32ToAuxInt(off)
+               v.Aux = symToAux(sym)
                v.AddArg3(ptr, x, mem)
                return true
        }
        // match: (MOVHstore [off] {sym} ptr (MOVHZreg x) mem)
        // result: (MOVHstore [off] {sym} ptr x mem)
        for {
-               off := v.AuxInt
-               sym := v.Aux
+               off := auxIntToInt32(v.AuxInt)
+               sym := auxToSym(v.Aux)
                ptr := v_0
                if v_1.Op != OpS390XMOVHZreg {
                        break
@@ -11605,8 +11605,8 @@ func rewriteValueS390X_OpS390XMOVHstore(v *Value) bool {
                x := v_1.Args[0]
                mem := v_2
                v.reset(OpS390XMOVHstore)
-               v.AuxInt = off
-               v.Aux = sym
+               v.AuxInt = int32ToAuxInt(off)
+               v.Aux = symToAux(sym)
                v.AddArg3(ptr, x, mem)
                return true
        }
@@ -11705,8 +11705,8 @@ func rewriteValueS390X_OpS390XMOVHstore(v *Value) bool {
        // cond: ptr.Op != OpSB
        // result: (MOVHstoreidx [off] {sym} ptr idx val mem)
        for {
-               off := v.AuxInt
-               sym := v.Aux
+               off := auxIntToInt32(v.AuxInt)
+               sym := auxToSym(v.Aux)
                if v_0.Op != OpS390XADD {
                        break
                }
@@ -11722,8 +11722,8 @@ func rewriteValueS390X_OpS390XMOVHstore(v *Value) bool {
                                continue
                        }
                        v.reset(OpS390XMOVHstoreidx)
-                       v.AuxInt = off
-                       v.Aux = sym
+                       v.AuxInt = int32ToAuxInt(off)
+                       v.Aux = symToAux(sym)
                        v.AddArg4(ptr, idx, val, mem)
                        return true
                }
@@ -12359,8 +12359,8 @@ func rewriteValueS390X_OpS390XMOVWZload(v *Value) bool {
        // cond: ptr.Op != OpSB
        // result: (MOVWZloadidx [off] {sym} ptr idx mem)
        for {
-               off := v.AuxInt
-               sym := v.Aux
+               off := auxIntToInt32(v.AuxInt)
+               sym := auxToSym(v.Aux)
                if v_0.Op != OpS390XADD {
                        break
                }
@@ -12375,8 +12375,8 @@ func rewriteValueS390X_OpS390XMOVWZload(v *Value) bool {
                                continue
                        }
                        v.reset(OpS390XMOVWZloadidx)
-                       v.AuxInt = off
-                       v.Aux = sym
+                       v.AuxInt = int32ToAuxInt(off)
+                       v.Aux = symToAux(sym)
                        v.AddArg3(ptr, idx, mem)
                        return true
                }
@@ -12743,8 +12743,8 @@ func rewriteValueS390X_OpS390XMOVWload(v *Value) bool {
        // cond: ptr.Op != OpSB
        // result: (MOVWloadidx [off] {sym} ptr idx mem)
        for {
-               off := v.AuxInt
-               sym := v.Aux
+               off := auxIntToInt32(v.AuxInt)
+               sym := auxToSym(v.Aux)
                if v_0.Op != OpS390XADD {
                        break
                }
@@ -12759,8 +12759,8 @@ func rewriteValueS390X_OpS390XMOVWload(v *Value) bool {
                                continue
                        }
                        v.reset(OpS390XMOVWloadidx)
-                       v.AuxInt = off
-                       v.Aux = sym
+                       v.AuxInt = int32ToAuxInt(off)
+                       v.Aux = symToAux(sym)
                        v.AddArg3(ptr, idx, mem)
                        return true
                }
@@ -13085,8 +13085,8 @@ func rewriteValueS390X_OpS390XMOVWstore(v *Value) bool {
        // match: (MOVWstore [off] {sym} ptr (MOVWreg x) mem)
        // result: (MOVWstore [off] {sym} ptr x mem)
        for {
-               off := v.AuxInt
-               sym := v.Aux
+               off := auxIntToInt32(v.AuxInt)
+               sym := auxToSym(v.Aux)
                ptr := v_0
                if v_1.Op != OpS390XMOVWreg {
                        break
@@ -13094,16 +13094,16 @@ func rewriteValueS390X_OpS390XMOVWstore(v *Value) bool {
                x := v_1.Args[0]
                mem := v_2
                v.reset(OpS390XMOVWstore)
-               v.AuxInt = off
-               v.Aux = sym
+               v.AuxInt = int32ToAuxInt(off)
+               v.Aux = symToAux(sym)
                v.AddArg3(ptr, x, mem)
                return true
        }
        // match: (MOVWstore [off] {sym} ptr (MOVWZreg x) mem)
        // result: (MOVWstore [off] {sym} ptr x mem)
        for {
-               off := v.AuxInt
-               sym := v.Aux
+               off := auxIntToInt32(v.AuxInt)
+               sym := auxToSym(v.Aux)
                ptr := v_0
                if v_1.Op != OpS390XMOVWZreg {
                        break
@@ -13111,8 +13111,8 @@ func rewriteValueS390X_OpS390XMOVWstore(v *Value) bool {
                x := v_1.Args[0]
                mem := v_2
                v.reset(OpS390XMOVWstore)
-               v.AuxInt = off
-               v.Aux = sym
+               v.AuxInt = int32ToAuxInt(off)
+               v.Aux = symToAux(sym)
                v.AddArg3(ptr, x, mem)
                return true
        }
@@ -13211,8 +13211,8 @@ func rewriteValueS390X_OpS390XMOVWstore(v *Value) bool {
        // cond: ptr.Op != OpSB
        // result: (MOVWstoreidx [off] {sym} ptr idx val mem)
        for {
-               off := v.AuxInt
-               sym := v.Aux
+               off := auxIntToInt32(v.AuxInt)
+               sym := auxToSym(v.Aux)
                if v_0.Op != OpS390XADD {
                        break
                }
@@ -13228,8 +13228,8 @@ func rewriteValueS390X_OpS390XMOVWstore(v *Value) bool {
                                continue
                        }
                        v.reset(OpS390XMOVWstoreidx)
-                       v.AuxInt = off
-                       v.Aux = sym
+                       v.AuxInt = int32ToAuxInt(off)
+                       v.Aux = symToAux(sym)
                        v.AddArg4(ptr, idx, val, mem)
                        return true
                }
@@ -14032,9 +14032,9 @@ func rewriteValueS390X_OpS390XNEG(v *Value) bool {
                if v_0.Op != OpS390XMOVDconst {
                        break
                }
-               c := v_0.AuxInt
+               c := auxIntToInt64(v_0.AuxInt)
                v.reset(OpS390XMOVDconst)
-               v.AuxInt = -c
+               v.AuxInt = int64ToAuxInt(-c)
                return true
        }
        // match: (NEG (ADDconst [c] (NEG x)))
@@ -14044,7 +14044,7 @@ func rewriteValueS390X_OpS390XNEG(v *Value) bool {
                if v_0.Op != OpS390XADDconst {
                        break
                }
-               c := v_0.AuxInt
+               c := auxIntToInt32(v_0.AuxInt)
                v_0_0 := v_0.Args[0]
                if v_0_0.Op != OpS390XNEG {
                        break
@@ -14054,7 +14054,7 @@ func rewriteValueS390X_OpS390XNEG(v *Value) bool {
                        break
                }
                v.reset(OpS390XADDconst)
-               v.AuxInt = -c
+               v.AuxInt = int32ToAuxInt(-c)
                v.AddArg(x)
                return true
        }
@@ -14068,9 +14068,9 @@ func rewriteValueS390X_OpS390XNEGW(v *Value) bool {
                if v_0.Op != OpS390XMOVDconst {
                        break
                }
-               c := v_0.AuxInt
+               c := auxIntToInt64(v_0.AuxInt)
                v.reset(OpS390XMOVDconst)
-               v.AuxInt = int64(int32(-c))
+               v.AuxInt = int64ToAuxInt(int64(int32(-c)))
                return true
        }
        return false
@@ -14310,13 +14310,13 @@ func rewriteValueS390X_OpS390XOR(v *Value) bool {
                        if v_0.Op != OpS390XMOVDconst {
                                continue
                        }
-                       c := v_0.AuxInt
+                       c := auxIntToInt64(v_0.AuxInt)
                        if v_1.Op != OpS390XMOVDconst {
                                continue
                        }
-                       d := v_1.AuxInt
+                       d := auxIntToInt64(v_1.AuxInt)
                        v.reset(OpS390XMOVDconst)
-                       v.AuxInt = c | d
+                       v.AuxInt = int64ToAuxInt(c | d)
                        return true
                }
                break
@@ -16245,7 +16245,7 @@ func rewriteValueS390X_OpS390XORWconst(v *Value) bool {
        // cond: int32(c)==0
        // result: x
        for {
-               c := v.AuxInt
+               c := auxIntToInt32(v.AuxInt)
                x := v_0
                if !(int32(c) == 0) {
                        break
@@ -16257,12 +16257,12 @@ func rewriteValueS390X_OpS390XORWconst(v *Value) bool {
        // cond: int32(c)==-1
        // result: (MOVDconst [-1])
        for {
-               c := v.AuxInt
+               c := auxIntToInt32(v.AuxInt)
                if !(int32(c) == -1) {
                        break
                }
                v.reset(OpS390XMOVDconst)
-               v.AuxInt = -1
+               v.AuxInt = int64ToAuxInt(-1)
                return true
        }
        // match: (ORWconst [c] (MOVDconst [d]))
@@ -16335,7 +16335,7 @@ func rewriteValueS390X_OpS390XORconst(v *Value) bool {
        // match: (ORconst [0] x)
        // result: x
        for {
-               if v.AuxInt != 0 {
+               if auxIntToInt64(v.AuxInt) != 0 {
                        break
                }
                x := v_0
@@ -16345,23 +16345,23 @@ func rewriteValueS390X_OpS390XORconst(v *Value) bool {
        // match: (ORconst [-1] _)
        // result: (MOVDconst [-1])
        for {
-               if v.AuxInt != -1 {
+               if auxIntToInt64(v.AuxInt) != -1 {
                        break
                }
                v.reset(OpS390XMOVDconst)
-               v.AuxInt = -1
+               v.AuxInt = int64ToAuxInt(-1)
                return true
        }
        // match: (ORconst [c] (MOVDconst [d]))
        // result: (MOVDconst [c|d])
        for {
-               c := v.AuxInt
+               c := auxIntToInt64(v.AuxInt)
                if v_0.Op != OpS390XMOVDconst {
                        break
                }
-               d := v_0.AuxInt
+               d := auxIntToInt64(v_0.AuxInt)
                v.reset(OpS390XMOVDconst)
-               v.AuxInt = c | d
+               v.AuxInt = int64ToAuxInt(c | d)
                return true
        }
        return false
@@ -16884,13 +16884,13 @@ func rewriteValueS390X_OpS390XSRADconst(v *Value) bool {
        // match: (SRADconst [c] (MOVDconst [d]))
        // result: (MOVDconst [d>>uint64(c)])
        for {
-               c := v.AuxInt
+               c := auxIntToInt8(v.AuxInt)
                if v_0.Op != OpS390XMOVDconst {
                        break
                }
-               d := v_0.AuxInt
+               d := auxIntToInt64(v_0.AuxInt)
                v.reset(OpS390XMOVDconst)
-               v.AuxInt = d >> uint64(c)
+               v.AuxInt = int64ToAuxInt(d >> uint64(c))
                return true
        }
        return false
@@ -17034,13 +17034,13 @@ func rewriteValueS390X_OpS390XSRAWconst(v *Value) bool {
        // match: (SRAWconst [c] (MOVDconst [d]))
        // result: (MOVDconst [int64(int32(d))>>uint64(c)])
        for {
-               c := v.AuxInt
+               c := auxIntToInt8(v.AuxInt)
                if v_0.Op != OpS390XMOVDconst {
                        break
                }
-               d := v_0.AuxInt
+               d := auxIntToInt64(v_0.AuxInt)
                v.reset(OpS390XMOVDconst)
-               v.AuxInt = int64(int32(d)) >> uint64(c)
+               v.AuxInt = int64ToAuxInt(int64(int32(d)) >> uint64(c))
                return true
        }
        return false
@@ -17475,7 +17475,7 @@ func rewriteValueS390X_OpS390XSUB(v *Value) bool {
                        break
                }
                v.reset(OpS390XMOVDconst)
-               v.AuxInt = 0
+               v.AuxInt = int64ToAuxInt(0)
                return true
        }
        // match: (SUB <t> x g:(MOVDload [off] {sym} ptr mem))
@@ -17546,7 +17546,7 @@ func rewriteValueS390X_OpS390XSUBE(v *Value) bool {
                }
                _ = v_2_0.Args[1]
                v_2_0_0 := v_2_0.Args[0]
-               if v_2_0_0.Op != OpS390XMOVDconst || v_2_0_0.AuxInt != 0 {
+               if v_2_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_2_0_0.AuxInt) != 0 {
                        break
                }
                v_2_0_1 := v_2_0.Args[1]
@@ -17563,11 +17563,11 @@ func rewriteValueS390X_OpS390XSUBE(v *Value) bool {
                }
                c := v_2_0_1_0_0.Args[2]
                v_2_0_1_0_0_0 := v_2_0_1_0_0.Args[0]
-               if v_2_0_1_0_0_0.Op != OpS390XMOVDconst || v_2_0_1_0_0_0.AuxInt != 0 {
+               if v_2_0_1_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_2_0_1_0_0_0.AuxInt) != 0 {
                        break
                }
                v_2_0_1_0_0_1 := v_2_0_1_0_0.Args[1]
-               if v_2_0_1_0_0_1.Op != OpS390XMOVDconst || v_2_0_1_0_0_1.AuxInt != 0 {
+               if v_2_0_1_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_2_0_1_0_0_1.AuxInt) != 0 {
                        break
                }
                v.reset(OpS390XSUBE)
@@ -17616,7 +17616,7 @@ func rewriteValueS390X_OpS390XSUBW(v *Value) bool {
                        break
                }
                v.reset(OpS390XMOVDconst)
-               v.AuxInt = 0
+               v.AuxInt = int64ToAuxInt(0)
                return true
        }
        // match: (SUBW <t> x g:(MOVWload [off] {sym} ptr mem))
@@ -17675,7 +17675,7 @@ func rewriteValueS390X_OpS390XSUBWconst(v *Value) bool {
        // cond: int32(c) == 0
        // result: x
        for {
-               c := v.AuxInt
+               c := auxIntToInt32(v.AuxInt)
                x := v_0
                if !(int32(c) == 0) {
                        break
@@ -17750,7 +17750,7 @@ func rewriteValueS390X_OpS390XSUBconst(v *Value) bool {
        // match: (SUBconst [0] x)
        // result: x
        for {
-               if v.AuxInt != 0 {
+               if auxIntToInt32(v.AuxInt) != 0 {
                        break
                }
                x := v_0
@@ -17761,13 +17761,13 @@ func rewriteValueS390X_OpS390XSUBconst(v *Value) bool {
        // cond: c != -(1<<31)
        // result: (ADDconst [-c] x)
        for {
-               c := v.AuxInt
+               c := auxIntToInt32(v.AuxInt)
                x := v_0
                if !(c != -(1 << 31)) {
                        break
                }
                v.reset(OpS390XADDconst)
-               v.AuxInt = -c
+               v.AuxInt = int32ToAuxInt(-c)
                v.AddArg(x)
                return true
        }
@@ -17984,13 +17984,13 @@ func rewriteValueS390X_OpS390XXOR(v *Value) bool {
                        if v_0.Op != OpS390XMOVDconst {
                                continue
                        }
-                       c := v_0.AuxInt
+                       c := auxIntToInt64(v_0.AuxInt)
                        if v_1.Op != OpS390XMOVDconst {
                                continue
                        }
-                       d := v_1.AuxInt
+                       d := auxIntToInt64(v_1.AuxInt)
                        v.reset(OpS390XMOVDconst)
-                       v.AuxInt = c ^ d
+                       v.AuxInt = int64ToAuxInt(c ^ d)
                        return true
                }
                break
@@ -18003,7 +18003,7 @@ func rewriteValueS390X_OpS390XXOR(v *Value) bool {
                        break
                }
                v.reset(OpS390XMOVDconst)
-               v.AuxInt = 0
+               v.AuxInt = int64ToAuxInt(0)
                return true
        }
        // match: (XOR <t> x g:(MOVDload [off] {sym} ptr mem))
@@ -18086,7 +18086,7 @@ func rewriteValueS390X_OpS390XXORW(v *Value) bool {
                        break
                }
                v.reset(OpS390XMOVDconst)
-               v.AuxInt = 0
+               v.AuxInt = int64ToAuxInt(0)
                return true
        }
        // match: (XORW <t> x g:(MOVWload [off] {sym} ptr mem))
@@ -18151,7 +18151,7 @@ func rewriteValueS390X_OpS390XXORWconst(v *Value) bool {
        // cond: int32(c)==0
        // result: x
        for {
-               c := v.AuxInt
+               c := auxIntToInt32(v.AuxInt)
                x := v_0
                if !(int32(c) == 0) {
                        break
@@ -18229,7 +18229,7 @@ func rewriteValueS390X_OpS390XXORconst(v *Value) bool {
        // match: (XORconst [0] x)
        // result: x
        for {
-               if v.AuxInt != 0 {
+               if auxIntToInt64(v.AuxInt) != 0 {
                        break
                }
                x := v_0
@@ -18239,13 +18239,13 @@ func rewriteValueS390X_OpS390XXORconst(v *Value) bool {
        // match: (XORconst [c] (MOVDconst [d]))
        // result: (MOVDconst [c^d])
        for {
-               c := v.AuxInt
+               c := auxIntToInt64(v.AuxInt)
                if v_0.Op != OpS390XMOVDconst {
                        break
                }
-               d := v_0.AuxInt
+               d := auxIntToInt64(v_0.AuxInt)
                v.reset(OpS390XMOVDconst)
-               v.AuxInt = c ^ d
+               v.AuxInt = int64ToAuxInt(c ^ d)
                return true
        }
        return false
@@ -18429,14 +18429,14 @@ func rewriteValueS390X_OpSelect0(v *Value) bool {
                if v_0_0.Op != OpS390XMOVDconst {
                        break
                }
-               c := v_0_0.AuxInt
+               c := auxIntToInt64(v_0_0.AuxInt)
                v_0_1 := v_0.Args[1]
                if v_0_1.Op != OpS390XMOVDconst {
                        break
                }
-               d := v_0_1.AuxInt
+               d := auxIntToInt64(v_0_1.AuxInt)
                v.reset(OpS390XMOVDconst)
-               v.AuxInt = c - d
+               v.AuxInt = int64ToAuxInt(c - d)
                return true
        }
        // match: (Select0 (FADD (FMUL y z) x))
@@ -18649,12 +18649,12 @@ func rewriteValueS390X_OpSelect1(v *Value) bool {
                if v_0_0.Op != OpS390XMOVDconst {
                        break
                }
-               c := v_0_0.AuxInt
+               c := auxIntToInt64(v_0_0.AuxInt)
                v_0_1 := v_0.Args[1]
                if v_0_1.Op != OpS390XMOVDconst {
                        break
                }
-               d := v_0_1.AuxInt
+               d := auxIntToInt64(v_0_1.AuxInt)
                if !(uint64(d) <= uint64(c) && c-d == 0) {
                        break
                }
@@ -18673,12 +18673,12 @@ func rewriteValueS390X_OpSelect1(v *Value) bool {
                if v_0_0.Op != OpS390XMOVDconst {
                        break
                }
-               c := v_0_0.AuxInt
+               c := auxIntToInt64(v_0_0.AuxInt)
                v_0_1 := v_0.Args[1]
                if v_0_1.Op != OpS390XMOVDconst {
                        break
                }
-               d := v_0_1.AuxInt
+               d := auxIntToInt64(v_0_1.AuxInt)
                if !(uint64(d) <= uint64(c) && c-d != 0) {
                        break
                }