diff --git a/compiler/x86/cgx86.pas b/compiler/x86/cgx86.pas index ba654e699f..0debb35b86 100644 --- a/compiler/x86/cgx86.pas +++ b/compiler/x86/cgx86.pas @@ -1697,13 +1697,6 @@ unit cgx86; end; OP_MUL,OP_IMUL: begin - if not(cs_check_overflow in current_settings.localswitches) and - ispowerof2(int64(a),power) then - begin - list.concat(taicpu.op_const_reg(A_SHL,TCgSize2OpSize[size],power,reg)); - exit; - end; - if op = OP_IMUL then list.concat(taicpu.op_const_reg(A_IMUL,TCgSize2OpSize[size],a,reg)) else @@ -1832,13 +1825,6 @@ unit cgx86; End; OP_MUL,OP_IMUL: begin - if not(cs_check_overflow in current_settings.localswitches) and - ispowerof2(int64(a),power) then - begin - list.concat(taicpu.op_const_ref(A_SHL,TCgSize2OpSize[size], - power,tmpref)); - exit; - end; { can't multiply a memory location directly with a constant } if op = OP_IMUL then inherited a_op_const_ref(list,op,size,a,tmpref)