3 // Copyright 2015 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.
7 // Issue 11987. The ppc64 SRADCC instruction was misassembled in a way
8 // lost bit 5 of the immediate so v>>32 was assembled as v>>0. SRADCC
9 // is only ever inserted by peep so it's hard to be sure when it will
10 // be used. This formulation worked when the bug was fixed.
16 var v int64 = 0x80000000
19 s := fmt.Sprintf("%v", v>>32 == 0)
21 fmt.Printf("BUG: v>>32 == 0 evaluated as %q\n", s)