This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Verify consistency of a couple TSFlags related to vector operands
ClosedPublic

Authored by reames on Sep 13 2022, 2:57 PM.

Details

Summary

Mostly a starting point for discussion. I think it makes sense to have verification rules for these flags; mostly to make it easier to figure out their function. Do others agree?

If so, any other proposed rules we'd like to enforce? I picked these two somewhat arbitrarily based on code I was looking at today.

Diff Detail

Event Timeline

reames created this revision.Sep 13 2022, 2:57 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 13 2022, 2:57 PM
reames requested review of this revision.Sep 13 2022, 2:57 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 13 2022, 2:57 PM
craig.topper added inline comments.Sep 13 2022, 3:26 PM
llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
1224

SEW -> VL

Title [RISCV\ -> [RISCV]

craig.topper retitled this revision from [RISCV\ Verify consistency of a couple TSFlags related to vector operands to [RISCV] Verify consistency of a couple TSFlags related to vector operands.Sep 13 2022, 6:02 PM
reames updated this revision to Diff 460086.Sep 14 2022, 7:38 AM

I think some level of verification makes sense. I half worry that some instructions may not behave so nicely and we'll have to add exceptions to our rules, but none come to mind right now.

I think some level of verification makes sense. I half worry that some instructions may not behave so nicely and we'll have to add exceptions to our rules, but none come to mind right now.

This doesn't sound like a bad outcome to me. Finding and documenting the hidden invariants is a major reason for this change. :)

This revision is now accepted and ready to land.Sep 21 2022, 5:24 PM
This revision was landed with ongoing or failed builds.Sep 22 2022, 8:35 AM
This revision was automatically updated to reflect the committed changes.