Skip to content

Conversation

wenju-he
Copy link
Contributor

This PR fixes two issues in previous logic:

  • phi user of @llvm.amdgcn.implicit.offset call is not handled.
  • post-order collecting load's defs is wrong, producing wrong order in PtrUses.

This PR fixes two issues in previous logic:
* phi user of @llvm.amdgcn.implicit.offset call is not handled.
* post-order collecting load's defs is wrong, producing wrong order in `PtrUses`.
Copy link
Contributor

@YuriPlyakhin YuriPlyakhin left a comment

Choose a reason for hiding this comment

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

LGTM, few nits to consider.

@@ -0,0 +1,45 @@
; RUN: opt -bugpoint-enable-legacy-pm -globaloffset %s -S -o - | FileCheck %s

; Check that phi is correctly handled in load's defs collection.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit:
would it make sense to add test, where result of load is used? What would happen with those uses?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nit: would it make sense to add test, where result of load is used? What would happen with those uses?

done, updated the test to have detailed check, thanks

@wenju-he
Copy link
Contributor Author

@intel/llvm-gatekeepers please merge, thanks

@bader bader merged commit 30e1d2f into intel:sycl Oct 23, 2025
46 of 47 checks passed
@wenju-he wenju-he deleted the GlobalOffset-phi branch October 23, 2025 02:19
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.

3 participants