1 // errorcheck -0 -d=ssa/phiopt/debug=3
3 //go:build amd64 || s390x || arm64
5 // Copyright 2016 The Go Authors. All rights reserved.
6 // Use of this source code is governed by a BSD-style
7 // license that can be found in the LICENSE file.
12 func f0(a bool) bool {
19 return x // ERROR "converted OpPhi to Copy$"
23 func f1(a bool) bool {
30 return x // ERROR "converted OpPhi to Not$"
34 func f2(a, b int) bool {
39 return x // ERROR "converted OpPhi to Not$"
43 func f3(a, b int) bool {
48 return x // ERROR "converted OpPhi to Copy$"
52 func f4(a, b bool) bool {
53 return a || b // ERROR "converted OpPhi to OrB$"
57 func f5or(a int, b bool) bool {
64 return x // ERROR "converted OpPhi to OrB$"
68 func f5and(a int, b bool) bool {
75 return x // ERROR "converted OpPhi to AndB$"
79 func f6or(a int, b bool) bool {
82 // f6or has side effects so the OpPhi should not be converted.
89 func f6and(a int, b bool) bool {
92 // f6and has side effects so the OpPhi should not be converted.
99 func f7or(a bool, b bool) bool {
100 return a || b // ERROR "converted OpPhi to OrB$"
104 func f7and(a bool, b bool) bool {
105 return a && b // ERROR "converted OpPhi to AndB$"
109 func f8(s string) (string, bool) {
111 if s[0] == '-' { // ERROR "converted OpPhi to Copy$"
121 func f9(a, b int) bool {
123 if a < 0 { // ERROR "converted OpPhi to Copy$"