aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/config.go
diff options
context:
space:
mode:
authorLynn Boger <laboger@linux.vnet.ibm.com>2018-05-09 17:35:10 -0400
committerBrad Fitzpatrick <bradfitz@golang.org>2018-05-10 14:50:30 +0000
commite4172e5f5e9b194ec300ddc2bd6678a8e1d34454 (patch)
tree901d09093e2d5c24c9d63a81f73ae0110d471772 /src/cmd/compile/internal/ssa/config.go
parentf95ef94ad5f58aef9a17bae407bf7b154caabe11 (diff)
downloadgo-e4172e5f5e9b194ec300ddc2bd6678a8e1d34454.tar.gz
go-e4172e5f5e9b194ec300ddc2bd6678a8e1d34454.zip
cmd/compile/internal/ssa: initialize t.UInt in SetTypPtrs()
Initialization of t.UInt is missing from SetTypPtrs in config.go, preventing rules that use it from matching when they should. This adds the initialization to allow those rules to work. Updated test/codegen/rotate.go to test for this case, which appears in math/bits RotateLeft32 and RotateLeft64. There had been a testcase for this in go 1.10 but that went away when asm_test.go was removed. Change-Id: I82fc825ad8364df6fc36a69a1e448214d2e24ed5 Reviewed-on: https://go-review.googlesource.com/112518 Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/ssa/config.go')
-rw-r--r--src/cmd/compile/internal/ssa/config.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/ssa/config.go b/src/cmd/compile/internal/ssa/config.go
index 3bf6229467..cb4eb182af 100644
--- a/src/cmd/compile/internal/ssa/config.go
+++ b/src/cmd/compile/internal/ssa/config.go
@@ -93,9 +93,10 @@ func (t *Types) SetTypPtrs() {
t.UInt16 = types.Types[types.TUINT16]
t.UInt32 = types.Types[types.TUINT32]
t.UInt64 = types.Types[types.TUINT64]
+ t.Int = types.Types[types.TINT]
t.Float32 = types.Types[types.TFLOAT32]
t.Float64 = types.Types[types.TFLOAT64]
- t.Int = types.Types[types.TINT]
+ t.UInt = types.Types[types.TUINT]
t.Uintptr = types.Types[types.TUINTPTR]
t.String = types.Types[types.TSTRING]
t.BytePtr = types.NewPtr(types.Types[types.TUINT8])