Commit 21de6bc4 authored by wdvxdr's avatar wdvxdr Committed by Cherry Mui
Browse files

cmd/compile: simplify less with non-negative number and constant 0 or 1

The most common cases:
len(s) > 0
len(s) < 1

and they can be simplified to:
len(s) != 0
len(s) == 0

Fixes #48054

Change-Id: I16e5b0cffcfab62a4acc2a09977a6cd3543dd000
Reviewed-on: https://go-review.googlesource.com/c/go/+/346050


Reviewed-by: default avatarKeith Randall <khr@golang.org>
Reviewed-by: default avatarCherry Mui <cherryyz@google.com>
parent 6226020c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment