GBE: fix one illegal instruction when replace a uniform dst.
authorZhigang Gong <zhigang.gong@intel.com>
Thu, 29 May 2014 04:27:02 +0000 (12:27 +0800)
committerZhigang Gong <zhigang.gong@intel.com>
Thu, 29 May 2014 06:50:06 +0000 (14:50 +0800)
commitc34eba71bd5a518906d6d5d3ba26e44327cab251
tree20b30d384d734c120a96bf91cd732185376ecda6
parent06a6264e14159c9011f994213e7207a54fde0aa8
GBE: fix one illegal instruction when replace a uniform dst.

When the dst is a uniform value, we replace it with a vector value, then
copy the vector value back may generate an illegal instruction as below
at address 18:

    (14      )  mov(16)         g124<1>:F       g127.7<0,1,0>:F                 { align1 WE_all 1H };
    (16      )  send(16)        g122<1>:UW      g124<8,8,1>:UD
                data (bti: 1, rgba: 14, SIMD16, legacy, Untyped Surface Read) mlen 2 rlen 2 { align1 WE_all 1H };
    (18      )  mov(1)          g127.6<1>:F     g122<8,8,1>:F                   { align1 WE_all };

This patch could fix this issue and generate correct instruction as below:

    (      14)  mov(16)         g124<1>:UD      g127.7<0,1,0>:UD                { align1 WE_all 1H };
    (      16)  send(16)        g122<1>:UW      g124<8,8,1>:UD
                data (bti: 1, rgba: 14, SIMD16, legacy, Untyped Surface Read) mlen 2 rlen 2 { align1 WE_all 1H };
    (      18)  mov(1)          g127.6<1>:UD    g122<0,1,0>:UD                  { align1 WE_all };

Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
Reviewed-by: "Yang, Rong R" <rong.r.yang@intel.com>
backend/src/backend/gen_insn_selection.cpp