Переглянути джерело

- rm the OP_IMUL to SHL optimization from tcgx86.a_op_const_reg and tcgx86.a_op_const_ref, because it's already done in optimize_op_const, which is called in the beginning of both methods.

git-svn-id: trunk@26491 -
nickysn 11 роки тому
батько
коміт
820b667e1b
1 змінених файлів з 0 додано та 14 видалено
  1. 0 14
      compiler/x86/cgx86.pas

+ 0 - 14
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)