This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] When ISD::SETUGT && Imm == -1, processed before lowering
ClosedPublic

Authored by Miss_Grape on Aug 22 2022, 6:03 AM.

Diff Detail

Event Timeline

Miss_Grape created this revision.Aug 22 2022, 6:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 22 2022, 6:03 AM
Miss_Grape requested review of this revision.Aug 22 2022, 6:03 AM
reames requested changes to this revision.Aug 22 2022, 8:02 AM
reames added a subscriber: reames.

Please follow LLVM development policies. Add a description of the change, and tests which demonstrate it.

This revision now requires changes to proceed.Aug 22 2022, 8:02 AM

Please follow LLVM development policies. Add a description of the change, and tests which demonstrate it.

This is removing code that I added out of paranoia. I agree it should never happen.

At the very least it needs a comment and an assert.

Please follow LLVM development policies. Add a description of the change, and tests which demonstrate it.

This is removing code that I added out of paranoia. I agree it should never happen.

At the very least it needs a comment and an assert.

I think this scenario has already been processed in the previous optimization stage. What do you think would be more appropriate to change?

This comment was removed by craig.topper.

Please follow LLVM development policies. Add a description of the change, and tests which demonstrate it.

This is removing code that I added out of paranoia. I agree it should never happen.

At the very least it needs a comment and an assert.

I think this scenario has already been processed in the previous optimization stage. What do you think would be more appropriate to change?

I suggested we replace with

// X > -1 should have been replaced with false.
assert((CCVal != ISD::SETUGT || Imm != -1) && "Missing canonicalization");

Please follow LLVM development policies. Add a description of the change, and tests which demonstrate it.

This is removing code that I added out of paranoia. I agree it should never happen.

At the very least it needs a comment and an assert.

I think this scenario has already been processed in the previous optimization stage. What do you think would be more appropriate to change?

I suggested we replace with

// X > -1 should have been replaced with false.
assert((CCVal != ISD::SETUGT || Imm != -1) && "Missing canonicalization");

Done

reames resigned from this revision.Aug 31 2022, 2:26 PM
This revision is now accepted and ready to land.Aug 31 2022, 2:26 PM
This revision was landed with ongoing or failed builds.Sep 1 2022, 12:43 AM
This revision was automatically updated to reflect the committed changes.