This is an archive of the discontinued LLVM Phabricator instance.

[GlobalISel] Add G_ASSERT_SEXT
ClosedPublic

Authored by paquette on Feb 17 2021, 11:59 AM.

Details

Summary

This adds a G_ASSERT_SEXT opcode, similar to G_ASSERT_ZEXT. This instruction signifies that an operation was already sign extended from a smaller type.

This is useful for functions with sign-extended parameters.

E.g.

define void @foo(i16 signext %x) {
    ...
}

This adds verifier, regbankselect, and instruction selection support for G_ASSERT_SEXT equivalent to G_ASSERT_ZEXT.

Diff Detail

Event Timeline

paquette created this revision.Feb 17 2021, 11:59 AM
paquette requested review of this revision.Feb 17 2021, 11:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 17 2021, 11:59 AM
Herald added a subscriber: wdng. · View Herald Transcript
arsenm accepted this revision.Feb 17 2021, 12:28 PM
This revision is now accepted and ready to land.Feb 17 2021, 12:28 PM
This revision was automatically updated to reflect the committed changes.