mirror of
https://github.com/danog/ir.git
synced 2025-01-22 05:31:32 +01:00
MOD may be converted to AND only for positive op1
This commit is contained in:
parent
5123080533
commit
5fdb89aee1
@ -868,7 +868,7 @@ binop_fp:
|
||||
op2_insn = &ctx->ir_base[insn->op2];
|
||||
if (IR_IS_CONST_REF(insn->op1)) {
|
||||
// const
|
||||
} else if (IR_IS_POWER_OF_TWO(op2_insn->val.u64)) {
|
||||
} else if (IR_IS_TYPE_UNSIGNED(insn->type) && IR_IS_POWER_OF_TWO(op2_insn->val.u64)) {
|
||||
return IR_MOD_PWR2;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user