]> Cypherpunks repositories - gostls13.git/commit
[dev.ssa] cmd/compile: ensure OffPtr has pointer type
authorCherry Zhang <cherryyz@google.com>
Wed, 8 Jun 2016 14:12:30 +0000 (10:12 -0400)
committerCherry Zhang <cherryyz@google.com>
Mon, 13 Jun 2016 12:55:30 +0000 (12:55 +0000)
commite3a6d00876488c70b6ecc641954ed5cecb918cac
tree8618ec242177fbaf0506a70042be8ab5cd796b11
parentfa54bf16e0080296487407c8cc883a1e039c31c8
[dev.ssa] cmd/compile: ensure OffPtr has pointer type

SSA treats SP as constant throughout a function, so as OffPtr [off] SP.
When the stack moves, spilled OffPtr values become invalid, if they are
not pointer-typed.

(Currently it is fine because of the optimization rules that folds OffPtr
into Load/Store. But it'd better be "optimization", not requirement.)

Updates #15365.

Change-Id: I76cf4008dfdc169e1cb5a55a2605b6678efc915d
Reviewed-on: https://go-review.googlesource.com/23941
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/gc/ssa.go