aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/intel/compiler/brw_fs_sel_peephole.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/intel/compiler/brw_fs_sel_peephole.cpp b/src/intel/compiler/brw_fs_sel_peephole.cpp
index b36a048601f..6de5211f56d 100644
--- a/src/intel/compiler/brw_fs_sel_peephole.cpp
+++ b/src/intel/compiler/brw_fs_sel_peephole.cpp
@@ -202,9 +202,15 @@ fs_visitor::opt_peephole_sel()
ibld.MOV(src0, then_mov[i]->src[0]);
}
+ /* 64-bit immediates can't be placed in src1. */
+ fs_reg src1(else_mov[i]->src[0]);
+ if (src1.file == IMM && type_sz(src1.type) == 8) {
+ src1 = ibld.vgrf(else_mov[i]->src[0].type);
+ ibld.MOV(src1, else_mov[i]->src[0]);
+ }
+
set_predicate_inv(if_inst->predicate, if_inst->predicate_inverse,
- ibld.SEL(then_mov[i]->dst, src0,
- else_mov[i]->src[0]));
+ ibld.SEL(then_mov[i]->dst, src0, src1));
}
then_mov[i]->remove(then_block);