In the context of atomic load, integer, pointer and float point types are allowed, thus we should allow llvm.ppc.cfence to accept any type mentioned. Fixes https://github.com/llvm/llvm-project/issues/55983. Reviewed By: shchenz, vchuravy Differential Revision: https://reviews.llvm.org/D127554
19 lines
711 B
LLVM
19 lines
711 B
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
|
; RUN: opt -S -atomic-expand -mtriple=powerpc64le-unknown-unknown \
|
|
; RUN: -opaque-pointers < %s 2>&1 | FileCheck %s
|
|
; RUN: opt -S -atomic-expand -mtriple=powerpc64-unknown-unknown \
|
|
; RUN: -opaque-pointers < %s 2>&1 | FileCheck %s
|
|
|
|
define float @bar(float* %fp) {
|
|
; CHECK-LABEL: @bar(
|
|
; CHECK-NEXT: entry:
|
|
; CHECK-NEXT: [[TMP0:%.*]] = load atomic i32, ptr [[FP:%.*]] monotonic, align 4
|
|
; CHECK-NEXT: [[TMP1:%.*]] = bitcast i32 [[TMP0]] to float
|
|
; CHECK-NEXT: call void @llvm.ppc.cfence.f32(float [[TMP1]])
|
|
; CHECK-NEXT: ret float [[TMP1]]
|
|
;
|
|
entry:
|
|
%0 = load atomic float, float* %fp acquire, align 4
|
|
ret float %0
|
|
}
|