aboutsummaryrefslogtreecommitdiff
path: root/test/torture.go
diff options
context:
space:
mode:
authorRémy Oudompheng <oudomphe@phare.normalesup.org>2012-12-21 23:46:16 +0100
committerRémy Oudompheng <oudomphe@phare.normalesup.org>2012-12-21 23:46:16 +0100
commit4d3cbfdefac06f692c72520a59bede8a1c3f6cc7 (patch)
tree744d71b199487af138542813e9cf7f02bb1725f5 /test/torture.go
parent3dcc63f750c425fcb9ce2ec66812489881dafeee (diff)
downloadgo-4d3cbfdefac06f692c72520a59bede8a1c3f6cc7.tar.gz
go-4d3cbfdefac06f692c72520a59bede8a1c3f6cc7.zip
cmd/8g: introduce temporaries in byte multiplication.
Also restore the smallintconst case for binary ops. Fixes #3835. R=daniel.morsing, rsc CC=golang-dev https://golang.org/cl/6999043
Diffstat (limited to 'test/torture.go')
-rw-r--r--test/torture.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/torture.go b/test/torture.go
index d14d78fd14..bbf6d347d9 100644
--- a/test/torture.go
+++ b/test/torture.go
@@ -333,3 +333,7 @@ func ChainDivConst(a int) int {
17 / 17 / 17 / 17 /
17 / 17 / 17 / 17
}
+
+func ChainMulBytes(a, b, c byte) byte {
+ return a*(a*(a*(a*(a*(a*(a*(a*(a*b+c)+c)+c)+c)+c)+c)+c)+c) + c
+}