Skip to content

Conversation

@wenju-he
Copy link
Contributor

@wenju-he wenju-he commented Jan 12, 2026

This fixes a regression from d8ba6b5: a missed optimization when target is SPIR-V.
In SYCL early optimization pipeline, EarlyCSEPass is currently missing after SYCLLowerWGLocalMemoryPass. This PR adds it to VectorizerStartEPCallback which is the first function pass callback following AlwaysInlinerPass.

In pytorch_microbench/kernel-submit-slm-size--1 (Jira GSD-12161), adding EarlyCSEPass can eliminates %4 and replace it with %2:
store ptr addrspace(3) %2, ptr addrspace(3) @__sycl_dynamicLocalMemoryPlaceholder_GV
%4 = load ptr addrspace(3), ptr addrspace(3) @__sycl_dynamicLocalMemoryPlaceholder_GV

…owerWGLocalMemoryPass

In SYCL early optimization pipeline, EarlyCSEPass is currently missing
after SYCLLowerWGLocalMemoryPass. This PR adds it to VectorizerStartEPCallback
which is the first function pass callback following AlwaysInlinerPass.

In pytorch_microbench/kernel-submit-slm-size--1 (Jira GSD-12161),
adding EarlyCSEPass can eliminates %4 and replace it with %2:
 store ptr addrspace(3) %2, ptr addrspace(3) @__sycl_dynamicLocalMemoryPlaceholder_GV
 %4 = load ptr addrspace(3), ptr addrspace(3) @__sycl_dynamicLocalMemoryPlaceholder_GV
@wenju-he
Copy link
Contributor Author

Windows BMG fail Basic/parallel_for_range_roundup.cpp is known issue: #20827

Failed Tests (1):
  SYCL :: Basic/parallel_for_range_roundup.cpp


Testing Time: 182.63s

Total Discovered Tests: 2421
  Unsupported      : 1202 (49.65%)
  Passed           : 1208 (49.90%)
  Expectedly Failed:   10 (0.41%)
  Failed           :    1 (0.04%)

@intel/llvm-gatekeepers please merge, thanks

@uditagarwal97 uditagarwal97 merged commit bd89e79 into intel:sycl Jan 13, 2026
35 of 38 checks passed
@wenju-he wenju-he deleted the sycl-registerVectorizerStartEPCallback-EarlyCSEPass branch January 13, 2026 22:47
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.

4 participants