summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/builtins-wasm.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGen/builtins-wasm.c')
-rw-r--r--clang/test/CodeGen/builtins-wasm.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/clang/test/CodeGen/builtins-wasm.c b/clang/test/CodeGen/builtins-wasm.c
index f92b80700e4..0151582395f 100644
--- a/clang/test/CodeGen/builtins-wasm.c
+++ b/clang/test/CodeGen/builtins-wasm.c
@@ -276,3 +276,27 @@ int f40(i64x2 x) {
// WEBASSEMBLY: call i32 @llvm.wasm.alltrue.v2i64(<2 x i64> %x)
// WEBASSEMBLY: ret
}
+
+f32x4 f41(f32x4 x) {
+ return __builtin_wasm_abs_f32x4(x);
+ // WEBASSEMBLY: call <4 x float> @llvm.fabs.v4f32(<4 x float> %x)
+ // WEBASSEMBLY: ret
+}
+
+f64x2 f42(f64x2 x) {
+ return __builtin_wasm_abs_f64x2(x);
+ // WEBASSEMBLY: call <2 x double> @llvm.fabs.v2f64(<2 x double> %x)
+ // WEBASSEMBLY: ret
+}
+
+f32x4 f43(f32x4 x) {
+ return __builtin_wasm_sqrt_f32x4(x);
+ // WEBASSEMBLY: call <4 x float> @llvm.sqrt.v4f32(<4 x float> %x)
+ // WEBASSEMBLY: ret
+}
+
+f64x2 f44(f64x2 x) {
+ return __builtin_wasm_sqrt_f64x2(x);
+ // WEBASSEMBLY: call <2 x double> @llvm.sqrt.v2f64(<2 x double> %x)
+ // WEBASSEMBLY: ret
+}
OpenPOWER on IntegriCloud