]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: panic if trying to alias an intrinsic with no definitions
authorMichael Anthony Knyszek <mknyszek@google.com>
Fri, 20 Mar 2020 19:08:13 +0000 (19:08 +0000)
committerMichael Knyszek <mknyszek@google.com>
Mon, 23 Mar 2020 16:01:20 +0000 (16:01 +0000)
commit8c30971da654a37a5f5f211e6dccf8d83e7ee463
tree0e1ab9d0e585314d5b9d6cb17a7ba35a88a6ec47
parent830ee4792e52cc8c7c0a4d54259f55fa3629271a
cmd/compile: panic if trying to alias an intrinsic with no definitions

Currently if we try to alias an intrinsic which hasn't been defined for
any architecture (such as by accidentally creating the alias before the
intrinsic is created with addF), then we'll just silently not apply any
intrinsics to those aliases.

Catch this particular case by panicking in alias if we try to apply the
alias and it did nothing.

Change-Id: I98e75fc3f7206b08fc9267cedb8db3e109ec4f5d
Reviewed-on: https://go-review.googlesource.com/c/go/+/224637
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/compile/internal/gc/ssa.go