r345804 - [WebAssembly] Fix type names in truncation builtins
Thomas Lively via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 31 18:03:18 PDT 2018
Author: tlively
Date: Wed Oct 31 18:03:17 2018
New Revision: 345804
URL: http://llvm.org/viewvc/llvm-project?rev=345804&view=rev
Log:
[WebAssembly] Fix type names in truncation builtins
Summary: Use the same convention as all the other WebAssembly builtin names.
Reviewers: aheejin, dschuff
Subscribers: sbc100, jgravelle-google, sunfish, kristina, cfe-commits
Differential Revision: https://reviews.llvm.org/D53724
Modified:
cfe/trunk/include/clang/Basic/BuiltinsWebAssembly.def
cfe/trunk/lib/CodeGen/CGBuiltin.cpp
cfe/trunk/test/CodeGen/builtins-wasm.c
Modified: cfe/trunk/include/clang/Basic/BuiltinsWebAssembly.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/BuiltinsWebAssembly.def?rev=345804&r1=345803&r2=345804&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/BuiltinsWebAssembly.def (original)
+++ cfe/trunk/include/clang/Basic/BuiltinsWebAssembly.def Wed Oct 31 18:03:17 2018
@@ -104,9 +104,9 @@ BUILTIN(__builtin_wasm_max_f64x2, "V2dV2
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
Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBuiltin.cpp?rev=345804&r1=345803&r2=345804&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGBuiltin.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGBuiltin.cpp Wed Oct 31 18:03:17 2018
@@ -12605,8 +12605,8 @@ Value *CodeGenFunction::EmitWebAssemblyB
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 @@ Value *CodeGenFunction::EmitWebAssemblyB
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,
Modified: cfe/trunk/test/CodeGen/builtins-wasm.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/builtins-wasm.c?rev=345804&r1=345803&r2=345804&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/builtins-wasm.c (original)
+++ cfe/trunk/test/CodeGen/builtins-wasm.c Wed Oct 31 18:03:17 2018
@@ -409,26 +409,26 @@ f64x2 sqrt_f64x2(f64x2 x) {
// 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
}
More information about the cfe-commits
mailing list