[Beignet] [PATCH 2/2] GBE: fallback if we get a wider than i64 constant.
Zhigang Gong
zhigang.gong at intel.com
Fri Sep 5 01:34:42 PDT 2014
Signed-off-by: Zhigang Gong <zhigang.gong at intel.com>
---
backend/src/llvm/llvm_gen_backend.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/backend/src/llvm/llvm_gen_backend.cpp b/backend/src/llvm/llvm_gen_backend.cpp
index c2c60a8..e507802 100644
--- a/backend/src/llvm/llvm_gen_backend.cpp
+++ b/backend/src/llvm/llvm_gen_backend.cpp
@@ -865,6 +865,10 @@ namespace gbe
const uint64_t u64 = CI->getZExtValue();
return ctx.newImmediate(u64);
} else {
+ if (CI->getValue().getActiveBits() > 64) {
+ ctx.getUnit().setValid(false);
+ return ctx.newImmediate(uint64_t(0));
+ }
return ctx.newImmediate(uint64_t(CI->getZExtValue()));
}
}
--
1.8.3.2
More information about the Beignet
mailing list