Index: include/clang/Basic/BuiltinsWebAssembly.def =================================================================== --- include/clang/Basic/BuiltinsWebAssembly.def +++ include/clang/Basic/BuiltinsWebAssembly.def @@ -91,9 +91,9 @@ BUILTIN(__builtin_wasm_sqrt_f32x4, "V4fV4f", "nc") BUILTIN(__builtin_wasm_sqrt_f64x2, "V2dV2d", "nc") -BUILTIN(__builtin_wasm_trunc_saturate_s_v4i32_v4f32, "V4iV4f", "nc") -BUILTIN(__builtin_wasm_trunc_saturate_u_v4i32_v4f32, "V4iV4f", "nc") -BUILTIN(__builtin_wasm_trunc_saturate_s_v2i64_v2f64, "V2LLiV2d", "nc") -BUILTIN(__builtin_wasm_trunc_saturate_u_v2i64_v2f64, "V2LLiV2d", "nc") +BUILTIN(__builtin_wasm_trunc_saturate_s_f32x4, "V4iV4f", "nc") +BUILTIN(__builtin_wasm_trunc_saturate_u_f32x4, "V4iV4f", "nc") +BUILTIN(__builtin_wasm_trunc_saturate_s_f64x2, "V2LLiV2d", "nc") +BUILTIN(__builtin_wasm_trunc_saturate_u_f64x2, "V2LLiV2d", "nc") #undef BUILTIN Index: lib/CodeGen/CGBuiltin.cpp =================================================================== --- lib/CodeGen/CGBuiltin.cpp +++ lib/CodeGen/CGBuiltin.cpp @@ -12524,8 +12524,8 @@ case WebAssembly::BI__builtin_wasm_trunc_saturate_s_i32_f64: case WebAssembly::BI__builtin_wasm_trunc_saturate_s_i64_f32: case WebAssembly::BI__builtin_wasm_trunc_saturate_s_i64_f64: - case WebAssembly::BI__builtin_wasm_trunc_saturate_s_v4i32_v4f32: - case WebAssembly::BI__builtin_wasm_trunc_saturate_s_v2i64_v2f64: { + case WebAssembly::BI__builtin_wasm_trunc_saturate_s_f32x4: + case WebAssembly::BI__builtin_wasm_trunc_saturate_s_f64x2: { Value *Src = EmitScalarExpr(E->getArg(0)); llvm::Type *ResT = ConvertType(E->getType()); Value *Callee = CGM.getIntrinsic(Intrinsic::wasm_trunc_saturate_signed, @@ -12536,8 +12536,8 @@ case WebAssembly::BI__builtin_wasm_trunc_saturate_u_i32_f64: case WebAssembly::BI__builtin_wasm_trunc_saturate_u_i64_f32: case WebAssembly::BI__builtin_wasm_trunc_saturate_u_i64_f64: - case WebAssembly::BI__builtin_wasm_trunc_saturate_u_v4i32_v4f32: - case WebAssembly::BI__builtin_wasm_trunc_saturate_u_v2i64_v2f64: { + case WebAssembly::BI__builtin_wasm_trunc_saturate_u_f32x4: + case WebAssembly::BI__builtin_wasm_trunc_saturate_u_f64x2: { Value *Src = EmitScalarExpr(E->getArg(0)); llvm::Type *ResT = ConvertType(E->getType()); Value *Callee = CGM.getIntrinsic(Intrinsic::wasm_trunc_saturate_unsigned, Index: test/CodeGen/builtins-wasm.c =================================================================== --- test/CodeGen/builtins-wasm.c +++ test/CodeGen/builtins-wasm.c @@ -349,26 +349,26 @@ // WEBASSEMBLY: ret } -i32x4 trunc_saturate_s_v4i32_v4f32(f32x4 f) { - return __builtin_wasm_trunc_saturate_s_v4i32_v4f32(f); +i32x4 trunc_saturate_s_f32x4(f32x4 f) { + return __builtin_wasm_trunc_saturate_s_f32x4(f); // WEBASSEMBLY: call <4 x i32> @llvm.wasm.trunc.saturate.signed.v4i32.v4f32(<4 x float> %f) // WEBASSEMBLY-NEXT: ret } -i32x4 trunc_saturate_u_v4i32_v4f32(f32x4 f) { - return __builtin_wasm_trunc_saturate_u_v4i32_v4f32(f); +i32x4 trunc_saturate_u_f32x4(f32x4 f) { + return __builtin_wasm_trunc_saturate_u_f32x4(f); // WEBASSEMBLY: call <4 x i32> @llvm.wasm.trunc.saturate.unsigned.v4i32.v4f32(<4 x float> %f) // WEBASSEMBLY-NEXT: ret } -i64x2 trunc_saturate_s_v2i64_v2f64(f64x2 f) { - return __builtin_wasm_trunc_saturate_s_v2i64_v2f64(f); +i64x2 trunc_saturate_s_f64x2(f64x2 f) { + return __builtin_wasm_trunc_saturate_s_f64x2(f); // WEBASSEMBLY: call <2 x i64> @llvm.wasm.trunc.saturate.signed.v2i64.v2f64(<2 x double> %f) // WEBASSEMBLY-NEXT: ret } -i64x2 trunc_saturate_u_v2i64_v2f64(f64x2 f) { - return __builtin_wasm_trunc_saturate_u_v2i64_v2f64(f); +i64x2 trunc_saturate_u_f64x2(f64x2 f) { + return __builtin_wasm_trunc_saturate_u_f64x2(f); // WEBASSEMBLY: call <2 x i64> @llvm.wasm.trunc.saturate.unsigned.v2i64.v2f64(<2 x double> %f) // WEBASSEMBLY-NEXT: ret }