summaryrefslogtreecommitdiffstats
path: root/src/amd/common
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2019-04-01 16:18:06 +0200
committerSamuel Pitoiset <[email protected]>2019-04-01 18:53:49 +0200
commit869af0464accd04b802fd42e3118925b03b6207e (patch)
treeacecfa22e22ca8d946aa2c7c864e2f95a848eff5 /src/amd/common
parentb9d627e07650a157176f6fb4bd3c3ffef6e21357 (diff)
ac/nir: add support for nir_op_b2i8
Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/common')
-rw-r--r--src/amd/common/ac_nir_to_llvm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index 4e9af58538f..6739551ca26 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -345,6 +345,8 @@ static LLVMValueRef emit_b2i(struct ac_llvm_context *ctx,
LLVMValueRef result = LLVMBuildAnd(ctx->builder, src0, ctx->i32_1, "");
switch (bitsize) {
+ case 8:
+ return LLVMBuildTrunc(ctx->builder, result, ctx->i8, "");
case 16:
return LLVMBuildTrunc(ctx->builder, result, ctx->i16, "");
case 32:
@@ -978,6 +980,7 @@ static void visit_alu(struct ac_nir_context *ctx, const nir_alu_instr *instr)
case nir_op_f2b32:
result = emit_f2b(&ctx->ac, src[0]);
break;
+ case nir_op_b2i8:
case nir_op_b2i16:
case nir_op_b2i32:
case nir_op_b2i64: