diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/wasm/literal.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/wasm/literal.cpp b/src/wasm/literal.cpp index e332db305..e8641cbd7 100644 --- a/src/wasm/literal.cpp +++ b/src/wasm/literal.cpp @@ -1834,7 +1834,10 @@ Literal Literal::replaceLaneI64x2(const Literal& other, uint8_t index) const { return replace<2, &Literal::getLanesI64x2>(*this, other, index); } Literal Literal::replaceLaneF16x8(const Literal& other, uint8_t index) const { - return replace<8, &Literal::getLanesF16x8>( + // For F16 lane replacement we do not need to convert all the values to F32, + // instead keep the lanes as I32, and just replace the one lane with the + // integer value of the F32. + return replace<8, &Literal::getLanesUI16x8>( *this, other.convertF32ToF16(), index); } Literal Literal::replaceLaneF32x4(const Literal& other, uint8_t index) const { |