Source file test/codegen/issue42610.go
1 // asmcheck 2 3 // Copyright 2020 The Go Authors. All rights reserved. 4 // Use of this source code is governed by a BSD-style 5 // license that can be found in the LICENSE file. 6 7 // Don't allow 0 masks in shift lowering rules on ppc64x. 8 // See issue 42610. 9 10 package codegen 11 12 func f32(a []int32, i uint32) { 13 g := func(p int32) int32 { 14 i = uint32(p) * (uint32(p) & (i & 1)) 15 return 1 16 } 17 // ppc64le: -"RLWNIM" 18 // ppc64: -"RLWNIM" 19 a[0] = g(8) >> 1 20 } 21 22 func f(a []int, i uint) { 23 g := func(p int) int { 24 i = uint(p) * (uint(p) & (i & 1)) 25 return 1 26 } 27 // ppc64le: -"RLDIC" 28 // ppc64: -"RLDIC" 29 a[0] = g(8) >> 1 30 } 31