If reg->Register.Indirect is true then the immediate is not truly a
constant LLVM expression.
There is no performance regression in using LLVMBuildBitCast, as it will
fallback to LLVMConstBitCast internally when the argument is a constant.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Zack Rusin <zackr@vmware.com>
}
if (stype == TGSI_TYPE_UNSIGNED) {
- res = LLVMConstBitCast(res, bld_base->uint_bld.vec_type);
+ res = LLVMBuildBitCast(builder, res, bld_base->uint_bld.vec_type, "");
} else if (stype == TGSI_TYPE_SIGNED) {
- res = LLVMConstBitCast(res, bld_base->int_bld.vec_type);
+ res = LLVMBuildBitCast(builder, res, bld_base->int_bld.vec_type, "");
}
return res;
}