-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove counter-intuitive modifications of inline attributes
- Loading branch information
1 parent
e3bdf0b
commit 226e1ef
Showing
4 changed files
with
53 additions
and
32 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,45 @@ | ||
/*========================== begin_copyright_notice ============================ | ||
Copyright (C) 2021 Intel Corporation | ||
SPDX-License-Identifier: MIT | ||
============================= end_copyright_notice ===========================*/ | ||
|
||
// RUN: IGC_CMFE_CC1_EXTRA="-O2;-disable-llvm-passes" %cmc -fcmocl -march=skl -emit-llvm -S -o %t.ll -- %s | ||
// RUN: FileCheck --input-file=%t.ll %s --check-prefixes=MODE_O2,MODE_O2_NO_NOINLINE | ||
// RUN: FileCheck --input-file=%t.ll %s --check-prefixes=MODE_O2,MODE_O2_NO_OPTNONE | ||
// MODE_O2: subgroup_8{{.*}}#[[SUBGROUP_ATTR:[0-9]+]] | ||
// MODE_O2: attributes #[[SUBGROUP_ATTR]] = { | ||
// MODE_O2_NO_NOINLINE-NOT: noinline | ||
// MODE_O2_NO_OPTNONE-NOT: optnone | ||
// MODE_O2-SAME: } | ||
|
||
// RUN: %cmc -fcmocl -march=skl -emit-llvm -S -o %t.ll -- %s | ||
// RUN: FileCheck --input-file=%t.ll %s --check-prefixes=MODE_O0,MODE_O0_NOINLINE | ||
// RUN: FileCheck --input-file=%t.ll %s --check-prefixes=MODE_O0,MODE_O0_OPTNONE | ||
// MODE_O0: subgroup_8{{.*}}#[[SUBGROUP_ATTR:[0-9]+]] | ||
// MODE_O0: attributes #[[SUBGROUP_ATTR]] = { | ||
// MODE_O0_NOINLINE-SAME: noinline | ||
// MODE_O0_OPTNONE-SAME: optnone | ||
|
||
#include <cm/cm.h> | ||
|
||
int S1(vector<int, 8> v_out) { | ||
return v_out[0]; | ||
} | ||
|
||
extern "C" _GENX_MAIN_ void subgroup_8( | ||
SurfaceIndex L [[type("buffer_t")]], | ||
SurfaceIndex R [[type("buffer_t")]], | ||
SurfaceIndex Res [[type("buffer_t")]] | ||
) { | ||
vector<int64_t, 8> l; | ||
vector<int64_t, 8> res; | ||
|
||
read(L, 0, l); | ||
res = S1(l); | ||
|
||
write(Res, 0, res); | ||
} | ||
|