This is an archive of the discontinued LLVM Phabricator instance.

[SPIR-V] Add Machine Value Type for SPIR-V builtins
ClosedPublic

Authored by mpaszkowski on Mar 9 2023, 10:18 AM.

Details

Summary

This patch adds a MVT for SPIR-V builtins. This fixes the spirv-types.ll LIT test which is failing after llvm_unreachable() was added in D136862.

Diff Detail

Event Timeline

mpaszkowski created this revision.Mar 9 2023, 10:18 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 9 2023, 10:18 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
mpaszkowski requested review of this revision.Mar 9 2023, 10:18 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 9 2023, 10:18 AM
sdesmalen added inline comments.Mar 10 2023, 8:15 AM
llvm/lib/CodeGen/ValueTypes.cpp
592

is it sufficient to only specify a single MVT for the different SPIRV types?

mpaszkowski added inline comments.Mar 11 2023, 2:54 PM
llvm/lib/CodeGen/ValueTypes.cpp
592

It is sufficient for our current use. We do not rely on IRTranslator to lower these types, but rather have a custom lowering mechanism in SPIRVCallLowering.cpp and SPIRVBuiltins.cpp.

iliya-diyachkov accepted this revision.Mar 16 2023, 3:49 PM

Thanks for the patch, Michal. It looks good to me.

This revision is now accepted and ready to land.Mar 16 2023, 3:49 PM
This revision was automatically updated to reflect the committed changes.