Loop fails to execute as many times as expected

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Medium
    • Code Generation Tools
    • CODEGEN-13507
    • C29_1.0.0.LTS
    • Hide
      C29_1.0.1.LTS*
      C29_2.0.0.STS*
      Show
      C29_1.0.1.LTS* C29_2.0.0.STS*
    • default
    • Hide
      Annotate the affected loop with the pragma:

      #pragma clang loop pipeline(disable)
      Show
      Annotate the affected loop with the pragma: #pragma clang loop pipeline(disable)

      When compiling with -O3, loops that have known trip counts may fail to execute the loop body as many times as instructed by the source code, leading to incorrect results.

      Example of a loop which may be affected:

      float *in, *out;
      for (int i = 0; i < 4; ++i) {
        out[i] = 0.0f;
        for (int height = 0; height < 7; ++height) {
          for (int width = 0; width < 6; ++width)

      {       out[i] = (out[i] + in[(((height * 24) + (i * 6)) + width)]);     }

        }
      }

            Assignee:
            TI User
            Reporter:
            TI User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Connection: Intermediate to External PROD System
                EXTSYNC-5180 - Loop fails to execute as many times...
                SYNCHRONIZED
                • Last Sync Date: