This is an archive of the discontinued LLVM Phabricator instance.

[VE][NFC] Change cast to dyn_cast
ClosedPublic

Authored by kaz7 on Nov 10 2020, 4:32 AM.

Details

Summary

We used cast where we should use dyn_cast. So, change it this time.
Old code cause problems if I implement brind instruction and compile
openmp using new compiler.

Diff Detail

Event Timeline

kaz7 created this revision.Nov 10 2020, 4:32 AM
kaz7 requested review of this revision.Nov 10 2020, 4:33 AM
simoll accepted this revision.Nov 10 2020, 4:47 AM

No need for review here. You can commit this as is.

This revision is now accepted and ready to land.Nov 10 2020, 4:47 AM
This revision was landed with ongoing or failed builds.Nov 10 2020, 4:49 AM
This revision was automatically updated to reflect the committed changes.

Can you add a test case for this change?

If this change is not testable (eg: if all "Addr" that can reach this code are ConstantSDNodes) then it may be more suitable to remove the conditional and leave the cast in until code is committed that makes this live - that way we can be sure test coverage is added when the code is added.

kaz7 added a comment.Nov 16 2020, 8:23 PM

@dblaikie, Thank you for suggestion. I'll try to make it tonight.