Mesa (master): gallium/radeon: fix argument type of llvm.{cttz, ctlz}.i32 intrinsics

Nicolai Hähnle nh at kemper.freedesktop.org
Tue Oct 4 14:40:40 UTC 2016


Module: Mesa
Branch: master
Commit: 1e9476e8c565d0fda26413f17a411ed35d9ce67d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1e9476e8c565d0fda26413f17a411ed35d9ce67d

Author: Nicolai Hähnle <nicolai.haehnle at amd.com>
Date:   Thu Sep 29 14:55:51 2016 +0200

gallium/radeon: fix argument type of llvm.{cttz,ctlz}.i32 intrinsics

Caught by R600_DEBUG=checkir (next commit).

Reviewed-by: Marek Olšák <marek.olsak at amd.com>

---

 src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c b/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
index 6a10af3..80e9707 100644
--- a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
+++ b/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
@@ -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 =




More information about the mesa-commit mailing list