Make integer remainder & division arithmetic work ~ ~
authorHomer Hsing <homer.xing@intel.com>
Tue, 22 Jan 2013 02:59:37 +0000 (10:59 +0800)
committerZhigang Gong <zhigang.gong@linux.intel.com>
Wed, 10 Apr 2013 06:52:32 +0000 (14:52 +0800)
commit1ca73c508700ba064d52c1e17d077eec181bbbd6
tree0bcc1e2bf41c8d3e172587935304ecac7fe85995
parentd1d32f1c0627449a2aedd38c0c640df4307222fb
Make integer remainder & division arithmetic work ~ ~

Intel Gen7 GPU cannot do integer remainder (or division) if exec_width is 16.
But we are generating such kind of cmds, so the GPU hangs.
We need to split such command ~ ~

before:
(+f0) math intmod(16) g18<1>D g12<8,8,1>D g2.1<0,1,0>D {align1 WE_normal 1Q};

after:
(+f0) math intmod(8) g18<1>D g12<8,8,1>D g2.1<0,1,0>D {align1 WE_normal 1Q};
(+f0) math intmod(8) g19<1>D g13<8,8,1>D g2.1<0,1,0>D {align1 WE_normal 1Q};

Signed-off-by: Homer Hsing <homer.xing@intel.com>
Reviewed-by: Lu Guanqun <guanqun.lu@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
backend/src/backend/gen_encoder.cpp
backend/src/backend/gen_insn_selection.cpp