Cranelift: fix filetest now failing after merge to main. (#4120)

This test was added between the last CI run on #4088 and its merge to
main, and the changes in #4088 (use of constants directly in instruction
via load from constant pool, rather than from a register initialized by
a separate instruction) cause it to fail now.

This PR alters the test to be invariant to regalloc and argument
decisions during lowering, as the test is really checking (per the
comment) that we get two cmoves without an intervening move. As such, it
just matches the instruction opcodes, irrespective of the arguments.
This commit is contained in:
Chris Fallin
2022-05-10 10:56:54 -07:00
committed by GitHub
parent c766c432b5
commit 67eb161d04

View File

@@ -9,8 +9,8 @@ block0(v0: f32, v1: f32):
v3 = iconst.i32 1
v4 = iconst.i32 0
v5 = select v2, v3, v4
; check: ucomiss %xmm0, %xmm1
; nextln: cmovnzl %r8d, %eax, %eax
; nextln: cmovpl %r8d, %eax, %eax
; check: ucomiss
; nextln: cmovnzl
; nextln: cmovpl
return v5
}