-
Notifications
You must be signed in to change notification settings - Fork 769
[SYCL] Fix sycl-post-link to work when a spec const is referenced twice. #1524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Value *V = CI->getArgOperand(ArgNo)->stripPointerCasts(); | ||
|
||
if (auto *L = dyn_cast<LoadInst>(V)) { | ||
// Must be a | ||
// vvvvvvvvvvvvvvvvvvvv | ||
// @.str = private unnamed_addr constant[18 x i8] | ||
// c"_ZTS11MyBoolConst\00", align 1 | ||
// @.str = private unnamed_addr constant[10 x i8] c"SpecConst\00", align 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change makes the following comment with LLVM IR invalid for types.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
@@ -427,6 +428,9 @@ int main(int argc, char **argv) { | |||
// Register required analysis | |||
MAM.registerPass([&] { return PassInstrumentationAnalysis(); }); | |||
RunSpecConst.addPass(SCP); | |||
if (!DoSplit) | |||
// This pass deletes unreachable globals. Code splitter runs it later. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be great if we add a test with spec constants handling and split both.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not really apply to this fix. But this is important missing test case - agree, so I'll add a test.
Signed-off-by: Konstantin S Bobrovsky <konstantin.s.bobrovsky@intel.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks.
…c_abi_checks * origin/sycl: [SYCL][Driver] Enforce unique filenames when -save-temps is used (intel#1545) [SYCL] [xmethods] Allow replacing xmethod script (intel#1532) [SYCL] Add tests for inline asm feature (intel#1444) [SYCL][Doc] Add device_specific_kernel_queries extension. (intel#1540) [SYCL][USM] Remove unused header and unnecessary includes (intel#1537) Fix check-llvm dependencies (intel#1547) [SYCL] Add __SYCL_EXPORT to declaration of contextSetExtendedDeleter (intel#1531) [SYCL][Doc] Add static local memory query extension. (intel#1539) [SYCL][Doc] Add sycl_bitcast extension (intel#1541) [SYCL][NFC] Temporarily disable sporadically failing test (intel#1533) [SYCL][NFC] Adjust codeowners for sycl directory (intel#1529) [SYCL] Fix processing of spec consts referenced twice (intel#1524) [SYCL] Use correct macro name in export.hpp (intel#1527) [Driver][NFC] Fix -help information for -Xs options (intel#1530) [SYCL][Doc] Add Graph Scheduler design documentation (intel#1457) [SYCL] Add diagnostics for long double in device code (intel#1512) [SYCL] Add a mutex to state-modifying program functions (intel#1204) [SYCL][Test] Add Devicelib tests (intel#1256) [SYCL] Refactor semantic checks for variable types (intel#1513)
* Implement support for @llvm.sadd.sat intrinsic. * Rename LowerSaddWithOverflow to LowerSaddIntrinsics. Original commit: KhronosGroup/SPIRV-LLVM-Translator@0af7e64
Signed-off-by: Konstantin S Bobrovsky konstantin.s.bobrovsky@intel.com