mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-10 02:36:06 +00:00
[Hexagon] Removing old duplicate atomic load/store patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226309 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e639d4f967
commit
9da6e03161
@ -4089,71 +4089,6 @@ def : Pat<(HexagonTCRet texternalsym:$dst),
|
||||
def : Pat<(HexagonTCRet (i32 IntRegs:$dst)),
|
||||
(TCRETURNR (i32 IntRegs:$dst))>;
|
||||
|
||||
// Atomic load and store support
|
||||
// 8 bit atomic load
|
||||
def : Pat<(atomic_load_8 ADDRriS11_0:$src1),
|
||||
(i32 (L2_loadrub_io AddrFI:$src1, 0))>;
|
||||
|
||||
def : Pat<(atomic_load_8 (add (i32 IntRegs:$src1), s11_0ImmPred:$offset)),
|
||||
(i32 (L2_loadrub_io (i32 IntRegs:$src1), s11_0ImmPred:$offset))>;
|
||||
|
||||
// 16 bit atomic load
|
||||
def : Pat<(atomic_load_16 ADDRriS11_1:$src1),
|
||||
(i32 (L2_loadruh_io AddrFI:$src1, 0))>;
|
||||
|
||||
def : Pat<(atomic_load_16 (add (i32 IntRegs:$src1), s11_1ImmPred:$offset)),
|
||||
(i32 (L2_loadruh_io (i32 IntRegs:$src1), s11_1ImmPred:$offset))>;
|
||||
|
||||
def : Pat<(atomic_load_32 ADDRriS11_2:$src1),
|
||||
(i32 (L2_loadri_io AddrFI:$src1, 0))>;
|
||||
|
||||
def : Pat<(atomic_load_32 (add (i32 IntRegs:$src1), s11_2ImmPred:$offset)),
|
||||
(i32 (L2_loadri_io (i32 IntRegs:$src1), s11_2ImmPred:$offset))>;
|
||||
|
||||
// 64 bit atomic load
|
||||
def : Pat<(atomic_load_64 ADDRriS11_3:$src1),
|
||||
(i64 (L2_loadrd_io AddrFI:$src1, 0))>;
|
||||
|
||||
def : Pat<(atomic_load_64 (add (i32 IntRegs:$src1), s11_3ImmPred:$offset)),
|
||||
(i64 (L2_loadrd_io (i32 IntRegs:$src1), s11_3ImmPred:$offset))>;
|
||||
|
||||
|
||||
def : Pat<(atomic_store_8 ADDRriS11_0:$src2, (i32 IntRegs:$src1)),
|
||||
(S2_storerb_io AddrFI:$src2, 0, (i32 IntRegs:$src1))>;
|
||||
|
||||
def : Pat<(atomic_store_8 (add (i32 IntRegs:$src2), s11_0ImmPred:$offset),
|
||||
(i32 IntRegs:$src1)),
|
||||
(S2_storerb_io (i32 IntRegs:$src2), s11_0ImmPred:$offset,
|
||||
(i32 IntRegs:$src1))>;
|
||||
|
||||
|
||||
def : Pat<(atomic_store_16 ADDRriS11_1:$src2, (i32 IntRegs:$src1)),
|
||||
(S2_storerh_io AddrFI:$src2, 0, (i32 IntRegs:$src1))>;
|
||||
|
||||
def : Pat<(atomic_store_16 (i32 IntRegs:$src1),
|
||||
(add (i32 IntRegs:$src2), s11_1ImmPred:$offset)),
|
||||
(S2_storerh_io (i32 IntRegs:$src2), s11_1ImmPred:$offset,
|
||||
(i32 IntRegs:$src1))>;
|
||||
|
||||
def : Pat<(atomic_store_32 ADDRriS11_2:$src2, (i32 IntRegs:$src1)),
|
||||
(S2_storeri_io AddrFI:$src2, 0, (i32 IntRegs:$src1))>;
|
||||
|
||||
def : Pat<(atomic_store_32 (add (i32 IntRegs:$src2), s11_2ImmPred:$offset),
|
||||
(i32 IntRegs:$src1)),
|
||||
(S2_storeri_io (i32 IntRegs:$src2), s11_2ImmPred:$offset,
|
||||
(i32 IntRegs:$src1))>;
|
||||
|
||||
|
||||
|
||||
|
||||
def : Pat<(atomic_store_64 ADDRriS11_3:$src2, (i64 DoubleRegs:$src1)),
|
||||
(S2_storerd_io AddrFI:$src2, 0, (i64 DoubleRegs:$src1))>;
|
||||
|
||||
def : Pat<(atomic_store_64 (add (i32 IntRegs:$src2), s11_3ImmPred:$offset),
|
||||
(i64 DoubleRegs:$src1)),
|
||||
(S2_storerd_io (i32 IntRegs:$src2), s11_3ImmPred:$offset,
|
||||
(i64 DoubleRegs:$src1))>;
|
||||
|
||||
// Map from r0 = and(r1, 65535) to r0 = zxth(r1)
|
||||
def : Pat <(and (i32 IntRegs:$src1), 65535),
|
||||
(A2_zxth (i32 IntRegs:$src1))>;
|
||||
|
Loading…
x
Reference in New Issue
Block a user