[Beignet] [PATCH 07/10] Backend: Fix workgroup instruction format predicate
grigore.lupescu at intel.com
grigore.lupescu at intel.com
Thu Mar 31 15:28:16 UTC 2016
From: Grigore Lupescu <grigore.lupescu at intel.com>
Signed-off-by: Grigore Lupescu <grigore.lupescu at intel.com>
---
backend/src/ir/instruction.cpp | 4 +++-
backend/src/libocl/src/ocl_work_group.cl | 4 ++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/backend/src/ir/instruction.cpp b/backend/src/ir/instruction.cpp
index 415c255..75e1b3b 100644
--- a/backend/src/ir/instruction.cpp
+++ b/backend/src/ir/instruction.cpp
@@ -1285,11 +1285,13 @@ namespace ir {
INLINE bool WorkGroupInstruction::wellFormed(const Function &fn, std::string &whyNot) const {
const RegisterFamily family = getFamily(this->type);
+
if (UNLIKELY(checkSpecialRegForWrite(dst[0], fn, whyNot) == false))
return false;
if (UNLIKELY(checkRegisterData(family, dst[0], fn, whyNot) == false))
return false;
- const Register src0 = fn.getRegister(src, 0);
+ /* check against the tuple source data only */
+ const Register src0 = fn.getRegister(src, 2);
if (UNLIKELY(checkRegisterData(family, src0, fn, whyNot) == false))
return false;
diff --git a/backend/src/libocl/src/ocl_work_group.cl b/backend/src/libocl/src/ocl_work_group.cl
index 5ad5a8f..2c43d6d 100644
--- a/backend/src/libocl/src/ocl_work_group.cl
+++ b/backend/src/libocl/src/ocl_work_group.cl
@@ -17,12 +17,12 @@
*/
#include "ocl_work_group.h"
-int __gen_ocl_work_group_all(int predicate);
+int __gen_ocl_work_group_all(int);
int work_group_all(int predicate) {
return __gen_ocl_work_group_all(predicate);
}
-int __gen_ocl_work_group_any(int predicate);
+int __gen_ocl_work_group_any(int);
int work_group_any(int predicate) {
return __gen_ocl_work_group_any(predicate);
}
--
2.5.0
More information about the Beignet
mailing list