<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p style="margin: 0px 0px 1em; padding: 0px; border: 0px;
      font-family: Arial, "Helvetica Neue", Helvetica,
      sans-serif; font-size: 15px; font-style: normal;
      font-variant-caps: normal; font-weight: normal; font-stretch:
      inherit; line-height: inherit; vertical-align: baseline; clear:
      both; color: rgb(36, 39, 41); letter-spacing: normal; orphans:
      auto; text-align: left; text-indent: 0px; text-transform: none;
      white-space: normal; widows: auto; word-spacing: 0px;
      -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">Hi
      all,<br>
    </p>
    <p style="margin: 0px 0px 1em; padding: 0px; border: 0px;
      font-family: Arial, "Helvetica Neue", Helvetica,
      sans-serif; font-size: 15px; font-style: normal;
      font-variant-caps: normal; font-weight: normal; font-stretch:
      inherit; line-height: inherit; vertical-align: baseline; clear:
      both; color: rgb(36, 39, 41); letter-spacing: normal; orphans:
      auto; text-align: left; text-indent: 0px; text-transform: none;
      white-space: normal; widows: auto; word-spacing: 0px;
      -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">I
      am currently looking into how "#pragma omp for simd" is actually
      recognized in llvm. To my knowledge, clang will parse it and set
      metadata in IR to indicate this force-vectorization hint and later
      optimization passes would read it and vectorize the marked loop.
      Therefore, the loop should be vectorized even the compiler think
      it might not be safe to do so?</p>
    <p style="margin: 0px 0px 1em; padding: 0px; border: 0px;
      font-family: Arial, "Helvetica Neue", Helvetica,
      sans-serif; font-size: 15px; font-style: normal;
      font-variant-caps: normal; font-weight: normal; font-stretch:
      inherit; line-height: inherit; vertical-align: baseline; clear:
      both; color: rgb(36, 39, 41); letter-spacing: normal; orphans:
      auto; text-align: left; text-indent: 0px; text-transform: none;
      white-space: normal; widows: auto; word-spacing: 0px;
      -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">So
      my assumption is that such force-vectorization hints should bypass
      both the vectorization legality and cost model check. However, in
      LoopVectorize.cpp, I can't see how this is done. All loops will be
      sent to a legality check of LVL.canVectorize() and, if this
      condition does not fit, it return to false directly without
      actually reaching the vectorization stage.<span
        class="Apple-converted-space"> </span></p>
    <p style="margin: 0px 0px 1em; padding: 0px; border: 0px;
      font-family: Arial, "Helvetica Neue", Helvetica,
      sans-serif; font-size: 15px; font-style: normal;
      font-variant-caps: normal; font-weight: normal; font-stretch:
      inherit; line-height: inherit; vertical-align: baseline; clear:
      both; color: rgb(36, 39, 41); letter-spacing: normal; orphans:
      auto; text-align: left; text-indent: 0px; text-transform: none;
      white-space: normal; widows: auto; word-spacing: 0px;
      -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">Is
      there anything wrong with my assumption made on the use of
      force-vectorization hints?</p>
    <p style="margin: 0px 0px 1em; padding: 0px; border: 0px;
      font-family: Arial, "Helvetica Neue", Helvetica,
      sans-serif; font-size: 15px; font-style: normal;
      font-variant-caps: normal; font-weight: normal; font-stretch:
      inherit; line-height: inherit; vertical-align: baseline; clear:
      both; color: rgb(36, 39, 41); letter-spacing: normal; orphans:
      auto; text-align: left; text-indent: 0px; text-transform: none;
      white-space: normal; widows: auto; word-spacing: 0px;
      -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">Thanks
      in advance,</p>
    <p style="margin: 0px 0px 1em; padding: 0px; border: 0px;
      font-family: Arial, "Helvetica Neue", Helvetica,
      sans-serif; font-size: 15px; font-style: normal;
      font-variant-caps: normal; font-weight: normal; font-stretch:
      inherit; line-height: inherit; vertical-align: baseline; clear:
      both; color: rgb(36, 39, 41); letter-spacing: normal; orphans:
      auto; text-align: left; text-indent: 0px; text-transform: none;
      white-space: normal; widows: auto; word-spacing: 0px;
      -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">T<br>
    </p>
  </body>
</html>