mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-27 15:41:46 +00:00
[WebAssembly] Fix argument types in SIMD narrowing intrinsics
The builtins were updated to take signed parameters in 627a526955
, but the
intrinsics that use those builtins were not updated as well. The intrinsic test
did not catch this sign mismatch because it is only reported as an error under
-fno-lax-vector-conversions.
This commit fixes the type mismatch and adds -fno-lax-vector-conversions to the
test to catch similar problems in the future.
Differential Revision: https://reviews.llvm.org/D101979
This commit is contained in:
parent
f0adf3a24c
commit
b198b9b897
@ -1197,8 +1197,8 @@ wasm_i8x16_narrow_i16x8(v128_t __a, v128_t __b) {
|
||||
|
||||
static __inline__ v128_t __DEFAULT_FN_ATTRS
|
||||
wasm_u8x16_narrow_i16x8(v128_t __a, v128_t __b) {
|
||||
return (v128_t)__builtin_wasm_narrow_u_i8x16_i16x8((__u16x8)__a,
|
||||
(__u16x8)__b);
|
||||
return (v128_t)__builtin_wasm_narrow_u_i8x16_i16x8((__i16x8)__a,
|
||||
(__i16x8)__b);
|
||||
}
|
||||
|
||||
static __inline__ v128_t __DEFAULT_FN_ATTRS
|
||||
@ -1209,8 +1209,8 @@ wasm_i16x8_narrow_i32x4(v128_t __a, v128_t __b) {
|
||||
|
||||
static __inline__ v128_t __DEFAULT_FN_ATTRS
|
||||
wasm_u16x8_narrow_i32x4(v128_t __a, v128_t __b) {
|
||||
return (v128_t)__builtin_wasm_narrow_u_i16x8_i32x4((__u32x4)__a,
|
||||
(__u32x4)__b);
|
||||
return (v128_t)__builtin_wasm_narrow_u_i16x8_i32x4((__i32x4)__a,
|
||||
(__i32x4)__b);
|
||||
}
|
||||
|
||||
static __inline__ v128_t __DEFAULT_FN_ATTRS
|
||||
|
@ -1,7 +1,7 @@
|
||||
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --force-update
|
||||
// REQUIRES: webassembly-registered-target, asserts
|
||||
|
||||
// RUN: %clang %s -O2 -emit-llvm -S -o - -target wasm32-unknown-unknown -msimd128 -Wcast-qual -Werror | FileCheck %s
|
||||
// RUN: %clang %s -O2 -emit-llvm -S -o - -target wasm32-unknown-unknown -msimd128 -Wcast-qual -fno-lax-vector-conversions -Werror | FileCheck %s
|
||||
|
||||
#include <wasm_simd128.h>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user