summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/WebAssembly
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/CodeGen/WebAssembly')
-rw-r--r--llvm/test/CodeGen/WebAssembly/simd-arith.ll6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/test/CodeGen/WebAssembly/simd-arith.ll b/llvm/test/CodeGen/WebAssembly/simd-arith.ll
index 0bda334cd98..f3e70156d8b 100644
--- a/llvm/test/CodeGen/WebAssembly/simd-arith.ll
+++ b/llvm/test/CodeGen/WebAssembly/simd-arith.ll
@@ -748,7 +748,8 @@ define <2 x i64> @bitselect_v2i64(<2 x i64> %c, <2 x i64> %v1, <2 x i64> %v2) {
; SIMD128-NEXT: f32x4.neg $push[[R:[0-9]+]]=, $0{{$}}
; SIMD128-NEXT: return $pop[[R]]{{$}}
define <4 x float> @neg_v4f32(<4 x float> %x) {
- %a = fsub <4 x float> <float 0., float 0., float 0., float 0.>, %x
+ ; nsz makes this semantically equivalent to flipping sign bit
+ %a = fsub nsz <4 x float> <float 0.0, float 0.0, float 0.0, float 0.0>, %x
ret <4 x float> %a
}
@@ -830,7 +831,8 @@ define <4 x float> @sqrt_v4f32(<4 x float> %x) {
; SIMD128-NEXT: f64x2.neg $push[[R:[0-9]+]]=, $0{{$}}
; SIMD128-NEXT: return $pop[[R]]{{$}}
define <2 x double> @neg_v2f64(<2 x double> %x) {
- %a = fsub <2 x double> <double 0., double 0.>, %x
+ ; nsz makes this semantically equivalent to flipping sign bit
+ %a = fsub nsz <2 x double> <double 0., double 0.>, %x
ret <2 x double> %a
}
OpenPOWER on IntegriCloud