1 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
2 ; RUN: -mcpu=pwr8 < %s | FileCheck %s
3 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
4 ; RUN: -mcpu=pwr7 < %s | FileCheck %s
5 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-aix \
6 ; RUN: -mcpu=pwr7 < %s | FileCheck %s
8 @ull = external global i64, align 8
9 @ull_addr = external global ptr, align 8
11 define dso_local void @test_builtin_ppc_store8r() {
12 ; CHECK-LABEL: test_builtin_ppc_store8r:
13 ; CHECK: stdbrx 3, 0, 4
17 %0 = load i64, ptr @ull, align 8
18 %1 = load ptr, ptr @ull_addr, align 8
19 call void @llvm.ppc.store8r(i64 %0, ptr %1)
23 declare void @llvm.ppc.store8r(i64, ptr)
25 define dso_local i64 @test_builtin_ppc_load8r() {
26 ; CHECK-LABEL: test_builtin_ppc_load8r:
27 ; CHECK: ldbrx 3, 0, 3
30 %0 = load ptr, ptr @ull_addr, align 8
31 %1 = call i64 @llvm.ppc.load8r(ptr %0)
35 declare i64 @llvm.ppc.load8r(ptr)