[llvm] [AMDGPU] Fix operand definitions for atomic scalar memory instructions. (PR #71799)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 9 05:09:32 PST 2023
================
@@ -909,6 +909,10 @@ class AMDGPUOperand : public MCParsedAsmOperand {
bool isWaitVDST() const;
bool isWaitEXP() const;
+ auto getPredicate(std::function<bool(const AMDGPUOperand &Op)> P) const {
----------------
jayfoad wrote:
Wouldn't it be simpler to implement a couple more named predicate methods in `AMDGPUOperand`, e.g.:
```
bool isGLC() { return getImm() & CPol::GLC; }
```
Anyway I don't object if you want to do it this way, but it took me a while to understand.
https://github.com/llvm/llvm-project/pull/71799
More information about the llvm-commits
mailing list