https://github.com/llvm/llvm-project/commit/839b436c93604e042f74050cf2adadd75f30e898
changes the behavior. Based on the discussion, we also want to support
"and" behavior. The revision changes it into two functions, bitEnumContainsAny
and bitEnumContainsAll.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
This patch seems incorrect, though I'm not unhappy with the idea
mlir/docs/OpDefinitions.md | ||
---|---|---|
1449 | I don't think this is the check - this just checks that there's a bit in either input that's set. I think this should and bits and bit together, then cast to the underlying type and check if the result isn't zero. | |
mlir/tools/mlir-tblgen/EnumsGen.cpp | ||
165 | Also, this should be generic to the enum using {0} and {1} |
mlir/docs/OpDefinitions.md | ||
---|---|---|
1449 | Sorry that I copied wrong line. You're right on it. |
Comment Actions
LGTM
Could we also have a bitEnumContains that asserts the bit only has one bit set, for backwards compatibility? That might be a separate patch.
I don't think this is the check - this just checks that there's a bit in either input that's set. I think this should and bits and bit together, then cast to the underlying type and check if the result isn't zero.