gallium/radeon: fix argument type of llvm.{cttz,ctlz}.i32 intrinsics
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 29 Sep 2016 12:55:51 +0000 (14:55 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Tue, 4 Oct 2016 14:39:28 +0000 (16:39 +0200)
Caught by R600_DEBUG=checkir (next commit).

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c

index 6a10af3ae4444a92fd6b08012ab7f9f4d7dd3c12..80e9707244380c0a934113edb15f69c6b4047ac3 100644 (file)
@@ -1636,7 +1636,7 @@ static void emit_lsb(const struct lp_build_tgsi_action *action,
                 *
                 * The hardware already implements the correct behavior.
                 */
-               lp_build_const_int32(gallivm, 1)
+               LLVMConstInt(LLVMInt1TypeInContext(gallivm->context), 1, 0)
        };
 
        emit_data->output[emit_data->chan] =
@@ -1655,7 +1655,7 @@ static void emit_umsb(const struct lp_build_tgsi_action *action,
        LLVMValueRef args[2] = {
                emit_data->args[0],
                /* Don't generate code for handling zero: */
-               lp_build_const_int32(gallivm, 1)
+               LLVMConstInt(LLVMInt1TypeInContext(gallivm->context), 1, 0)
        };
 
        LLVMValueRef msb =