]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.simd] cmd/compile: fix the "always panic" code to actually panic
authorDavid Chase <drchase@google.com>
Wed, 2 Jul 2025 18:28:10 +0000 (14:28 -0400)
committerDavid Chase <drchase@google.com>
Sat, 5 Jul 2025 01:23:14 +0000 (18:23 -0700)
without this change, the intrinsics of non-constant immediates
just substitute a zero, which is wrong.

Change-Id: I2c39ebedcfb0d0d6c072f4434f393027c6f3f033
Reviewed-on: https://go-review.googlesource.com/c/go/+/685575
Reviewed-by: Junyang Shao <shaojunyang@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

src/cmd/compile/internal/ssagen/intrinsics.go

index 73e84077fd2b9debb9d546e6977091a28cc1ccb5..c47b0898150b97eb4ac1ba9090ab6f5e59af2e4d 100644 (file)
@@ -1636,7 +1636,7 @@ func opLen4(op ssa.Op, t *types.Type) func(s *state, n *ir.CallExpr, args []*ssa
 
 func plainPanicSimdImm(s *state) {
        cmp := s.newValue0(ssa.OpConstBool, types.Types[types.TBOOL])
-       cmp.AuxInt = 1
+       cmp.AuxInt = 0
        // TODO: make this a standalone panic instead of reusing the overflow panic.
        // Or maybe after we implement the switch table this will be obsolete anyway.
        s.check(cmp, ir.Syms.Panicoverflow)