]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix half multiply issue
authorTodd Neal <todd@tneal.org>
Tue, 23 Jun 2015 23:59:52 +0000 (18:59 -0500)
committerRuss Cox <rsc@golang.org>
Fri, 26 Jun 2015 15:55:22 +0000 (15:55 +0000)
commit765c0f37ed4d716eebd2965acd0b79f5b614e617
tree6002d610bdd14251c97779d4e2d98cc6e9d49513
parentcd0a8ed48a4a71fb4fdb3d3b22f91d2335e4793a
cmd/compile: fix half multiply issue

In walkdiv, an OMUL node was created and passed to typecheck,
before the op was changed back to OHMUL.  In some instances,
the node that came back was an evaluated literal constant that
occurred with a full multiply.  The end result was a literal node
with a non-shifted value and an OHMUL op. This change causes code
to be generated for the OHMUL.

Fixes #11358
Fixes #11369

Change-Id: If42a98c6830d07fe065d5ca57717704fb8cfbd33
Reviewed-on: https://go-review.googlesource.com/11400
Reviewed-by: Russ Cox <rsc@golang.org>
src/cmd/compile/internal/gc/align.go
src/cmd/compile/internal/gc/typecheck.go
src/cmd/compile/internal/gc/walk.go
test/fixedbugs/issue11369.go [new file with mode: 0644]