This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Add a helper function to allow ReplaceNodeResults to use sign extension for any_extend of i32 constants.
AbandonedPublic

Authored by craig.topper on Jul 11 2021, 12:58 PM.

Details

Summary

any_extend is constant folded as zero extension, but that's not
ideal for RISCV.

Use the helper for shifts, rotates, and uaddo/usubo. There are
still more cases to update, but we need tests first.

Diff Detail

Event Timeline

craig.topper created this revision.Jul 11 2021, 12:58 PM
craig.topper requested review of this revision.Jul 11 2021, 12:58 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 11 2021, 12:58 PM
Herald added a subscriber: MaskRay. · View Herald Transcript

Can't we just address the root problem and make those any_extends be sign-extended for RISC-V, where they are handled?

Can't we just address the root problem and make those any_extends be sign-extended for RISC-V, where they are handled?

Alternative version D105918

craig.topper abandoned this revision.Jul 20 2021, 11:41 AM

We no longer need this after D105918