<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 - [SIMD] OR reduction with !!result not recognized as v128.any_true"
   href="https://bugs.llvm.org/show_bug.cgi?id=50796">50796</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[SIMD] OR reduction with !!result not recognized as v128.any_true
          </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>Windows NT
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Backend: WebAssembly
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>clang@evan.coeusgroup.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I even tried using an OpenMP SIMD pragma to help LLVM recognized the reduction,
no luck.  Here is a quick test (CE: <a href="https://godbolt.org/z/fhMvKj6Mh">https://godbolt.org/z/fhMvKj6Mh</a>):


#include <wasm_simd128.h>

#pragma clang diagnostic ignored "-Wmissing-prototypes"

typedef int8_t i8x16 __attribute__((__vector_size__(16)));
typedef int16_t i16x8 __attribute__((__vector_size__(16)));
typedef int32_t i32x4 __attribute__((__vector_size__(16)));
typedef int64_t i64x2 __attribute__((__vector_size__(16)));

int
i8x16_any_true(i8x16 a) {
    int8_t r = 0;
    #pragma omp simd reduction(|:r)
    for (int i = 0 ; i < 16 ; i++) {
        r |= a[i];
    }
    return !!r;
}

int
i16x8_any_true(i16x8 a) {
    int16_t r = 0;
    #pragma omp simd reduction(|:r)
    for (int i = 0 ; i < 8 ; i++) {
        r |= a[i];
    }
    return !!r;
}

int
i32x4_any_true(i32x4 a) {
    int32_t r = 0;
    #pragma omp simd reduction(|:r)
    for (int i = 0 ; i < 4 ; i++) {
        r |= a[i];
    }
    return !!r;
}

int
i64x2_any_true(i64x2 a) {
    int64_t r = 0;
    #pragma omp simd reduction(|:r)
    for (int i = 0 ; i < 2 ; i++) {
        r |= a[i];
    }
    return !!r;
}

int
any_true_intrin(i8x16 a) {
    return __builtin_wasm_any_true_v128(a);
}</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>