1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -passes=atomic-expand -S -mtriple=powerpc64le-unknown-unknown \
3 ; RUN: %s | FileCheck %s
4 ; RUN: opt -passes=atomic-expand -S -mtriple=powerpc64-unknown-unknown \
5 ; RUN: %s | FileCheck %s
7 define ptr @foo(ptr %p) {
10 ; CHECK-NEXT: [[TMP0:%.*]] = load atomic ptr, ptr [[P:%.*]] monotonic, align 8
11 ; CHECK-NEXT: call void @llvm.ppc.cfence.p0(ptr [[TMP0]])
12 ; CHECK-NEXT: ret ptr [[TMP0]]
15 %0 = load atomic ptr, ptr %p acquire, align 8
19 define void @foobar(ptr addrspace(11) %p) {
20 ; CHECK-LABEL: @foobar(
22 ; CHECK-NEXT: [[TMP0:%.*]] = load atomic ptr addrspace(10), ptr addrspace(11) [[P:%.*]] monotonic, align 8
23 ; CHECK-NEXT: call void @llvm.ppc.cfence.p10(ptr addrspace(10) [[TMP0]])
24 ; CHECK-NEXT: unreachable
27 %0 = load atomic ptr addrspace(10), ptr addrspace(11) %p acquire, align 8