<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [DebugInfo@O2] SLP Vectorizer drops DebugInfo"
   href="https://bugs.llvm.org/show_bug.cgi?id=46162">46162</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[DebugInfo@O2] SLP Vectorizer drops DebugInfo
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Scalar Optimizations
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>Wolfgang_Pieb@playstation.sony.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>/* Compile the following source with clang -g -O2. The SLP Vectorizer pass 
   drops location information for the local variables x1 and x2. */

typedef unsigned int U32;
typedef float F32;
extern "C" double log(float);
extern "C" double sqrt(float);

extern unsigned RandU32();

float RandF32()
{
  U32 uRand = RandU32();
  F32 fRand = ((F32)uRand / 4294967810.0f);
  return(fRand);
}

void randGauss(float work[2])
{
  float x1, x2, w;

  do {
    x1 = 2.f * RandF32() - 1.f;
    x2 = 2.f * RandF32() - 1.f;
    w = x1 * x1 + x2 * x2;
  } while ( w >= 1.f );

  w = sqrt( (-2.f * log( w ) ) / w );
  work[0] = x1 * w;
  work[1] = x2 * w;
}

/* This turns out to be a rather special case, where the same operation is
performed on 2 different local variables in a lexical block. The vectorizer
places the 2 variables in 2 different lanes of a vector register and performs
the operation on both simultaneously.
After some investigation I didn't see an obvious way to fix this. The current
compiler infrastructure seems insufficient to describe what's going on. Given
that ist's a corner case I would consider it low priority. */</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>