func convertNeq0B(x uint8, c bool) bool {
// amd64:"ANDL\t[$]1",-"SETNE"
- // ppc64x:"ANDCC",-"CMPW",-"ISEL"
+ // ppc64x:"RLDICL",-"CMPW",-"ISEL"
b := x&1 != 0
return c && b
}
func convertNeq0W(x uint16, c bool) bool {
// amd64:"ANDL\t[$]1",-"SETNE"
- // ppc64x:"ANDCC",-"CMPW",-"ISEL"
+ // ppc64x:"RLDICL",-"CMPW",-"ISEL"
b := x&1 != 0
return c && b
}
func convertNeq0L(x uint32, c bool) bool {
// amd64:"ANDL\t[$]1",-"SETB"
- // ppc64x:"ANDCC",-"CMPW",-"ISEL"
+ // ppc64x:"RLDICL",-"CMPW",-"ISEL"
b := x&1 != 0
return c && b
}
func convertNeq0Q(x uint64, c bool) bool {
// amd64:"ANDL\t[$]1",-"SETB"
- // ppc64x:"ANDCC",-"CMP",-"ISEL"
+ // ppc64x:"RLDICL",-"CMP",-"ISEL"
b := x&1 != 0
return c && b
}
func convertNeqBool32(x uint32) bool {
- // ppc64x:"ANDCC",-"CMPW",-"ISEL"
+ // ppc64x:"RLDICL",-"CMPW",-"ISEL"
return x&1 != 0
}
func convertEqBool32(x uint32) bool {
- // ppc64x:"ANDCC",-"CMPW","XOR",-"ISEL"
+ // ppc64x:"RLDICL",-"CMPW","XOR",-"ISEL"
return x&1 == 0
}
func convertNeqBool64(x uint64) bool {
- // ppc64x:"ANDCC",-"CMP",-"ISEL"
+ // ppc64x:"RLDICL",-"CMP",-"ISEL"
return x&1 != 0
}
func convertEqBool64(x uint64) bool {
- // ppc64x:"ANDCC","XOR",-"CMP",-"ISEL"
+ // ppc64x:"RLDICL","XOR",-"CMP",-"ISEL"
return x&1 == 0
}
b := !(x >= y)
return b
}
+func TestAndCompareZero(x uint64, y uint64) uint64 {
+ // ppc64x:"ANDCC"
+ b := x&3
+ if b!=0 {
+ return b
+ }
+ return b+8
+}