mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-07-15 08:48:33 +00:00
Fix aot rotl/rotr 0 issue
This commit is contained in:
parent
db210fbc66
commit
a3f16871ed
|
@ -690,6 +690,12 @@ compile_int_rot(AOTCompContext *comp_ctx, LLVMValueRef left, LLVMValueRef right,
|
|||
LLVMValueRef bits_minus_shift_count, res, tmp_l, tmp_r;
|
||||
char *name = is_rotl ? "rotl" : "rotr";
|
||||
|
||||
/* right is 0 */
|
||||
if (LLVMIsConstant(right)
|
||||
&& (uint64)LLVMConstIntGetZExtValue(right) == 0) {
|
||||
return left;
|
||||
}
|
||||
|
||||
SHIFT_COUNT_MASK;
|
||||
|
||||
/* Calculate (bits - shif_count) */
|
||||
|
|
Loading…
Reference in New Issue
Block a user