[Beignet] [PATCH] do not force float for immediate value load

Guo Yejun yejun.guo at intel.com
Tue Aug 4 17:39:12 PDT 2015


float format is used to load immediate value with TYPE_U32/TYPE_S32,
actually it is not necessary since it is not a performance sensitive
point.

Signed-off-by: Guo Yejun <yejun.guo at intel.com>
---
 backend/src/backend/gen_insn_selection.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/backend/src/backend/gen_insn_selection.cpp b/backend/src/backend/gen_insn_selection.cpp
index b0ba9e3..0256d24 100644
--- a/backend/src/backend/gen_insn_selection.cpp
+++ b/backend/src/backend/gen_insn_selection.cpp
@@ -3205,8 +3205,8 @@ namespace gbe
           }
           sel.MOV(dst, imm.getIntegerValue() ? GenRegister::immuw(0xffff) : GenRegister::immuw(0));
         break;
-        case TYPE_U32:
-        case TYPE_S32:
+        case TYPE_U32: sel.MOV(dst, GenRegister::immud(imm.getIntegerValue())); break;
+        case TYPE_S32: sel.MOV(dst, GenRegister::immd(imm.getIntegerValue())); break;
         case TYPE_FLOAT:
           sel.MOV(GenRegister::retype(dst, GEN_TYPE_F),
                   GenRegister::immf(imm.asFloatValue()));
-- 
1.9.1



More information about the Beignet mailing list