The second argument of simd_shuffle is integer, which is not the
same as the instruction type. but when we are dealing with
BinaryInstruction in instruction selection, we would call
getFloatValue() to do some imm optimization. We should
implement a separate pattern for simd shuffle. after that,
I will revert this patch.

Signed-off-by: Ruiling Song <ruiling.s...@intel.com>
---
 backend/src/ir/immediate.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/backend/src/ir/immediate.hpp b/backend/src/ir/immediate.hpp
index a25895a..3141643 100644
--- a/backend/src/ir/immediate.hpp
+++ b/backend/src/ir/immediate.hpp
@@ -209,7 +209,7 @@ namespace ir {
 
     INLINE float getFloatValue(void) const {
       // we allow bitcast from u32/s32 immediate to float
-      GBE_ASSERT(type == IMM_TYPE_FLOAT);
+      GBE_ASSERT(type == IMM_TYPE_FLOAT || type == IMM_TYPE_U32 || type == 
IMM_TYPE_S32);
       return *data.f32;
     }
 
-- 
2.3.1

_______________________________________________
Beignet mailing list
Beignet@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/beignet

Reply via email to