bjorn3 commented on Issue #1179:
Is this fixed with the new x64 backend?
abrown commented on Issue #1179:
This is very specific to the old backend, I vote we close it.
abrown closed Issue #1179:
It looks like our SIMD encodings waver between permitting and not permitting the REX prefix: compare uses of
enc_32_64andenc_bothin x86/encoding.rs.As a result, vector operations using
r8-r15as parts of a memory operand, orxmm8-xmm15as a register operand, get rejected when searching for encodings and, I believe, result in Cranelift not using those xmm registers entirely in some circumstances (we're missing a rex-friendlyMOVUPSencoding so I don't think we can encode a spill ofxmm8-xmm15).I ran across this trying to emit
movups xmm7, [r11]when restoring SIMD registers in Windows prologues. This currently results in a constraint violation panic when compiling. I believe this is because I specified the location after inserting the instruction, so Cranelift picked theFPR8/GPR8-constrained encoding, and I just gave it an impossible operand, whereas regalloc would have been unable to user11as an operand and forced shuffling until a fitting register were available.I'm pretty sure we can make the blanket change from
enc_32_64toenc_bothfor the region I linked above. However, I don't know themaybe_isapvariants, and I figure it'd be better to confirm this before changing stuff around.cc @abrown and @bnjbvr as people who've recently touched these things, I think?
Last updated: Dec 06 2025 at 06:05 UTC