This is an archive of the discontinued LLVM Phabricator instance.

[SystemZ] Allow any I5 in RotateSelect*
ClosedPublic

Authored by iii on Mar 15 2023, 6:24 PM.

Details

Summary

For all RotateSelect* instructions, PoP says:

Bits 0-1 of the I5 field (bits 32-33 of the instruction) are
ignored.

LLVM, however, completely prohibits using them, e.g.:

error: invalid operand for instruction
asm("rxsbg %[r1],%[r2],177,43,228\n"

Lift this unnecessary restriction.

Diff Detail

Event Timeline

iii created this revision.Mar 15 2023, 6:24 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 15 2023, 6:24 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
iii requested review of this revision.Mar 15 2023, 6:24 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 15 2023, 6:24 PM
uweigand accepted this revision.Mar 17 2023, 9:34 AM

I believe the imm32zx6 operand definition is now unused and should be removed as well. Otherwise this LGTM.

This revision is now accepted and ready to land.Mar 17 2023, 9:34 AM
iii updated this revision to Diff 510731.Apr 4 2023, 3:15 AM
  • Drop imm32zx6.
uweigand accepted this revision.Apr 4 2023, 4:21 AM

LGTM, thanks!

This revision was automatically updated to reflect the committed changes.
iii added a comment.Apr 4 2023, 5:14 AM

This now causes: https://lab.llvm.org/buildbot/#/builders/57/builds/25796

/home/buildbots/docker-RHEL84-buildbot/SetupBot/worker_env/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/llvm/lib/Target/SystemZ/Disassembler/SystemZDisassembler.cpp:209:21: error: unused function 'decodeU6ImmOperand' [-Werror,-Wunused-function]
static DecodeStatus decodeU6ImmOperand(MCInst &Inst, uint64_t Imm,
                    ^
1 error generated.

I will fix it.