Files
clang-p2996/llvm/test/Transforms/AtomicExpand/PowerPC/cfence-float.ll
Rishabh Bali fe42e72db2 [CodeGen] Port AtomicExpand to new Pass Manager (#71220)
Port the `atomicexpand` pass to the new Pass Manager. 
Fixes #64559
2024-02-25 18:42:22 +05:30

19 lines
683 B
LLVM

; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -S -passes=atomic-expand -mtriple=powerpc64le-unknown-unknown \
; RUN: < %s 2>&1 | FileCheck %s
; RUN: opt -S -passes=atomic-expand -mtriple=powerpc64-unknown-unknown \
; RUN: < %s 2>&1 | FileCheck %s
define float @bar(ptr %fp) {
; CHECK-LABEL: @bar(
; CHECK-NEXT: entry:
; CHECK-NEXT: [[TMP0:%.*]] = load atomic i32, ptr [[FP:%.*]] monotonic, align 4
; CHECK-NEXT: call void @llvm.ppc.cfence.i32(i32 [[TMP0]])
; CHECK-NEXT: [[TMP1:%.*]] = bitcast i32 [[TMP0]] to float
; CHECK-NEXT: ret float [[TMP1]]
;
entry:
%0 = load atomic float, ptr %fp acquire, align 4
ret float %0
}