This is an archive of the discontinued LLVM Phabricator instance.

[Xtensa] Implement load pseudo operations and patterns.
Needs RevisionPublic

Authored by andreisfr on Mar 27 2023, 5:34 AM.

Details

Summary

Implement load unsigned 8-bit pseudo operation. Implement extending loads patterns extloadi1/i8/i16.

Diff Detail

Event Timeline

andreisfr created this revision.Mar 27 2023, 5:34 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 27 2023, 5:34 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
andreisfr requested review of this revision.Mar 27 2023, 5:34 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 27 2023, 5:34 AM
JKRhb added a subscriber: JKRhb.Mar 30 2023, 12:57 PM

The code conforms to ISA. One "optimization" remark: pseudo-instruction might be replaced by tablegen pattern in this case.

llvm/lib/Target/Xtensa/XtensaISelLowering.cpp
1141

This snippet can be represented as Tablegen pattern below.
If that is true, we don't have to use pseudo instruction in this case.

def : Pat<(i32 (sextloadi8  addr_ish1:$addr)), 
          (SRAI 
            (SLLI 
              (L8UI addr_ish1:$addr), 
              (i32 24)),
            (i32 24))>;
arsenm requested changes to this revision.Aug 18 2023, 9:56 AM

Tests

This revision now requires changes to proceed.Aug 18 2023, 9:56 AM