Skip to content

Commit 3e57c5d

Browse files
committed
go/ir: fix miscompilation of <<= and >>= statements
1 parent d965e98 commit 3e57c5d

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

go/ir/UPSTREAM

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ The changes are too many to list here, and it is best to consider this package i
55
Upstream changes still get applied when they address bugs in portions of code we have inherited.
66

77
The last upstream commit we've looked at was:
8-
b900e8804030b22a099f187ef7bdc65bed470c7f
8+
e854e0228e2ef1cc6e42bbfde1951925096a1272
99

go/ir/builder.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,8 +1027,7 @@ func (b *builder) setCall(fn *Function, e *ast.CallExpr, c *CallCommon) {
10271027

10281028
// assignOp emits to fn code to perform loc <op>= val.
10291029
func (b *builder) assignOp(fn *Function, loc lvalue, val Value, op token.Token, source ast.Node) {
1030-
oldv := loc.load(fn, source)
1031-
loc.store(fn, emitArith(fn, op, oldv, emitConv(fn, val, oldv.Type(), source), loc.typ(), source), source)
1030+
loc.store(fn, emitArith(fn, op, loc.load(fn, source), val, loc.typ(), source), source)
10321031
}
10331032

10341033
// localValueSpec emits to fn code to define all of the vars in the

0 commit comments

Comments
 (0)