[llvm-branch-commits] [clang] e335391 - Finish loads
Albion Fung via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Jun 21 19:06:55 PDT 2021
Author: Albion Fung
Date: 2021-06-09T14:32:58-05:00
New Revision: e3353919498bd2235fb9a150f614ed43ea1ae9d1
URL: https://github.com/llvm/llvm-project/commit/e3353919498bd2235fb9a150f614ed43ea1ae9d1
DIFF: https://github.com/llvm/llvm-project/commit/e3353919498bd2235fb9a150f614ed43ea1ae9d1.diff
LOG: Finish loads
Added:
Modified:
clang/include/clang/Basic/BuiltinsPPC.def
llvm/include/llvm/IR/IntrinsicsPowerPC.td
llvm/lib/Target/PowerPC/PPCInstrPrefix.td
Removed:
################################################################################
diff --git a/clang/include/clang/Basic/BuiltinsPPC.def b/clang/include/clang/Basic/BuiltinsPPC.def
index a8ed189007dc1..dbe816ac46783 100644
--- a/clang/include/clang/Basic/BuiltinsPPC.def
+++ b/clang/include/clang/Basic/BuiltinsPPC.def
@@ -45,7 +45,7 @@ BUILTIN(__builtin_ppc_dcbt, "vv*", "")
BUILTIN(__builtin_ppc_dcbtst, "vv*", "")
BUILTIN(__builtin_ppc_dcbz, "vv*", "")
BUILTIN(__builtin_ppc_icbt, "vv*", "")
-BUILTIN(__builtin_ppc_ldarx, "LiLiD*iC", "")
+BUILTIN(__builtin_ppc_ldarx, "LiLiD*", "")
BUILTIN(__builtin_ppc_lwarx, "iiD*", "")
BUILTIN(__builtin_ppc_lharx, "isD*", "")
BUILTIN(__builtin_ppc_lbarx, "icD*", "")
diff --git a/llvm/include/llvm/IR/IntrinsicsPowerPC.td b/llvm/include/llvm/IR/IntrinsicsPowerPC.td
index ca1055c0d0cba..fbb3750b6af77 100644
--- a/llvm/include/llvm/IR/IntrinsicsPowerPC.td
+++ b/llvm/include/llvm/IR/IntrinsicsPowerPC.td
@@ -1523,5 +1523,13 @@ let TargetPrefix = "ppc" in {
Intrinsic<[],[],[]>;
def int_ppc_iospace_eieio : GCCBuiltin<"__builtin_ppc_iospace_eieio">,
Intrinsic<[],[],[]>;
+ def int_ppc_ldarx : GCCBuiltin<"__builtin_ppc_ldarx">,
+ Intrinsic<[llvm_i64_ty], [llvm_ptr_ty], [IntrNoMem]>;
+ def int_ppc_lwarx : GCCBuiltin<"__builtin_ppc_lwarx">,
+ Intrinsic<[llvm_i32_ty], [llvm_ptr_ty], [IntrNoMem]>;
+ def int_ppc_lharx : GCCBuiltin<"__builtin_ppc_lharx">,
+ Intrinsic<[llvm_i32_ty], [llvm_ptr_ty], [IntrNoMem]>;
+ def int_ppc_lbarx : GCCBuiltin<"__builtin_ppc_lbarx">,
+ Intrinsic<[llvm_i32_ty], [llvm_ptr_ty], [IntrNoMem]>;
}
diff --git a/llvm/lib/Target/PowerPC/PPCInstrPrefix.td b/llvm/lib/Target/PowerPC/PPCInstrPrefix.td
index 07c07baa0523d..a2d024a4f93fc 100644
--- a/llvm/lib/Target/PowerPC/PPCInstrPrefix.td
+++ b/llvm/lib/Target/PowerPC/PPCInstrPrefix.td
@@ -2837,6 +2837,10 @@ let Predicates = [IsISA3_1, HasVSX, IsBigEndian, IsPPC64] in {
(VINSD $vDi, !mul(i, 8), $rA)>;
}
+let Predicates = [HasP8Altivec] in {
+def : Pat<(int_ppc_ldarx xoaddr:$dst),
+ (LDARX xoaddr:$dst)>;
+}
def : Pat<(int_ppc_lwarx xoaddr:$dst),
(LWARX xoaddr:$dst)>;
def : Pat<(int_ppc_lharx xoaddr:$dst),
More information about the llvm-branch-commits
mailing list