HasModifiers should be true if at least one modifier is used.
This should make the use of this field bit more consistent.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I would prefer to include HasClamp inside "field bit HasModifiers =" but VOPProfile allows clamp to be explicitly enabled through "bit _EnableClamp = 0" which still messes up the logic a little bit (like in class getIns64). Not sure if there is some other reason to keeping clamp separate from other modifiers.
This is why there are still a few "let HasClamp = 1;" lines. Ideally we would only want "= 0" for special cases where some modifiers are not used.
"HasModifiers should not be true if at least one modifier is used."
Do you mean "*should* be true"?
I'm getting failing tests in check-llvm-mc-disassembler-amdgpu when applying this patch, can you take a look at that please?
This
"field bit HasSrc0Mods = HasModifiers;"
basically tells us that we can replace all uses of HasModifiers with HasSrc0Mods. I guess it's more of a question of readability.
llvm/lib/Target/AMDGPU/SIInstrInfo.td | ||
---|---|---|
2071 | It would be even more consistent if HasClamp was here too, so that HasModifiers is true if HasClamp is true. However, I think that can be a separate patch. |
It would be even more consistent if HasClamp was here too, so that HasModifiers is true if HasClamp is true. However, I think that can be a separate patch.