Index: cfe/trunk/include/clang/Basic/BuiltinsWebAssembly.def =================================================================== --- cfe/trunk/include/clang/Basic/BuiltinsWebAssembly.def +++ cfe/trunk/include/clang/Basic/BuiltinsWebAssembly.def @@ -104,9 +104,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_i32x4_f32x4, "V4iV4f", "nc") +BUILTIN(__builtin_wasm_trunc_saturate_u_i32x4_f32x4, "V4iV4f", "nc") +BUILTIN(__builtin_wasm_trunc_saturate_s_i64x2_f64x2, "V2LLiV2d", "nc") +BUILTIN(__builtin_wasm_trunc_saturate_u_i64x2_f64x2, "V2LLiV2d", "nc") #undef BUILTIN Index: cfe/trunk/lib/CodeGen/CGBuiltin.cpp =================================================================== --- cfe/trunk/lib/CodeGen/CGBuiltin.cpp +++ cfe/trunk/lib/CodeGen/CGBuiltin.cpp @@ -12605,8 +12605,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_i32x4_f32x4: + case WebAssembly::BI__builtin_wasm_trunc_saturate_s_i64x2_f64x2: { Value *Src = EmitScalarExpr(E->getArg(0)); llvm::Type *ResT = ConvertType(E->getType()); Value *Callee = CGM.getIntrinsic(Intrinsic::wasm_trunc_saturate_signed, @@ -12617,8 +12617,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_i32x4_f32x4: + case WebAssembly::BI__builtin_wasm_trunc_saturate_u_i64x2_f64x2: { Value *Src = EmitScalarExpr(E->getArg(0)); llvm::Type *ResT = ConvertType(E->getType()); Value *Callee = CGM.getIntrinsic(Intrinsic::wasm_trunc_saturate_unsigned, Index: cfe/trunk/test/CodeGen/builtins-wasm.c =================================================================== --- cfe/trunk/test/CodeGen/builtins-wasm.c +++ cfe/trunk/test/CodeGen/builtins-wasm.c @@ -409,26 +409,26 @@ // WEBASSEMBLY: ret } -i32x4 trunc_saturate_s_v4i32_v4f32(f32x4 f) { - return __builtin_wasm_trunc_saturate_s_v4i32_v4f32(f); +i32x4 trunc_saturate_s_i32x4_f32x4(f32x4 f) { + return __builtin_wasm_trunc_saturate_s_i32x4_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_i32x4_f32x4(f32x4 f) { + return __builtin_wasm_trunc_saturate_u_i32x4_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_i64x2_f64x2(f64x2 f) { + return __builtin_wasm_trunc_saturate_s_i64x2_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_i64x2_f64x2(f64x2 f) { + return __builtin_wasm_trunc_saturate_u_i64x2_f64x2(f); // WEBASSEMBLY: call <2 x i64> @llvm.wasm.trunc.saturate.unsigned.v2i64.v2f64(<2 x double> %f) // WEBASSEMBLY-NEXT: ret }