test/fixedbugs/issue16741.go
raw| 1 | // compile |
| 2 | |
| 3 | // Copyright 2016 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 | // Make sure CSE of multi-output opcodes works correctly |
| 8 | // with select0/1 operations. |
| 9 | |
| 10 | package main |
| 11 | |
| 12 | func div(d, r int64) int64 { |
| 13 | if m := d % r; m > 0 { |
| 14 | return d/r + 1 |
| 15 | } |
| 16 | return d / r |
| 17 | } |