KhronosGroup / KhronosGroup/OpenCL-CTS

Casting gptr & lptr to a generic pointer before the comparison

Open
#1,457 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
232
Forks
235
Avg merge
8d 7h
Merged PRs (30d)
18

Description

Consider a comparison expression:
auto x = (gptr == ptr) && (lptr == ptr);
Here, gptr is a global pointer while ptr is a generic pointer and lptr is a local pointer.
This statements results in invalid SPIR-V code being generated.
For valid code, the gptr should be cast to a generic pointer before the comparison can be made. The same applies to lptr.
results[tid] = ((int*)gptr == ptr) && ((int*)lptr == ptr);

Thanks

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the global/local/generic pointer comparison shown in the issue and inspect the generated SPIR-V. Determine where comparisons involving gptr or lptr are handled; done means the equivalent comparisons produce valid SPIR-V with the required generic-pointer casts. No repository file or test path is named, so locating the relevant conformance test is part of the work.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.