x64: Fix load sinking bugs in new lowerings (#4740)
Fixes #4736 Fix lowerings that were using values as both a Reg and a RegMem, making it look like a load could be sunk while its value in a register was still being used. Also add an assert that checks that loads that are sunk are never used.
This commit is contained in:
20
cranelift/filetests/filetests/isa/x64/widen-high-bug.clif
Normal file
20
cranelift/filetests/filetests/isa/x64/widen-high-bug.clif
Normal file
@@ -0,0 +1,20 @@
|
||||
test compile precise-output
|
||||
target x86_64
|
||||
|
||||
function u0:0(i64 vmctx, i8x16) -> i16x8 fast {
|
||||
block0(v0: i64, v2: i8x16):
|
||||
v5 = load.i8x16 notrap aligned table v0+80
|
||||
v6 = uwiden_high v5
|
||||
return v6
|
||||
}
|
||||
|
||||
; pushq %rbp
|
||||
; movq %rsp, %rbp
|
||||
; block0:
|
||||
; movdqu 80(%rdi), %xmm5
|
||||
; palignr $8, %xmm5, %xmm5, %xmm5
|
||||
; pmovzxbw %xmm5, %xmm0
|
||||
; movq %rbp, %rsp
|
||||
; popq %rbp
|
||||
; ret
|
||||
|
||||
Reference in New Issue
Block a user