Stream: git-cranelift

Topic: cranelift / Issue #802 Implement SIMD [was: verifier erro...


view this post on Zulip GitHub (Feb 28 2020 at 23:26):

alexcrichton transferred Issue #802:

$ cat x.clif

target x86_64 haswell

function %vector_split_args(i32x2) -> i32x2 fast {
ebb0(v0: i32x2):
    v1 = bxor v0, v0
    return v1
}

$ cranelift/target/debug/clif-util compile -d x.clif

function %vector_split_arg(i32 [%rdi], i32 [%rsi]) -> i32 [%rax], i32 [%rdx] fast {
                                ebb0(v2: i32, v3: i32):
[-]                                 v0 = vconcat v2, v3
                                    v4, v5 = isplit v0
                                    v6, v7 = isplit v0
                                    v10, v11 = isplit v4
                                    v12, v13 = isplit v6
                                    v14 = bxor v10, v12
                                    v15 = bxor v11, v13
                                    v8 = iconcat v14, v15
                                    v16, v17 = isplit v5
                                    v18, v19 = isplit v7
                                    v20 = bxor v16, v18
                                    v21 = bxor v17, v19
                                    v9 = iconcat v20, v21
[-]                                 v1 = iconcat v8, v9
                                    v22, v23 = vsplit v1
[Op1ret#c3]                         return v22, v23
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
; error: inst1: v22 is a ghost value used by a real [Op1ret#c3] instruction

}

; 1 verifier error detected (see above). Compilation aborted.

It looks like vsplit/vconcat are inserted as part of ABI legalization? Are they supposed to be subsequently legalized into something else?

If you use "target arm" it also fails but there is no vsplit of v1, it just attempts to "return v1" and that fails with "Return must have an encoding".


Last updated: Dec 23 2024 at 13:07 UTC