@@ -1083,18 +1083,6 @@ def int_amdgcn_make_buffer_rsrc : DefaultAttrsIntrinsic <
1083
1083
1084
1084
defset list<AMDGPURsrcIntrinsic> AMDGPUBufferIntrinsics = {
1085
1085
1086
- class AMDGPUBufferLoad<LLVMType data_ty = llvm_any_ty> : DefaultAttrsIntrinsic <
1087
- [data_ty],
1088
- [llvm_v4i32_ty, // rsrc(SGPR)
1089
- llvm_i32_ty, // vindex(VGPR)
1090
- llvm_i32_ty, // offset(SGPR/VGPR/imm)
1091
- llvm_i1_ty, // glc(imm)
1092
- llvm_i1_ty], // slc(imm)
1093
- [IntrReadMem, ImmArg<ArgIndex<3>>, ImmArg<ArgIndex<4>>], "", [SDNPMemOperand]>,
1094
- AMDGPURsrcIntrinsic<0>;
1095
- def int_amdgcn_buffer_load_format : AMDGPUBufferLoad<llvm_anyfloat_ty>;
1096
- def int_amdgcn_buffer_load : AMDGPUBufferLoad;
1097
-
1098
1086
// Generate a buffer_load instruction that may be optimized to s_buffer_load if
1099
1087
// the offset argument is uniform.
1100
1088
def int_amdgcn_s_buffer_load : DefaultAttrsIntrinsic <
@@ -1111,25 +1099,12 @@ def int_amdgcn_s_buffer_load : DefaultAttrsIntrinsic <
1111
1099
[IntrNoMem, ImmArg<ArgIndex<2>>]>,
1112
1100
AMDGPURsrcIntrinsic<0>;
1113
1101
1114
- class AMDGPUBufferStore<LLVMType data_ty = llvm_any_ty> : DefaultAttrsIntrinsic <
1115
- [],
1116
- [data_ty, // vdata(VGPR)
1117
- llvm_v4i32_ty, // rsrc(SGPR)
1118
- llvm_i32_ty, // vindex(VGPR)
1119
- llvm_i32_ty, // offset(SGPR/VGPR/imm)
1120
- llvm_i1_ty, // glc(imm)
1121
- llvm_i1_ty], // slc(imm)
1122
- [IntrWriteMem, ImmArg<ArgIndex<4>>, ImmArg<ArgIndex<5>>], "", [SDNPMemOperand]>,
1123
- AMDGPURsrcIntrinsic<1>;
1124
- def int_amdgcn_buffer_store_format : AMDGPUBufferStore<llvm_anyfloat_ty>;
1125
- def int_amdgcn_buffer_store : AMDGPUBufferStore;
1126
-
1127
- // New buffer intrinsics with separate raw and struct variants. The raw
1102
+ // Buffer intrinsics with separate raw and struct variants. The raw
1128
1103
// variant never has an index. The struct variant always has an index, even if
1129
1104
// it is const 0. A struct intrinsic with constant 0 index is different to the
1130
1105
// corresponding raw intrinsic on gfx9+ because the behavior of bound checking
1131
1106
// and swizzling changes depending on whether idxen is set in the instruction.
1132
- // These new instrinsics also keep the offset and soffset arguments separate as
1107
+ // These instrinsics also keep the offset and soffset arguments separate as
1133
1108
// they behave differently in bounds checking and swizzling.
1134
1109
1135
1110
// The versions of these intrinsics that take <4 x i32> arguments are deprecated
@@ -1489,41 +1464,7 @@ def int_amdgcn_struct_buffer_atomic_fmax : AMDGPUStructBufferAtomic<llvm_anyfloa
1489
1464
def int_amdgcn_struct_ptr_buffer_atomic_fmin : AMDGPUStructPtrBufferAtomic<llvm_anyfloat_ty>;
1490
1465
def int_amdgcn_struct_ptr_buffer_atomic_fmax : AMDGPUStructPtrBufferAtomic<llvm_anyfloat_ty>;
1491
1466
1492
- // Obsolescent tbuffer intrinsics.
1493
- def int_amdgcn_tbuffer_load : DefaultAttrsIntrinsic <
1494
- [llvm_any_ty], // overloaded for types f32/i32, v2f32/v2i32, v4f32/v4i32
1495
- [llvm_v4i32_ty, // rsrc(SGPR)
1496
- llvm_i32_ty, // vindex(VGPR)
1497
- llvm_i32_ty, // voffset(VGPR)
1498
- llvm_i32_ty, // soffset(SGPR)
1499
- llvm_i32_ty, // offset(imm)
1500
- llvm_i32_ty, // dfmt(imm)
1501
- llvm_i32_ty, // nfmt(imm)
1502
- llvm_i1_ty, // glc(imm)
1503
- llvm_i1_ty], // slc(imm)
1504
- [IntrReadMem,
1505
- ImmArg<ArgIndex<4>>, ImmArg<ArgIndex<5>>, ImmArg<ArgIndex<6>>,
1506
- ImmArg<ArgIndex<7>>, ImmArg<ArgIndex<8>>], "", [SDNPMemOperand]>,
1507
- AMDGPURsrcIntrinsic<0>;
1508
-
1509
- def int_amdgcn_tbuffer_store : DefaultAttrsIntrinsic <
1510
- [],
1511
- [llvm_any_ty, // vdata(VGPR), overloaded for types f32/i32, v2f32/v2i32, v4f32/v4i32
1512
- llvm_v4i32_ty, // rsrc(SGPR)
1513
- llvm_i32_ty, // vindex(VGPR)
1514
- llvm_i32_ty, // voffset(VGPR)
1515
- llvm_i32_ty, // soffset(SGPR)
1516
- llvm_i32_ty, // offset(imm)
1517
- llvm_i32_ty, // dfmt(imm)
1518
- llvm_i32_ty, // nfmt(imm)
1519
- llvm_i1_ty, // glc(imm)
1520
- llvm_i1_ty], // slc(imm)
1521
- [IntrWriteMem, ImmArg<ArgIndex<5>>,
1522
- ImmArg<ArgIndex<6>>, ImmArg<ArgIndex<7>>,
1523
- ImmArg<ArgIndex<8>>, ImmArg<ArgIndex<9>>], "", [SDNPMemOperand]>,
1524
- AMDGPURsrcIntrinsic<1>;
1525
-
1526
- // New tbuffer intrinsics, with:
1467
+ // tbuffer intrinsics, with:
1527
1468
// - raw and struct variants
1528
1469
// - joint format field
1529
1470
// - joint cachepolicy field
@@ -1670,51 +1611,6 @@ def int_amdgcn_struct_tbuffer_store : DefaultAttrsIntrinsic <
1670
1611
ImmArg<ArgIndex<5>>, ImmArg<ArgIndex<6>>], "", [SDNPMemOperand]>,
1671
1612
AMDGPURsrcIntrinsic<1>;
1672
1613
1673
- class AMDGPUBufferAtomic : Intrinsic <
1674
- [llvm_anyint_ty],
1675
- [LLVMMatchType<0>, // vdata(VGPR)
1676
- llvm_v4i32_ty, // rsrc(SGPR)
1677
- llvm_i32_ty, // vindex(VGPR)
1678
- llvm_i32_ty, // offset(SGPR/VGPR/imm)
1679
- llvm_i1_ty], // slc(imm)
1680
- [ImmArg<ArgIndex<4>>, IntrWillReturn, IntrNoCallback, IntrNoFree], "", [SDNPMemOperand]>,
1681
- AMDGPURsrcIntrinsic<1, 0>;
1682
- def int_amdgcn_buffer_atomic_swap : AMDGPUBufferAtomic;
1683
- def int_amdgcn_buffer_atomic_add : AMDGPUBufferAtomic;
1684
- def int_amdgcn_buffer_atomic_sub : AMDGPUBufferAtomic;
1685
- def int_amdgcn_buffer_atomic_smin : AMDGPUBufferAtomic;
1686
- def int_amdgcn_buffer_atomic_umin : AMDGPUBufferAtomic;
1687
- def int_amdgcn_buffer_atomic_smax : AMDGPUBufferAtomic;
1688
- def int_amdgcn_buffer_atomic_umax : AMDGPUBufferAtomic;
1689
- def int_amdgcn_buffer_atomic_and : AMDGPUBufferAtomic;
1690
- def int_amdgcn_buffer_atomic_or : AMDGPUBufferAtomic;
1691
- def int_amdgcn_buffer_atomic_xor : AMDGPUBufferAtomic;
1692
- def int_amdgcn_buffer_atomic_cmpswap : Intrinsic<
1693
- [llvm_i32_ty],
1694
- [llvm_i32_ty, // src(VGPR)
1695
- llvm_i32_ty, // cmp(VGPR)
1696
- llvm_v4i32_ty, // rsrc(SGPR)
1697
- llvm_i32_ty, // vindex(VGPR)
1698
- llvm_i32_ty, // offset(SGPR/VGPR/imm)
1699
- llvm_i1_ty], // slc(imm)
1700
- [ImmArg<ArgIndex<5>>, IntrWillReturn, IntrNoCallback, IntrNoFree], "", [SDNPMemOperand]>,
1701
- AMDGPURsrcIntrinsic<2, 0>;
1702
-
1703
- def int_amdgcn_buffer_atomic_csub : AMDGPUBufferAtomic;
1704
-
1705
- class AMDGPUBufferAtomicFP : Intrinsic <
1706
- [llvm_anyfloat_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
-
1715
- // Legacy form of the intrinsic. raw and struct forms should be preferred.
1716
- def int_amdgcn_buffer_atomic_fadd : AMDGPUBufferAtomicFP;
1717
-
1718
1614
class AMDGPURawBufferLoadLDS : Intrinsic <
1719
1615
[],
1720
1616
[llvm_v4i32_ty, // rsrc(SGPR)
0 commit comments