GBE: fix a Q64 spilling bug in non-simd8 mode.
authorZhigang Gong <zhigang.gong@intel.com>
Thu, 17 Apr 2014 09:41:58 +0000 (17:41 +0800)
committerZhigang Gong <zhigang.gong@gmail.com>
Fri, 18 Apr 2014 09:43:56 +0000 (17:43 +0800)
For simd16 mode, the payload need to have 2 GRFs not the hard coded 1 GRF.
This patch fixes the corresponding regression on piglit.

Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
Reviewed-by: "Song, Ruiling" <ruiling.song@intel.com>
backend/src/backend/gen_insn_selection.cpp

index f7f438e..72a8549 100644 (file)
@@ -725,7 +725,7 @@ namespace gbe
              && selReg.physical == 0) {
             ir::RegisterFamily family = getRegisterFamily(reg);
             if(family == ir::FAMILY_QWORD && poolOffset == 1) {
-              poolOffset += 1; // qword register fill could not share the scratch read message payload register
+              poolOffset += simdWidth / 8; // qword register fill could not share the scratch read message payload register
             }
             struct RegSlot regSlot(reg, srcID, poolOffset,
                                    it->second.isTmpReg,
@@ -786,7 +786,7 @@ namespace gbe
              && selReg.physical == 0) {
             ir::RegisterFamily family = getRegisterFamily(reg);
             if(family == ir::FAMILY_QWORD && poolOffset == 1) {
-              poolOffset += 1; // qword register spill could not share the scratch write message payload register
+              poolOffset += simdWidth / 8; // qword register spill could not share the scratch write message payload register
             }
             struct RegSlot regSlot(reg, dstID, poolOffset,
                                    it->second.isTmpReg,