This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Change the immediate argument to Zk* intrinsics/builtins from i8 to i32.
ClosedPublic

Authored by craig.topper on Jun 10 2023, 12:12 PM.

Details

Summary

This matches gcc. It also lets us fix a bug that the byteselect
predicate was not being evaluated in tablegen. We can't have i8
TImmLeaf in tablegen because i8 isn't a type for any register class.

I've added AutoUpgrade support for the IR intrinsics.

Diff Detail

Event Timeline

craig.topper created this revision.Jun 10 2023, 12:12 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 10 2023, 12:12 PM
craig.topper requested review of this revision.Jun 10 2023, 12:12 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJun 10 2023, 12:12 PM
asb added a comment.Jun 12 2023, 8:03 AM

The patch title should indicate "from i8 to i32" or similar?

craig.topper retitled this revision from [RISCV] Change the immediate argument to Zvk intrinsics/builtins to i8. to [RISCV] Change the immediate argument to Zvk intrinsics/builtins from i8 to i32..Jun 12 2023, 9:09 AM
craig.topper retitled this revision from [RISCV] Change the immediate argument to Zvk intrinsics/builtins from i8 to i32. to [RISCV] Change the immediate argument to Zk* intrinsics/builtins from i8 to i32..Jun 12 2023, 3:30 PM
asb accepted this revision.Jun 13 2023, 2:23 AM

LGTM. llvm/test/Bitcode is the other place the autoupgrade tests could go, but it looks like it's not used any more frequently for such tests than llvm/test/CodeGen/$tgt/.

This revision is now accepted and ready to land.Jun 13 2023, 2:23 AM
This revision was landed with ongoing or failed builds.Jun 13 2023, 10:40 AM
This revision was automatically updated to reflect the committed changes.
llvm/test/CodeGen/RISCV/rv32zksed-intrinsic-autoupgrade.ll