-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
4 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/*========================== begin_copyright_notice ============================ | ||
Copyright (C) 2024 Intel Corporation | ||
SPDX-License-Identifier: MIT | ||
============================= end_copyright_notice ===========================*/ | ||
|
||
// REQUIRES: regkeys,pvc-supported,llvm-14-plus | ||
|
||
// RUN: ocloc compile -file %s -device pvc -options "-igc_opts 'PrintToConsole=1,PrintAfter=EmitPass'" 2>&1 | FileCheck %s | ||
|
||
// CHECK-NOT: phi | ||
// CHECK: [[LOAD:%.*]] = load i32, i32 addrspace(1)* [[PTR:%.*]] | ||
// CHECK: [[ADD:%.*]] = add i32 [[LOAD]], 10000 | ||
// CHECK: store i32 [[ADD]], i32 addrspace(1)* [[PTR]] | ||
|
||
kernel void test(global int* ptr) | ||
{ | ||
size_t id = get_global_id(0); | ||
int val = ptr[id]; | ||
for (int i = 0; i < 10000; i++) | ||
{ | ||
val += 1; | ||
} | ||
ptr[id] = val; | ||
} |