llvm.org GIT mirror llvm / 0e1b127
AMDGPU/NFC: Split FLAT_Global_Atomic_Pseudo into RTN/NO_RTN multiclasses git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346361 91177308-0d34-0410-b5e6-96231b3b80d8 Konstantin Zhuravlyov 10 months ago
1 changed file(s) with 30 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
274274 AtomicNoRet ;
275275 }
276276
277 multiclass FLAT_Global_Atomic_Pseudo<
277 multiclass FLAT_Global_Atomic_Pseudo_NO_RTN<
278278 string opName,
279279 RegisterClass vdst_rc,
280280 ValueType vt,
290290 let has_saddr = 1;
291291 let PseudoInstr = NAME;
292292 }
293
294 def _SADDR : FLAT_AtomicNoRet_Pseudo
295 (outs),
296 (ins VReg_64:$vaddr, data_rc:$vdata, SReg_64:$saddr, offset_s13:$offset, SLC:$slc),
297 " $vaddr, $vdata, $saddr$offset$slc">,
298 AtomicNoRet {
299 let has_saddr = 1;
300 let enabled_saddr = 1;
301 let PseudoInstr = NAME#"_SADDR";
302 }
303 }
304
305 multiclass FLAT_Global_Atomic_Pseudo_RTN<
306 string opName,
307 RegisterClass vdst_rc,
308 ValueType vt,
309 SDPatternOperator atomic = null_frag,
310 ValueType data_vt = vt,
311 RegisterClass data_rc = vdst_rc> {
293312
294313 def _RTN : FLAT_AtomicRet_Pseudo
295314 (outs vdst_rc:$vdst),
301320 let has_saddr = 1;
302321 }
303322
304 def _SADDR : FLAT_AtomicNoRet_Pseudo
305 (outs),
306 (ins VReg_64:$vaddr, data_rc:$vdata, SReg_64:$saddr, offset_s13:$offset, SLC:$slc),
307 " $vaddr, $vdata, $saddr$offset$slc">,
308 AtomicNoRet {
309 let has_saddr = 1;
310 let enabled_saddr = 1;
311 let PseudoInstr = NAME#"_SADDR";
312 }
313
314323 def _SADDR_RTN : FLAT_AtomicRet_Pseudo
315324 (outs vdst_rc:$vdst),
316325 (ins VReg_64:$vaddr, data_rc:$vdata, SReg_64:$saddr, offset_s13:$offset, SLC:$slc),
321330 let PseudoInstr = NAME#"_SADDR_RTN";
322331 }
323332 }
333
334 multiclass FLAT_Global_Atomic_Pseudo<
335 string opName,
336 RegisterClass vdst_rc,
337 ValueType vt,
338 SDPatternOperator atomic = null_frag,
339 ValueType data_vt = vt,
340 RegisterClass data_rc = vdst_rc> :
341 FLAT_Global_Atomic_Pseudo_NO_RTN,
342 FLAT_Global_Atomic_Pseudo_RTN;
324343
325344 class flat_binary_atomic_op : PatFrag<
326345 (ops node:$ptr, node:$value),