https://bugs.llvm.org/show_bug.cgi?id=50799
Bug ID: 50799
Summary: [SIMD] Creating a vector from dereferenced pointer and
zeros should use v128.load32/64_zero
Product: libraries
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: WebAssembly
Assignee: unassignedb...@nondot.org
Reporter: cl...@evan.coeusgroup.com
CC: llvm-bugs@lists.llvm.org
Currently the compiler will generate a scalar load and a vector replace_lane.
Example (Compiler Explorer: https://godbolt.org/z/bfv3nY6ro):
#include <stdint.h>
#pragma clang diagnostic ignored "-Wmissing-prototypes"
typedef int32_t i32x4 __attribute__((__vector_size__(16)));
typedef int64_t i64x2 __attribute__((__vector_size__(16)));
i32x4
load32_zero(const int32_t * a) {
return (i32x4) { *a, 0, 0, 0 };
}
i64x2
load64_zero(const int64_t * a) {
return (i64x2) { *a, 0 };
}
i32x4
load32_zero_intrin(const int32_t * a) {
return __builtin_wasm_load32_zero(a);
}
i64x2
load64_zero_intrin(const int64_t * a) {
return __builtin_wasm_load64_zero(a);
}
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs