Skip to content

Commit dded336

Browse files
authored
[simd] Remove unused template params (#1700)
Also remove an unused transform, we are applying the unop f in the for loop directly after it.
1 parent dc91af6 commit dded336

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/interp/interp.cc

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1634,10 +1634,10 @@ RunResult Thread::StepInternal(Trap::Ptr* out_trap) {
16341634
case O::I8X16Swizzle: return DoSimdSwizzle();
16351635
case O::I8X16Shuffle: return DoSimdShuffle(instr);
16361636

1637-
case O::V128Load8Splat: return DoSimdLoadSplat<u8x16, u32>(instr, out_trap);
1638-
case O::V128Load16Splat: return DoSimdLoadSplat<u16x8, u32>(instr, out_trap);
1639-
case O::V128Load32Splat: return DoSimdLoadSplat<u32x4, u32>(instr, out_trap);
1640-
case O::V128Load64Splat: return DoSimdLoadSplat<u64x2, u64>(instr, out_trap);
1637+
case O::V128Load8Splat: return DoSimdLoadSplat<u8x16>(instr, out_trap);
1638+
case O::V128Load16Splat: return DoSimdLoadSplat<u16x8>(instr, out_trap);
1639+
case O::V128Load32Splat: return DoSimdLoadSplat<u32x4>(instr, out_trap);
1640+
case O::V128Load64Splat: return DoSimdLoadSplat<u64x2>(instr, out_trap);
16411641

16421642
case O::V128Load8Lane: return DoSimdLoadLane<u8x16>(instr, out_trap);
16431643
case O::V128Load16Lane: return DoSimdLoadLane<u16x8>(instr, out_trap);
@@ -2089,7 +2089,6 @@ RunResult Thread::DoSimdUnopZero(UnopFunc<R, T> f) {
20892089
using SR = typename Simd128<R>::Type;
20902090
auto val = Pop<ST>();
20912091
SR result;
2092-
std::transform(std::begin(val.v), std::end(val.v), std::begin(result.v), f);
20932092
for (u8 i = 0; i < ST::lanes; ++i) {
20942093
result[i] = f(val[i]);
20952094
}
@@ -2165,7 +2164,7 @@ RunResult Thread::DoSimdShift(BinopFunc<R, T> f) {
21652164
return RunResult::Ok;
21662165
}
21672166

2168-
template <typename S, typename T>
2167+
template <typename S>
21692168
RunResult Thread::DoSimdLoadSplat(Instr instr, Trap::Ptr* out_trap) {
21702169
using L = typename S::LaneType;
21712170
L val;

src/interp/interp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1150,7 +1150,7 @@ class Thread : public Object {
11501150
RunResult DoSimdBitmask();
11511151
template <typename R, typename T>
11521152
RunResult DoSimdShift(BinopFunc<R, T>);
1153-
template <typename S, typename T>
1153+
template <typename S>
11541154
RunResult DoSimdLoadSplat(Instr, Trap::Ptr* out_trap);
11551155
template <typename S>
11561156
RunResult DoSimdLoadLane(Instr, Trap::Ptr* out_trap);

0 commit comments

Comments
 (0)