1; RUN: llc < %s -mtriple=powerpc64-apple-darwin 2>&1 | FileCheck %s --check-prefix=CHECK-DARWIN
2; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu 2>&1 | FileCheck %s
3
4define i64 @get_reg() nounwind {
5entry:
6  %reg = call i64 @llvm.read_register.i64(metadata !0)
7  ret i64 %reg
8
9; CHECK-LABEL: @get_reg
10; CHECK: mr 3, 1
11
12; CHECK-DARWIN-LABEL: @get_reg
13; CHECK-DARWIN: mr r3, r1
14}
15
16declare i64 @llvm.read_register.i64(metadata) nounwind
17
18!0 = !{!"r1\00"}
19