<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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 --- - AVX-512 No optimal lowering for mask_blend intrinsics."
   href="https://llvm.org/bugs/show_bug.cgi?id=31534">31534</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>AVX-512  No optimal lowering for mask_blend intrinsics.
          </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>Backend: X86
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>igor.breger@intel.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>In case mask is constant mask_blend intrinsic generate not optimal sequence.
It should generate vpblendm instruction.

__m512i test_mm512_mask_blend_epi32(__m512i __A, __m512i __W) {
  return _mm512_mask_blend_epi32(0xaaaa,__A,__W); 
}

define <8 x i64> @test_mm512_mask_blend_epi32(<8 x i64> %__A, <8 x i64> %__W)
local_unnamed_addr #0 {
entry:
  %0 = bitcast <8 x i64> %__W to <16 x i32>
  %1 = bitcast <8 x i64> %__A to <16 x i32>
  %2 = shufflevector <16 x i32> %0, <16 x i32> %1, <16 x i32> <i32 16, i32 1,
i32 18, i32 3, i32 20, i32 5, i32 22, i32 7, i32 24, i32 9, i32 26, i32 11, i32
28, i32 13, i32 30, i32 15>
  %3 = bitcast <16 x i32> %2 to <8 x i64>
  ret <8 x i64> %3
}

# BB#0:                                 # %entry
    vmovdqa32    .LCPI2_0(%rip), %zmm2 # zmm2 =
[0,17,2,19,4,21,6,23,8,25,10,27,12,29,14,31]
    vpermt2d    %zmm1, %zmm2, %zmm0
    retq
.Lfunc_end2:</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>