|
|
@@ -171,15 +171,6 @@
|
|
|
right = shift_count_mask; \
|
|
|
} while (0)
|
|
|
|
|
|
-static bool
|
|
|
-is_shift_count_mask_needed(AOTCompContext *comp_ctx, LLVMValueRef left,
|
|
|
- LLVMValueRef right)
|
|
|
-{
|
|
|
- return (strcmp(comp_ctx->target_arch, "x86_64") != 0
|
|
|
- && strcmp(comp_ctx->target_arch, "i386") != 0)
|
|
|
- || (LLVMIsEfficientConstInt(left) && LLVMIsEfficientConstInt(right));
|
|
|
-}
|
|
|
-
|
|
|
/* Call llvm constrained floating-point intrinsic */
|
|
|
static LLVMValueRef
|
|
|
call_llvm_float_experimental_constrained_intrinsic(AOTCompContext *comp_ctx,
|
|
|
@@ -737,8 +728,7 @@ compile_int_shl(AOTCompContext *comp_ctx, LLVMValueRef left, LLVMValueRef right,
|
|
|
{
|
|
|
LLVMValueRef res;
|
|
|
|
|
|
- if (is_shift_count_mask_needed(comp_ctx, left, right))
|
|
|
- SHIFT_COUNT_MASK;
|
|
|
+ SHIFT_COUNT_MASK;
|
|
|
|
|
|
/* Build shl */
|
|
|
LLVM_BUILD_OP(Shl, left, right, res, "shl", NULL);
|
|
|
@@ -752,8 +742,7 @@ compile_int_shr_s(AOTCompContext *comp_ctx, LLVMValueRef left,
|
|
|
{
|
|
|
LLVMValueRef res;
|
|
|
|
|
|
- if (is_shift_count_mask_needed(comp_ctx, left, right))
|
|
|
- SHIFT_COUNT_MASK;
|
|
|
+ SHIFT_COUNT_MASK;
|
|
|
|
|
|
/* Build shl */
|
|
|
LLVM_BUILD_OP(AShr, left, right, res, "shr_s", NULL);
|
|
|
@@ -767,8 +756,7 @@ compile_int_shr_u(AOTCompContext *comp_ctx, LLVMValueRef left,
|
|
|
{
|
|
|
LLVMValueRef res;
|
|
|
|
|
|
- if (is_shift_count_mask_needed(comp_ctx, left, right))
|
|
|
- SHIFT_COUNT_MASK;
|
|
|
+ SHIFT_COUNT_MASK;
|
|
|
|
|
|
/* Build shl */
|
|
|
LLVM_BUILD_OP(LShr, left, right, res, "shr_u", NULL);
|