[llvm] e06faed - [PowerPC] Add tests to reflect cfence on float point types. NFC.

Kai Luo via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 10 21:30:40 PDT 2022


Author: Kai Luo
Date: 2022-06-11T12:30:15+08:00
New Revision: e06faedf1d3a5a719c963e16ededb340e8b788b7

URL: https://github.com/llvm/llvm-project/commit/e06faedf1d3a5a719c963e16ededb340e8b788b7
DIFF: https://github.com/llvm/llvm-project/commit/e06faedf1d3a5a719c963e16ededb340e8b788b7.diff

LOG: [PowerPC] Add tests to reflect cfence on float point types. NFC.

Added: 
    llvm/test/CodeGen/PowerPC/cfence-double.ll
    llvm/test/CodeGen/PowerPC/cfence-float.ll

Modified: 
    

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/PowerPC/cfence-double.ll b/llvm/test/CodeGen/PowerPC/cfence-double.ll
new file mode 100644
index 0000000000000..72c1a3357bc35
--- /dev/null
+++ b/llvm/test/CodeGen/PowerPC/cfence-double.ll
@@ -0,0 +1,12 @@
+; RUN: not --crash llc -opaque-pointers -mtriple=powerpc64le-unknown-unknown \
+; RUN:   < %s 2>&1 | FileCheck %s
+; RUN: not --crash llc -opaque-pointers -mtriple=powerpc64-unknown-unknown \
+; RUN:   < %s 2>&1 | FileCheck %s
+
+; CHECK: Intrinsic has incorrect argument type!
+; CHECK: ptr @llvm.ppc.cfence.f64
+define void @foo() {
+entry:
+  %0 = load atomic double, double* undef acquire, align 8
+  ret void
+}

diff  --git a/llvm/test/CodeGen/PowerPC/cfence-float.ll b/llvm/test/CodeGen/PowerPC/cfence-float.ll
new file mode 100644
index 0000000000000..71d28640c6423
--- /dev/null
+++ b/llvm/test/CodeGen/PowerPC/cfence-float.ll
@@ -0,0 +1,12 @@
+; RUN: not --crash llc -opaque-pointers -mtriple=powerpc64le-unknown-unknown \
+; RUN:   < %s 2>&1 | FileCheck %s
+; RUN: not --crash llc -opaque-pointers -mtriple=powerpc64-unknown-unknown \
+; RUN:   < %s 2>&1 | FileCheck %s
+
+; CHECK: Intrinsic has incorrect argument type!
+; CHECK: ptr @llvm.ppc.cfence.f32
+define void @bar() {
+entry:
+  %0 = load atomic float, float* undef acquire, align 8
+  ret void
+}


        


More information about the llvm-commits mailing list