Author: Thomas Lively Date: 2020-04-01T09:38:41-07:00 New Revision: 95fac2e46b73c67495dbdb43ef178d33281c05ec
URL: https://github.com/llvm/llvm-project/commit/95fac2e46b73c67495dbdb43ef178d33281c05ec DIFF: https://github.com/llvm/llvm-project/commit/95fac2e46b73c67495dbdb43ef178d33281c05ec.diff LOG: [WebAssembly] Rename SIMD min/max/avgr intrinsics for consistency Summary: The convention for the wasm_simd128.h intrinsics is to have the integer sign in the lane interpretation rather than as a suffix. This PR changes the names of the integer min, max, and avgr intrinsics to match this convention. Reviewers: aheejin Subscribers: dschuff, sbc100, jgravelle-google, sunfish, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D77185 Added: Modified: clang/lib/Headers/wasm_simd128.h Removed: ################################################################################ diff --git a/clang/lib/Headers/wasm_simd128.h b/clang/lib/Headers/wasm_simd128.h index 3b30ddbd527b..c2c57cadfdf2 100644 --- a/clang/lib/Headers/wasm_simd128.h +++ b/clang/lib/Headers/wasm_simd128.h @@ -650,28 +650,28 @@ static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_mul(v128_t __a, return (v128_t)((__u8x16)__a * (__u8x16)__b); } -static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_min_s(v128_t __a, - v128_t __b) { +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_min(v128_t __a, + v128_t __b) { return (v128_t)__builtin_wasm_min_s_i8x16((__i8x16)__a, (__i8x16)__b); } -static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_min_u(v128_t __a, - v128_t __b) { +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u8x16_min(v128_t __a, + v128_t __b) { return (v128_t)__builtin_wasm_min_u_i8x16((__i8x16)__a, (__i8x16)__b); } -static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_max_s(v128_t __a, - v128_t __b) { +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_max(v128_t __a, + v128_t __b) { return (v128_t)__builtin_wasm_max_s_i8x16((__i8x16)__a, (__i8x16)__b); } -static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_max_u(v128_t __a, - v128_t __b) { +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u8x16_max(v128_t __a, + v128_t __b) { return (v128_t)__builtin_wasm_max_u_i8x16((__i8x16)__a, (__i8x16)__b); } -static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_avgr_u(v128_t __a, - v128_t __b) { +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u8x16_avgr(v128_t __a, + v128_t __b) { return (v128_t)__builtin_wasm_avgr_u_i8x16((__i8x16)__a, (__i8x16)__b); } @@ -745,28 +745,28 @@ static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_mul(v128_t __a, return (v128_t)((__u16x8)__a * (__u16x8)__b); } -static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_min_s(v128_t __a, - v128_t __b) { +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_min(v128_t __a, + v128_t __b) { return (v128_t)__builtin_wasm_min_s_i16x8((__i16x8)__a, (__i16x8)__b); } -static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_min_u(v128_t __a, - v128_t __b) { +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u16x8_min(v128_t __a, + v128_t __b) { return (v128_t)__builtin_wasm_min_u_i16x8((__i16x8)__a, (__i16x8)__b); } -static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_max_s(v128_t __a, - v128_t __b) { +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_max(v128_t __a, + v128_t __b) { return (v128_t)__builtin_wasm_max_s_i16x8((__i16x8)__a, (__i16x8)__b); } -static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_max_u(v128_t __a, - v128_t __b) { +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u16x8_max(v128_t __a, + v128_t __b) { return (v128_t)__builtin_wasm_max_u_i16x8((__i16x8)__a, (__i16x8)__b); } -static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_avgr_u(v128_t __a, - v128_t __b) { +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u16x8_avgr(v128_t __a, + v128_t __b) { return (v128_t)__builtin_wasm_avgr_u_i16x8((__i16x8)__a, (__i16x8)__b); } @@ -816,23 +816,23 @@ static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_mul(v128_t __a, return (v128_t)((__u32x4)__a * (__u32x4)__b); } -static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_min_s(v128_t __a, - v128_t __b) { +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_min(v128_t __a, + v128_t __b) { return (v128_t)__builtin_wasm_min_s_i32x4((__i32x4)__a, (__i32x4)__b); } -static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_min_u(v128_t __a, - v128_t __b) { +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u32x4_min(v128_t __a, + v128_t __b) { return (v128_t)__builtin_wasm_min_u_i32x4((__i32x4)__a, (__i32x4)__b); } -static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_max_s(v128_t __a, - v128_t __b) { +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_max(v128_t __a, + v128_t __b) { return (v128_t)__builtin_wasm_max_s_i32x4((__i32x4)__a, (__i32x4)__b); } -static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_max_u(v128_t __a, - v128_t __b) { +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u32x4_max(v128_t __a, + v128_t __b) { return (v128_t)__builtin_wasm_max_u_i32x4((__i32x4)__a, (__i32x4)__b); } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits