This is an archive of the discontinued LLVM Phabricator instance.

[VE] Clean check routines of branch types
ClosedPublic

Authored by kaz7 on Nov 27 2020, 6:51 PM.

Details

Summary

Previously, these check routines accepted non-generatble instructions.
This time, I clean them and add assert for those non-generatable
instructions.

Diff Detail

Event Timeline

kaz7 created this revision.Nov 27 2020, 6:51 PM
kaz7 requested review of this revision.Nov 27 2020, 6:51 PM

A helpful comment could explain why these instructions should not be used. Nits, else LGTM.

llvm/lib/Target/VE/VEInstrInfo.cpp
97

typo alwasy

101

I am lacking context here but is this really the right place for this assertion? Does "should not be used" mean that these instructions are invalid/incorrect or are they just not recommendable/inefficient?

kaz7 planned changes to this revision.Nov 30 2020, 5:21 AM

Thank you for reviewing.

llvm/lib/Target/VE/VEInstrInfo.cpp
97

Thanks.

101

Those instructions are not lowered here from LLVM-IR because we don't use such instructions in our lowering patterns. Those are acceptable by meaning of HW instructions but not acceptable by meaning of lowering consitency. And, writing all possible instruction here is definitely not a good idea. Therefore, I write "should not be used" as invalid. I'll write such comments in the souce.

kaz7 updated this revision to Diff 308344.Nov 30 2020, 5:52 AM

Update comments following suggestions.

simoll accepted this revision.Nov 30 2020, 5:56 AM

Thanks!

This revision is now accepted and ready to land.Nov 30 2020, 5:56 AM
This revision was landed with ongoing or failed builds.Nov 30 2020, 9:19 AM
This revision was automatically updated to reflect the committed changes.