This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Add a test case showing an extra sext.w near a sh2add with multiple uses. NFC
ClosedPublic

Authored by craig.topper on Aug 30 2021, 7:56 PM.

Diff Detail

Event Timeline

craig.topper created this revision.Aug 30 2021, 7:56 PM
craig.topper requested review of this revision.Aug 30 2021, 7:56 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 30 2021, 7:56 PM
Herald added a subscriber: MaskRay. · View Herald Transcript
frasercrmck accepted this revision.Sep 1 2021, 1:46 AM

LGTM.

llvm/test/CodeGen/RISCV/rv64zba.ll
377

I'm not quite sure what The shl usage is unnecessary means here. I think it's the word "usage" here which is a bit overloaded in this context. Is this saying that the shl user of the sext_inreg shouldn't "count" if it's selected as sllw because it sign extends its input anyway?

My first thought was "usage" meant the shl itself is unnecessary in the program, which isn't right. I might be overcomplicating things based on my initial reading.

This revision is now accepted and ready to land.Sep 1 2021, 1:46 AM
craig.topper added inline comments.Sep 1 2021, 8:59 AM
llvm/test/CodeGen/RISCV/rv64zba.ll
377

It means the shl usage of the sext_inreg. I'll fix it.

This revision was landed with ongoing or failed builds.Sep 1 2021, 11:06 AM
This revision was automatically updated to reflect the committed changes.