@@ -1094,18 +1094,6 @@ def int_amdgcn_make_buffer_rsrc : DefaultAttrsIntrinsic <
1094
1094
1095
1095
defset list<AMDGPURsrcIntrinsic> AMDGPUBufferIntrinsics = {
1096
1096
1097
- class AMDGPUBufferLoad<LLVMType data_ty = llvm_any_ty> : DefaultAttrsIntrinsic <
1098
- [data_ty],
1099
- [llvm_v4i32_ty, // rsrc(SGPR)
1100
- llvm_i32_ty, // vindex(VGPR)
1101
- llvm_i32_ty, // offset(SGPR/VGPR/imm)
1102
- llvm_i1_ty, // glc(imm)
1103
- llvm_i1_ty], // slc(imm)
1104
- [IntrReadMem, ImmArg<ArgIndex<3>>, ImmArg<ArgIndex<4>>], "", [SDNPMemOperand]>,
1105
- AMDGPURsrcIntrinsic<0>;
1106
- def int_amdgcn_buffer_load_format : AMDGPUBufferLoad<llvm_anyfloat_ty>;
1107
- def int_amdgcn_buffer_load : AMDGPUBufferLoad;
1108
-
1109
1097
// Generate a buffer_load instruction that may be optimized to s_buffer_load if
1110
1098
// the offset argument is uniform.
1111
1099
def int_amdgcn_s_buffer_load : DefaultAttrsIntrinsic <
@@ -1122,25 +1110,12 @@ def int_amdgcn_s_buffer_load : DefaultAttrsIntrinsic <
1122
1110
[IntrNoMem, ImmArg<ArgIndex<2>>]>,
1123
1111
AMDGPURsrcIntrinsic<0>;
1124
1112
1125
- class AMDGPUBufferStore<LLVMType data_ty = llvm_any_ty> : DefaultAttrsIntrinsic <
1126
- [],
1127
- [data_ty, // vdata(VGPR)
1128
- llvm_v4i32_ty, // rsrc(SGPR)
1129
- llvm_i32_ty, // vindex(VGPR)
1130
- llvm_i32_ty, // offset(SGPR/VGPR/imm)
1131
- llvm_i1_ty, // glc(imm)
1132
- llvm_i1_ty], // slc(imm)
1133
- [IntrWriteMem, ImmArg<ArgIndex<4>>, ImmArg<ArgIndex<5>>], "", [SDNPMemOperand]>,
1134
- AMDGPURsrcIntrinsic<1>;
1135
- def int_amdgcn_buffer_store_format : AMDGPUBufferStore<llvm_anyfloat_ty>;
1136
- def int_amdgcn_buffer_store : AMDGPUBufferStore;
1137
-
1138
- // New buffer intrinsics with separate raw and struct variants. The raw
1113
+ // Buffer intrinsics with separate raw and struct variants. The raw
1139
1114
// variant never has an index. The struct variant always has an index, even if
1140
1115
// it is const 0. A struct intrinsic with constant 0 index is different to the
1141
1116
// corresponding raw intrinsic on gfx9+ because the behavior of bound checking
1142
1117
// and swizzling changes depending on whether idxen is set in the instruction.
1143
- // These new instrinsics also keep the offset and soffset arguments separate as
1118
+ // These instrinsics also keep the offset and soffset arguments separate as
1144
1119
// they behave differently in bounds checking and swizzling.
1145
1120
1146
1121
// The versions of these intrinsics that take <4 x i32> arguments are deprecated
@@ -1521,41 +1496,7 @@ def int_amdgcn_struct_buffer_atomic_fmax : AMDGPUStructBufferAtomic<llvm_anyfloa
1521
1496
def int_amdgcn_struct_ptr_buffer_atomic_fmin : AMDGPUStructPtrBufferAtomic<llvm_anyfloat_ty>;
1522
1497
def int_amdgcn_struct_ptr_buffer_atomic_fmax : AMDGPUStructPtrBufferAtomic<llvm_anyfloat_ty>;
1523
1498
1524
- // Obsolescent tbuffer intrinsics.
1525
- def int_amdgcn_tbuffer_load : DefaultAttrsIntrinsic <
1526
- [llvm_any_ty], // overloaded for types f32/i32, v2f32/v2i32, v4f32/v4i32
1527
- [llvm_v4i32_ty, // rsrc(SGPR)
1528
- llvm_i32_ty, // vindex(VGPR)
1529
- llvm_i32_ty, // voffset(VGPR)
1530
- llvm_i32_ty, // soffset(SGPR)
1531
- llvm_i32_ty, // offset(imm)
1532
- llvm_i32_ty, // dfmt(imm)
1533
- llvm_i32_ty, // nfmt(imm)
1534
- llvm_i1_ty, // glc(imm)
1535
- llvm_i1_ty], // slc(imm)
1536
- [IntrReadMem,
1537
- ImmArg<ArgIndex<4>>, ImmArg<ArgIndex<5>>, ImmArg<ArgIndex<6>>,
1538
- ImmArg<ArgIndex<7>>, ImmArg<ArgIndex<8>>], "", [SDNPMemOperand]>,
1539
- AMDGPURsrcIntrinsic<0>;
1540
-
1541
- def int_amdgcn_tbuffer_store : DefaultAttrsIntrinsic <
1542
- [],
1543
- [llvm_any_ty, // vdata(VGPR), overloaded for types f32/i32, v2f32/v2i32, v4f32/v4i32
1544
- llvm_v4i32_ty, // rsrc(SGPR)
1545
- llvm_i32_ty, // vindex(VGPR)
1546
- llvm_i32_ty, // voffset(VGPR)
1547
- llvm_i32_ty, // soffset(SGPR)
1548
- llvm_i32_ty, // offset(imm)
1549
- llvm_i32_ty, // dfmt(imm)
1550
- llvm_i32_ty, // nfmt(imm)
1551
- llvm_i1_ty, // glc(imm)
1552
- llvm_i1_ty], // slc(imm)
1553
- [IntrWriteMem, ImmArg<ArgIndex<5>>,
1554
- ImmArg<ArgIndex<6>>, ImmArg<ArgIndex<7>>,
1555
- ImmArg<ArgIndex<8>>, ImmArg<ArgIndex<9>>], "", [SDNPMemOperand]>,
1556
- AMDGPURsrcIntrinsic<1>;
1557
-
1558
- // New tbuffer intrinsics, with:
1499
+ // tbuffer intrinsics, with:
1559
1500
// - raw and struct variants
1560
1501
// - joint format field
1561
1502
// - joint cachepolicy field
@@ -1702,51 +1643,6 @@ def int_amdgcn_struct_tbuffer_store : DefaultAttrsIntrinsic <
1702
1643
ImmArg<ArgIndex<5>>, ImmArg<ArgIndex<6>>], "", [SDNPMemOperand]>,
1703
1644
AMDGPURsrcIntrinsic<1>;
1704
1645
1705
- class AMDGPUBufferAtomic : Intrinsic <
1706
- [llvm_anyint_ty],
1707
- [LLVMMatchType<0>, // vdata(VGPR)
1708
- llvm_v4i32_ty, // rsrc(SGPR)
1709
- llvm_i32_ty, // vindex(VGPR)
1710
- llvm_i32_ty, // offset(SGPR/VGPR/imm)
1711
- llvm_i1_ty], // slc(imm)
1712
- [ImmArg<ArgIndex<4>>, IntrWillReturn, IntrNoCallback, IntrNoFree], "", [SDNPMemOperand]>,
1713
- AMDGPURsrcIntrinsic<1, 0>;
1714
- def int_amdgcn_buffer_atomic_swap : AMDGPUBufferAtomic;
1715
- def int_amdgcn_buffer_atomic_add : AMDGPUBufferAtomic;
1716
- def int_amdgcn_buffer_atomic_sub : AMDGPUBufferAtomic;
1717
- def int_amdgcn_buffer_atomic_smin : AMDGPUBufferAtomic;
1718
- def int_amdgcn_buffer_atomic_umin : AMDGPUBufferAtomic;
1719
- def int_amdgcn_buffer_atomic_smax : AMDGPUBufferAtomic;
1720
- def int_amdgcn_buffer_atomic_umax : AMDGPUBufferAtomic;
1721
- def int_amdgcn_buffer_atomic_and : AMDGPUBufferAtomic;
1722
- def int_amdgcn_buffer_atomic_or : AMDGPUBufferAtomic;
1723
- def int_amdgcn_buffer_atomic_xor : AMDGPUBufferAtomic;
1724
- def int_amdgcn_buffer_atomic_cmpswap : Intrinsic<
1725
- [llvm_i32_ty],
1726
- [llvm_i32_ty, // src(VGPR)
1727
- llvm_i32_ty, // cmp(VGPR)
1728
- llvm_v4i32_ty, // rsrc(SGPR)
1729
- llvm_i32_ty, // vindex(VGPR)
1730
- llvm_i32_ty, // offset(SGPR/VGPR/imm)
1731
- llvm_i1_ty], // slc(imm)
1732
- [ImmArg<ArgIndex<5>>, IntrWillReturn, IntrNoCallback, IntrNoFree], "", [SDNPMemOperand]>,
1733
- AMDGPURsrcIntrinsic<2, 0>;
1734
-
1735
- def int_amdgcn_buffer_atomic_csub : AMDGPUBufferAtomic;
1736
-
1737
- class AMDGPUBufferAtomicFP : Intrinsic <
1738
- [llvm_anyfloat_ty],
1739
- [LLVMMatchType<0>, // vdata(VGPR)
1740
- llvm_v4i32_ty, // rsrc(SGPR)
1741
- llvm_i32_ty, // vindex(VGPR)
1742
- llvm_i32_ty, // offset(SGPR/VGPR/imm)
1743
- llvm_i1_ty], // slc(imm)
1744
- [ImmArg<ArgIndex<4>>, IntrWillReturn, IntrNoCallback, IntrNoFree], "", [SDNPMemOperand]>,
1745
- AMDGPURsrcIntrinsic<1, 0>;
1746
-
1747
- // Legacy form of the intrinsic. raw and struct forms should be preferred.
1748
- def int_amdgcn_buffer_atomic_fadd : AMDGPUBufferAtomicFP;
1749
-
1750
1646
class AMDGPURawBufferLoadLDS : Intrinsic <
1751
1647
[],
1752
1648
[llvm_v4i32_ty, // rsrc(SGPR)
0 commit comments