util: Move util_is_power_of_two to bitscan.h and rename to util_is_power_of_two_or_zero
[mesa.git] / src / gallium / drivers / radeonsi / si_shader_tgsi_setup.c
index 90cc2e0d98196a387f3728559c0b33ee94ac022b..79fdebe8388404155ffb73e415ee98a4a0e535f9 100644 (file)
@@ -192,7 +192,7 @@ LLVMValueRef si_llvm_bound_index(struct si_shader_context *ctx,
        LLVMValueRef c_max = LLVMConstInt(ctx->i32, num - 1, 0);
        LLVMValueRef cc;
 
-       if (util_is_power_of_two(num)) {
+       if (util_is_power_of_two_or_zero(num)) {
                index = LLVMBuildAnd(builder, index, c_max, "");
        } else {
                /* In theory, this MAX pattern should result in code that is