Skip to content

Commit 9eea28d

Browse files
Fix for top-of-tree LLVM
The wasm backend should no longer specialize llvm.wasm.sub.sat* intrinsics, see llvm/llvm-project#109405
1 parent 53124cd commit 9eea28d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/CodeGen_WebAssembly.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,13 @@ const WasmIntrinsic intrinsic_defs[] = {
6565
{"llvm.sadd.sat.v16i8", Int(8, 16), "saturating_add", {Int(8, 16), Int(8, 16)}, Target::WasmSimd128},
6666
{"llvm.uadd.sat.v16i8", UInt(8, 16), "saturating_add", {UInt(8, 16), UInt(8, 16)}, Target::WasmSimd128},
6767

68+
#if LLVM_VERSION < 200
6869
// TODO: Are these really different than the standard llvm.*sub.sat.*?
6970
{"llvm.wasm.sub.sat.signed.v16i8", Int(8, 16), "saturating_sub", {Int(8, 16), Int(8, 16)}, Target::WasmSimd128},
7071
{"llvm.wasm.sub.sat.unsigned.v16i8", UInt(8, 16), "saturating_sub", {UInt(8, 16), UInt(8, 16)}, Target::WasmSimd128},
7172
{"llvm.wasm.sub.sat.signed.v8i16", Int(16, 8), "saturating_sub", {Int(16, 8), Int(16, 8)}, Target::WasmSimd128},
7273
{"llvm.wasm.sub.sat.unsigned.v8i16", UInt(16, 8), "saturating_sub", {UInt(16, 8), UInt(16, 8)}, Target::WasmSimd128},
74+
#endif
7375

7476
{"llvm.wasm.avgr.unsigned.v16i8", UInt(8, 16), "rounding_halving_add", {UInt(8, 16), UInt(8, 16)}, Target::WasmSimd128},
7577
{"llvm.wasm.avgr.unsigned.v8i16", UInt(16, 8), "rounding_halving_add", {UInt(16, 8), UInt(16, 8)}, Target::WasmSimd128},

0 commit comments

Comments
 (0)