This is an archive of the discontinued LLVM Phabricator instance.

[Xtensa] Lower SHIFT PARTS and shift operations.
Needs RevisionPublic

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

Details

Summary

Also lower SHL, SRA, SRL with register operands.

Diff Detail

Event Timeline

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

The code conforms to ISA. One doubt about the opcode used for comparing shift amount with 32.

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

This comment applies to other SELECT nodes as well.
Why the condtion is Shamt & 32 as opposed to Shamt < 32? or at least Shamt & 31 ?
Other targets (see RISC-V) use Shamt < 32.

arsenm requested changes to this revision.Aug 17 2023, 4:21 PM

Needs tests

This revision now requires changes to proceed.Aug 17 2023, 4:21 PM