]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: convert uint32 to int32 in ARM constant folding rules
authorCherry Zhang <cherryyz@google.com>
Thu, 21 Jun 2018 14:59:19 +0000 (10:59 -0400)
committerCherry Zhang <cherryyz@google.com>
Fri, 22 Jun 2018 16:25:32 +0000 (16:25 +0000)
commit78a579316b84f68eaf8ee401e77fdb85bb13483f
tree46022a8a6fdca1e7ce45167a9eebbe0312b9d1c4
parent82d1c2a8aafe68daf2ed66df7422cf173d68e014
cmd/compile: convert uint32 to int32 in ARM constant folding rules

MOVWconst's AuxInt is Int32. SSA check complains if the AuxInt
does not fit in int32. Convert uint32 to int32 to make it happy.

The generated code is unchanged. MOVW only cares low 32 bits.

Passes "toolstash -cmp" std cmd for ARM.

Fixes #25993.

Change-Id: I2b6532c9c285ea6d89652505fb7c553f85a98864
Reviewed-on: https://go-review.googlesource.com/120335
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ssa/gen/ARM.rules
src/cmd/compile/internal/ssa/rewriteARM.go
test/fixedbugs/issue25993.go [new file with mode: 0644]