[PATCH] D53724: [WebAssembly] Fix type names in truncation builtins

Thomas Lively via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 31 18:05:40 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL345804: [WebAssembly] Fix type names in truncation builtins (authored by tlively, committed by ).
Herald added a subscriber: llvm-commits.

Repository:
  rL LLVM

https://reviews.llvm.org/D53724

Files:
  cfe/trunk/include/clang/Basic/BuiltinsWebAssembly.def
  cfe/trunk/lib/CodeGen/CGBuiltin.cpp
  cfe/trunk/test/CodeGen/builtins-wasm.c


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/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
 }
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,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53724.172073.patch
Type: text/x-patch
Size: 4092 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181101/56f01e4a/attachment.bin>


More information about the llvm-commits mailing list