Skip to content

Conversation

MrSidims
Copy link
Contributor

@MrSidims MrSidims commented Oct 6, 2025

SPIRVReader has contained a bug for a long time, fixed in KhronosGroup/SPIRV-LLVM-Translator#3373

While the proper fix will be backported to earlier branches - it still will take a lot of time for adoption by LTS driver. Hence we have to add a W/A restoring old behaviour of lifetime intrinsics translation, inserting artificial bitcast to i8*.

PR also includes update of a test from
KhronosGroup/SPIRV-LLVM-Translator#3376

SPIRVReader has contained a bug for a long time, fixed in
KhronosGroup/SPIRV-LLVM-Translator#3373

While the proper fix will be backported to earlier branches - it
still will take a lot of time for adoption by LTS driver. Hence we have to
add a W/A restoring old behaviour of lifetime intrinsics translation,
inserting artificial bitcast to i8*.

PR also includes update of a test from
KhronosGroup/SPIRV-LLVM-Translator#3376

Signed-off-by: Sidorov, Dmitry <[email protected]>
@MrSidims MrSidims requested a review from a team as a code owner October 6, 2025 14:41
SPIRVLifetimeStart *LTStart = static_cast<SPIRVLifetimeStart *>(BV);
IRBuilder<> Builder(BB);
auto *Var = transValue(LTStart->getObject(), F, BB);
Var = Var->stripPointerCasts();
Copy link
Contributor Author

@MrSidims MrSidims Oct 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This strip bitcast is missing in intel/llvm, but it present in every other repository, both Khronos and downstream.

Copy link
Contributor

@maarquitos14 maarquitos14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants