3 // Copyright 2020 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
9 // This file contains codegen tests related to boolean simplifications/optimizations.
11 func convertNeq0B(x uint8, c bool) bool {
12 // amd64:"ANDL\t[$]1",-"SETNE"
13 // ppc64x:"ANDCC",-"CMPW",-"ISEL"
18 func convertNeq0W(x uint16, c bool) bool {
19 // amd64:"ANDL\t[$]1",-"SETNE"
20 // ppc64x:"ANDCC",-"CMPW",-"ISEL"
21 // ppc64le/power9:"ANDCC",-CMPW",-"ISEL"
26 func convertNeq0L(x uint32, c bool) bool {
27 // amd64:"ANDL\t[$]1",-"SETB"
28 // ppc64x:"ANDCC",-"CMPW",-"ISEL"
33 func convertNeq0Q(x uint64, c bool) bool {
34 // amd64:"ANDL\t[$]1",-"SETB"
35 // ppc64x:"ANDCC",-"CMP",-"ISEL"
40 func convertNeqBool32(x uint32) bool {
41 // ppc64x:"ANDCC",-"CMPW",-"ISEL"
45 func convertEqBool32(x uint32) bool {
46 // ppc64x:"ANDCC",-"CMPW","XOR",-"ISEL"
47 // ppc64le/power9:"ANDCC","XOR",-"CMPW",-"ISEL"
51 func convertNeqBool64(x uint64) bool {
52 // ppc64x:"ANDCC",-"CMP",-"ISEL"
56 func convertEqBool64(x uint64) bool {
57 // ppc64x:"ANDCC","XOR",-"CMP",-"ISEL"