[llvm] [TableGen][RISCV][AArch64] Properly implement isAnyExtLoad/isSignExtLoad/isZeroExtLoad for IsAtomic in SelectionDAG. (PR #137096)
Sergei Barannikov via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 23 22:30:36 PDT 2025
================
@@ -1903,16 +1916,55 @@ def atomic_load_sext_16 :
let MemoryVT = i16;
}
+def atomic_load_sext_32 :
+ PatFrag<(ops node:$ptr), (atomic_load_sext node:$ptr)> {
+ let IsAtomic = true; // FIXME: Should be IsLoad and/or IsAtomic?
+ let MemoryVT = i32;
+}
+
+def atomic_load_aext_8 :
+ PatFrag<(ops node:$ptr), (atomic_load_aext node:$ptr)> {
+ let IsAtomic = true; // FIXME: Should be IsLoad and/or IsAtomic?
+ let MemoryVT = i8;
+}
+
+def atomic_load_aext_16 :
+ PatFrag<(ops node:$ptr), (atomic_load_aext node:$ptr)> {
+ let IsAtomic = true; // FIXME: Should be IsLoad and/or IsAtomic?
+ let MemoryVT = i16;
+}
+
+def atomic_load_aext_32 :
+ PatFrag<(ops node:$ptr), (atomic_load_aext node:$ptr)> {
+ let IsAtomic = true; // FIXME: Should be IsLoad and/or IsAtomic?
+ let MemoryVT = i32;
+}
+
// Atomic load which zeroes or anyextends the high bits.
def atomic_load_az_8 : PatFrags<(ops node:$op),
- [(atomic_load_8 node:$op),
+ [(atomic_load_aext_8 node:$op),
(atomic_load_zext_8 node:$op)]>;
// Atomic load which zeroes or anyextends the high bits.
def atomic_load_az_16 : PatFrags<(ops node:$op),
- [(atomic_load_16 node:$op),
+ [(atomic_load_aext_16 node:$op),
(atomic_load_zext_16 node:$op)]>;
+// Atomic load which sign extends or anyextends the high bits.
+def atomic_load_asext_8 : PatFrags<(ops node:$op),
----------------
s-barannikov wrote:
Can the naming be consistent with the above (or preferably the above naming consistent with the proposed here)?
https://github.com/llvm/llvm-project/pull/137096
More information about the llvm-commits
mailing list