aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/tighten.go
diff options
context:
space:
mode:
authorDavid Chase <drchase@google.com>2021-02-17 10:38:03 -0500
committerDavid Chase <drchase@google.com>2021-03-03 15:00:48 +0000
commit9f33dc3ca1b7b6bdb1a8e83c24d490f579bbbdc8 (patch)
tree2b3ff2bdfd9e48e78cdd1570c86c2957a093b5b1 /src/cmd/compile/internal/ssa/tighten.go
parentc4e3f6c4c78f52060d409a549b83b72644069137 (diff)
downloadgo-9f33dc3ca1b7b6bdb1a8e83c24d490f579bbbdc8.tar.gz
go-9f33dc3ca1b7b6bdb1a8e83c24d490f579bbbdc8.zip
cmd/compile: handle aggregate OpArg in registers
Also handles case where OpArg does not escape but has its address taken. May have exposed a lurking bug in 1.16 expandCalls, if e.g., loading len(someArrayOfstructThing[0].secondStringField) from a local. Maybe. For #40724. Change-Id: I0298c4ad5d652b5e3d7ed6a62095d59e2d8819c7 Reviewed-on: https://go-review.googlesource.com/c/go/+/293396 Trust: David Chase <drchase@google.com> Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/cmd/compile/internal/ssa/tighten.go')
-rw-r--r--src/cmd/compile/internal/ssa/tighten.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/ssa/tighten.go b/src/cmd/compile/internal/ssa/tighten.go
index bd08334a5f..214bf628bd 100644
--- a/src/cmd/compile/internal/ssa/tighten.go
+++ b/src/cmd/compile/internal/ssa/tighten.go
@@ -18,7 +18,7 @@ func tighten(f *Func) {
continue
}
switch v.Op {
- case OpPhi, OpArg, OpSelect0, OpSelect1, OpSelectN:
+ case OpPhi, OpArg, OpArgIntReg, OpArgFloatReg, OpSelect0, OpSelect1, OpSelectN:
// Phis need to stay in their block.
// Arg must stay in the entry block.
// Tuple selectors must stay with the tuple generator.