This is an archive of the discontinued LLVM Phabricator instance.

[SPIR-V] Add atomic_init builtin and fix atomic explicit lowering
ClosedPublic

Authored by mpaszkowski on Oct 13 2022, 11:54 AM.

Details

Summary

This change:

  • Adds implementation for atomic_init builtin
  • Fixes atomic_exchange_explicit lowering
  • Fixes atomic_store_explicit lowering
  • Adds a new line char to LLVM_DEBUG messages printed from SPIRVBuiltins.cpp

The AtomicsBuiltinsFloat.ll test comes from the SPIR-V translator and was extended with additional checks.

Diff Detail

Event Timeline

mpaszkowski created this revision.Oct 13 2022, 11:54 AM
mpaszkowski requested review of this revision.Oct 13 2022, 11:54 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 13 2022, 11:54 AM
llvm/test/CodeGen/SPIRV/AtomicBuiltinsFloat.ll
9

As I know we use %[[#]] instead of {{%.+}}.

mpaszkowski marked an inline comment as done.

Thanks @iliya-diyachkov! The formatting is now fixed.

iliya-diyachkov accepted this revision.Oct 19 2022, 4:45 AM

It looks good to me. Thank you for the patch, Michal.

This revision is now accepted and ready to land.Oct 19 2022, 4:45 AM
andreytr added inline comments.Oct 19 2022, 12:17 PM
llvm/test/CodeGen/SPIRV/AtomicBuiltinsFloat.ll
9

Just small indentation fix, please.

mpaszkowski marked an inline comment as done.Oct 19 2022, 12:32 PM
mpaszkowski added inline comments.
llvm/test/CodeGen/SPIRV/AtomicBuiltinsFloat.ll
9

Sure, will fix before committing the change!

This revision was automatically updated to reflect the committed changes.
mpaszkowski marked an inline comment as done.