This is an archive of the discontinued LLVM Phabricator instance.

[SPIR-V] Promote arbitrary width ints to regular width
ClosedPublic

Authored by mpaszkowski on Mar 1 2023, 6:37 PM.

Details

Summary

After this patch all arbitrary size integers (smaller than 64 bits) in LLVM IR will be promoted to regular size type in SPIR-V (OpTypeInt 8/16/32/64).

Support for generating arbitrary size integer types in SPIR-V with SPV_INTEL_arbitrary_precision_integers extension will be added in the following patch.

Diff Detail

Event Timeline

mpaszkowski created this revision.Mar 1 2023, 6:37 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 1 2023, 6:37 PM
mpaszkowski requested review of this revision.Mar 1 2023, 6:37 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 1 2023, 6:37 PM
iliya-diyachkov accepted this revision.Mar 9 2023, 12:37 PM

It looks good to me.

This revision is now accepted and ready to land.Mar 9 2023, 12:37 PM

Why is this not changing any legalizer rules?

Why is this not changing any legalizer rules?

@arsenm In MIR still only legal int widths are 8/16/32/64 bits. I assume that the next patch adding the support for SPV_INTEL_arbitrary_precision_integers extension should change the legalizer rules.

This revision was landed with ongoing or failed builds.Mar 13 2023, 2:46 PM
This revision was automatically updated to reflect the committed changes.