amd64: fixes lowerSqmulRoundSat (#2260)
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
This commit is contained in:
@@ -127,7 +127,7 @@ func (m *machine) lowerSqmulRoundSat(x, y, ret ssa.Value) {
|
||||
tmpX := m.copyToTmp(xx.reg())
|
||||
|
||||
m.insert(m.allocateInstr().asXmmRmR(sseOpcodePmulhrsw, yy, tmpX))
|
||||
m.insert(m.allocateInstr().asXmmRmR(sseOpcodePcmpeqd, newOperandReg(tmpX), tmp))
|
||||
m.insert(m.allocateInstr().asXmmRmR(sseOpcodePcmpeqw, newOperandReg(tmpX), tmp))
|
||||
m.insert(m.allocateInstr().asXmmRmR(sseOpcodePxor, newOperandReg(tmp), tmpX))
|
||||
|
||||
m.copyTo(tmpX, m.c.VRegOf(ret))
|
||||
|
||||
@@ -1080,3 +1080,10 @@ func Test2201(t *testing.T) {
|
||||
}
|
||||
nodiff.RequireNoDiffT(t, getWasmBinary(t, "2201"), false, false)
|
||||
}
|
||||
|
||||
func Test2260(t *testing.T) {
|
||||
if !platform.CompilerSupported() {
|
||||
return
|
||||
}
|
||||
nodiff.RequireNoDiffT(t, getWasmBinary(t, "2260"), false, false)
|
||||
}
|
||||
|
||||
BIN
internal/integration_test/fuzzcases/testdata/2260.wasm
vendored
Normal file
BIN
internal/integration_test/fuzzcases/testdata/2260.wasm
vendored
Normal file
Binary file not shown.
21
internal/integration_test/fuzzcases/testdata/2260.wat
vendored
Normal file
21
internal/integration_test/fuzzcases/testdata/2260.wat
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
(module
|
||||
(type (;0;) (func (param f64)))
|
||||
(func (;0;) (type 0) (param f64)
|
||||
(local v128 v128 v128)
|
||||
v128.const i32x4 0x8a8a8aff 0x8a8a8aaa 0xff458a8a 0x8affffff
|
||||
f32x4.ceil
|
||||
global.set 0
|
||||
global.get 0
|
||||
v128.const i32x4 0x8a8a8aff 0x8a8a8aaa 0xff458a8a 0x8affffff
|
||||
f32x4.ceil
|
||||
global.set 1
|
||||
global.get 1
|
||||
i16x8.q15mulr_sat_s
|
||||
global.set 2
|
||||
)
|
||||
(global (;0;) (mut v128) v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000)
|
||||
(global (;0;) (mut v128) v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000)
|
||||
(global (;0;) (mut v128) v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000)
|
||||
(global (;1;) (mut i32) i32.const 0)
|
||||
(export "" (func 0))
|
||||
)
|
||||
Reference in New Issue
Block a user