<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] product of two extended halves of vectors should generate extmul_low/high"
href="https://bugs.llvm.org/show_bug.cgi?id=50806">50806</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[SIMD] product of two extended halves of vectors should generate extmul_low/high
</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>Here are some examples (or on Compiler Explorer:
<a href="https://godbolt.org/z/Ynnhz8srj">https://godbolt.org/z/Ynnhz8srj</a>):
#include <stdint.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)));
typedef uint8_t u8x16 __attribute__((__vector_size__(16)));
typedef uint16_t u16x8 __attribute__((__vector_size__(16)));
typedef uint32_t u32x4 __attribute__((__vector_size__(16)));
typedef uint64_t u64x2 __attribute__((__vector_size__(16)));
i16x8
i8x16_extmul_low(i8x16 a, i8x16 b) {
return
__builtin_convertvector(
__builtin_shufflevector(a, a, 0, 1, 2, 3, 4, 5, 6, 7),
__typeof__(int16_t __attribute__((__vector_size__(16))))
)
*
__builtin_convertvector(
__builtin_shufflevector(b, b, 0, 1, 2, 3, 4, 5, 6, 7),
__typeof__(int16_t __attribute__((__vector_size__(16))))
);
}
i32x4
i16x8_extmul_low(i16x8 a, i16x8 b) {
return
__builtin_convertvector(
__builtin_shufflevector(a, a, 0, 1, 2, 3),
__typeof__(int32_t __attribute__((__vector_size__(16))))
)
*
__builtin_convertvector(
__builtin_shufflevector(b, b, 0, 1, 2, 3),
__typeof__(int32_t __attribute__((__vector_size__(16))))
);
}
i64x2
i32x4_extmul_low(i32x4 a, i32x4 b) {
return
__builtin_convertvector(
__builtin_shufflevector(a, a, 0, 1),
__typeof__(int64_t __attribute__((__vector_size__(16))))
)
*
__builtin_convertvector(
__builtin_shufflevector(b, b, 0, 1),
__typeof__(int64_t __attribute__((__vector_size__(16))))
);
}
i16x8
i8x16_extmul_high(i8x16 a, i8x16 b) {
return
__builtin_convertvector(
__builtin_shufflevector(a, a, 8, 9, 10, 11, 12, 13, 14, 15),
__typeof__(int16_t __attribute__((__vector_size__(16))))
)
*
__builtin_convertvector(
__builtin_shufflevector(b, b, 8, 9, 10, 11, 12, 13, 14, 15),
__typeof__(int16_t __attribute__((__vector_size__(16))))
);
}
i32x4
i16x8_extmul_high(i16x8 a, i16x8 b) {
return
__builtin_convertvector(
__builtin_shufflevector(a, a, 4, 5, 6, 7),
__typeof__(int32_t __attribute__((__vector_size__(16))))
)
*
__builtin_convertvector(
__builtin_shufflevector(b, b, 4, 5, 6, 7),
__typeof__(int32_t __attribute__((__vector_size__(16))))
);
}
i64x2
i32x4_extmul_high(i32x4 a, i32x4 b) {
return
__builtin_convertvector(
__builtin_shufflevector(a, a, 2, 3),
__typeof__(int64_t __attribute__((__vector_size__(16))))
)
*
__builtin_convertvector(
__builtin_shufflevector(b, b, 2, 3),
__typeof__(int64_t __attribute__((__vector_size__(16))))
);
}
u16x8
u8x16_extmul_low(u8x16 a, u8x16 b) {
return
__builtin_convertvector(
__builtin_shufflevector(a, a, 0, 1, 2, 3, 4, 5, 6, 7),
__typeof__(uint16_t __attribute__((__vector_size__(16))))
)
*
__builtin_convertvector(
__builtin_shufflevector(b, b, 0, 1, 2, 3, 4, 5, 6, 7),
__typeof__(uint16_t __attribute__((__vector_size__(16))))
);
}
u32x4
u16x8_extmul_low(u16x8 a, u16x8 b) {
return
__builtin_convertvector(
__builtin_shufflevector(a, a, 0, 1, 2, 3),
__typeof__(uint32_t __attribute__((__vector_size__(16))))
)
*
__builtin_convertvector(
__builtin_shufflevector(b, b, 0, 1, 2, 3),
__typeof__(uint32_t __attribute__((__vector_size__(16))))
);
}
u64x2
u32x4_extmul_low(u32x4 a, u32x4 b) {
return
__builtin_convertvector(
__builtin_shufflevector(a, a, 0, 1),
__typeof__(uint64_t __attribute__((__vector_size__(16))))
)
*
__builtin_convertvector(
__builtin_shufflevector(b, b, 0, 1),
__typeof__(uint64_t __attribute__((__vector_size__(16))))
);
}
u16x8
u8x16_extmul_high(u8x16 a, u8x16 b) {
return
__builtin_convertvector(
__builtin_shufflevector(a, a, 8, 9, 10, 11, 12, 13, 14, 15),
__typeof__(uint16_t __attribute__((__vector_size__(16))))
)
*
__builtin_convertvector(
__builtin_shufflevector(b, b, 8, 9, 10, 11, 12, 13, 14, 15),
__typeof__(uint16_t __attribute__((__vector_size__(16))))
);
}
u32x4
u16x8_extmul_high(u16x8 a, u16x8 b) {
return
__builtin_convertvector(
__builtin_shufflevector(a, a, 4, 5, 6, 7),
__typeof__(uint32_t __attribute__((__vector_size__(16))))
)
*
__builtin_convertvector(
__builtin_shufflevector(b, b, 4, 5, 6, 7),
__typeof__(uint32_t __attribute__((__vector_size__(16))))
);
}
u64x2
u32x4_extmul_high(u32x4 a, u32x4 b) {
return
__builtin_convertvector(
__builtin_shufflevector(a, a, 2, 3),
__typeof__(uint64_t __attribute__((__vector_size__(16))))
)
*
__builtin_convertvector(
__builtin_shufflevector(b, b, 2, 3),
__typeof__(uint64_t __attribute__((__vector_size__(16))))
);
}</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>