Преглед на файлове

* don't insert a typeconversion from pasbool to int in case the left
location was LOC_JUMP or LOC_FLAGS, as in that case the generic
code has already done this using location_force_reg()

git-svn-id: trunk@30783 -

Jonas Maebe преди 10 години
родител
ревизия
eae68e86a1
променени са 1 файла, в които са добавени 1 реда и са изтрити 0 реда
  1. 1 0
      compiler/llvm/nllvmcnv.pas

+ 1 - 0
compiler/llvm/nllvmcnv.pas

@@ -147,6 +147,7 @@ procedure tllvmtypeconvnode.second_bool_to_int;
       on the assignment side non regable for llvm }
       on the assignment side non regable for llvm }
     if is_pasbool(left.resultdef) and
     if is_pasbool(left.resultdef) and
        (nf_explicit in flags) and
        (nf_explicit in flags) and
+       not(left.location.loc in [LOC_FLAGS,LOC_JUMP]) and
        (resultdef.size=1) then
        (resultdef.size=1) then
       case location.loc of
       case location.loc of
         LOC_REFERENCE,LOC_CREFERENCE:
         LOC_REFERENCE,LOC_CREFERENCE: