diff options
author | Samuel Pitoiset <[email protected]> | 2018-03-02 15:01:31 +0100 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2018-03-05 11:04:32 +0100 |
commit | e8bdde228955b951fad707680fbd4a83e175f192 (patch) | |
tree | c732a1218eac32e7077d55e1ede7d0e730598e99 /src/gallium/drivers/radeonsi | |
parent | 459e33900ff7f569ecfe12bf876d2a3e77cb6747 (diff) |
ac: add ac_build_isign()
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c b/src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c index c9ebc90d915..87984934cac 100644 --- a/src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c +++ b/src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c @@ -353,15 +353,9 @@ static void emit_ssg(const struct lp_build_tgsi_action *action, LLVMValueRef cmp, val; if (emit_data->inst->Instruction.Opcode == TGSI_OPCODE_I64SSG) { - cmp = LLVMBuildICmp(builder, LLVMIntSGT, emit_data->args[0], bld_base->int64_bld.zero, ""); - val = LLVMBuildSelect(builder, cmp, bld_base->int64_bld.one, emit_data->args[0], ""); - cmp = LLVMBuildICmp(builder, LLVMIntSGE, val, bld_base->int64_bld.zero, ""); - val = LLVMBuildSelect(builder, cmp, val, LLVMConstInt(ctx->i64, -1, true), ""); + val = ac_build_isign(&ctx->ac, emit_data->args[0], 64); } else if (emit_data->inst->Instruction.Opcode == TGSI_OPCODE_ISSG) { - cmp = LLVMBuildICmp(builder, LLVMIntSGT, emit_data->args[0], ctx->i32_0, ""); - val = LLVMBuildSelect(builder, cmp, ctx->i32_1, emit_data->args[0], ""); - cmp = LLVMBuildICmp(builder, LLVMIntSGE, val, ctx->i32_0, ""); - val = LLVMBuildSelect(builder, cmp, val, LLVMConstInt(ctx->i32, -1, true), ""); + val = ac_build_isign(&ctx->ac, emit_data->args[0], 32); } else if (emit_data->inst->Instruction.Opcode == TGSI_OPCODE_DSSG) { cmp = LLVMBuildFCmp(builder, LLVMRealOGT, emit_data->args[0], bld_base->dbl_bld.zero, ""); val = LLVMBuildSelect(builder, cmp, bld_base->dbl_bld.one, emit_data->args[0], ""); |