Add x86 SIMD floating-point negation

This commit is contained in:
Andrew Brown
2019-11-11 11:01:35 -08:00
parent cd4d7ca0a1
commit 6519a43b08
3 changed files with 39 additions and 1 deletions

View File

@@ -34,3 +34,18 @@ ebb0:
return
}
function %fneg_legalized() {
ebb0:
v0 = vconst.f32x4 [0x1.0 0x2.0 0x3.0 0x4.0]
v1 = fneg v0
; check: v4 = vconst.f32x4 0x00
; nextln: v1 = fsub v4, v0
v2 = vconst.f64x2 [0x1.0 0x2.0]
v3 = fneg v2
; check: v5 = vconst.f64x2 0x00
; nextln: v3 = fsub v5, v2
return
}

View File

@@ -214,7 +214,6 @@ ebb0:
}
; run
function %fmin_f64x2() -> b1 {
ebb0:
v0 = vconst.f64x2 [-0x1.0 -0x1.0]
@@ -227,3 +226,16 @@ ebb0:
return v4
}
; run
function %fneg_f64x2() -> b1 {
ebb0:
v0 = vconst.f64x2 [0x1.0 -0x1.0]
v1 = fneg v0
v2 = vconst.f64x2 [-0x1.0 0x1.0]
v3 = fcmp eq v1, v2
v4 = vall_true v3
return v4
}
; run