x64: Ensure that constants are always 16 bytes for XmmMem (#4790)

Ensure that constants generated for the memory case of XmmMem values are always 16 bytes, ensuring that we don't accidantally perform an unaligned load.

Fixes #4761
This commit is contained in:
Trevor Elliott
2022-08-26 13:04:38 -07:00
committed by GitHub
parent 7a9078d9cc
commit ca6d648e37
5 changed files with 73 additions and 4 deletions

View File

@@ -0,0 +1,17 @@
test run
set enable_llvm_abi_extensions
target x86_64
; Regression test for unaligned loads to xmm registers when relying on automatic
; conversion to XmmMem arguments in ISLE.
; https://github.com/bytecodealliance/wasmtime/issues/4761
function %a() -> f64 {
ss0 = explicit_slot 59
block0:
v0 = f64const 0x1.d7d7d7d7d006fp984
v1 = fcopysign v0, v0
return v1
}
; run: %a() == 0x1.d7d7d7d7d006fp984