]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix bug of conditional instructions on arm64
authoreric fang <eric.fang@arm.com>
Tue, 6 Apr 2021 07:23:38 +0000 (07:23 +0000)
committereric fang <eric.fang@arm.com>
Wed, 7 Apr 2021 02:05:55 +0000 (02:05 +0000)
commit8d77e45064fc808460843e741c46e3b6b737ae03
tree6c61494150ab6448b0ee288ac334f32773460657
parent972e8839254d59dc04a1193c4c9633a74595a2e7
cmd/compile: fix bug of conditional instructions on arm64

CL 302231 added some optimization rules with instructions CSETM, CSINC,
CSINV, and CSNEG, but did not deal with the situation where flag is
constant, resulting in some cases that could be more optimized cannot
be optimized, and the FlagConstant value is passed to codegen pass. This
CL adds these missing rules.

Fixes #45359

Change-Id: I700608cfb9a6a768a18d1fd5d374d7e92aa6f838
Reviewed-on: https://go-review.googlesource.com/c/go/+/307650
Reviewed-by: eric fang <eric.fang@arm.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Alberto Donizetti <alb.donizetti@gmail.com>
Run-TryBot: eric fang <eric.fang@arm.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: eric fang <eric.fang@arm.com>
Trust: Alberto Donizetti <alb.donizetti@gmail.com>
src/cmd/compile/internal/ssa/gen/ARM64.rules
src/cmd/compile/internal/ssa/rewriteARM64.go
test/fixedbugs/issue45359.go [new file with mode: 0644]