Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

isplit.i128 not resolved when iconcat.i128 exists as part of a later legalized inst #1106

Closed
bjorn3 opened this issue Oct 2, 2019 · 1 comment · Fixed by #1115
Closed

Comments

@bjorn3
Copy link
Contributor

bjorn3 commented Oct 2, 2019

test compile
target x86_64

function u0:0() -> i128 system_v {
ebb0:
    v0 = iconst.i64 0
    v1 = iconst.i64 0
    v2 = iconcat v0, v1
    jump ebb5

ebb2:
    jump ebb4(v27)

ebb4(v23: i128):
    return v23

ebb5:
    v27 = bxor.i128 v2, v2
    v32 = iconst.i32 0
    brz v32, ebb2
    trap user0
}
function u0:0() -> i64 [%rax], i64 [%rdx] system_v {
                                ebb0:
[RexOp1pu_id#b8]                    v0 = iconst.i64 0
[RexOp1pu_id#b8]                    v1 = iconst.i64 0
[-]                                 v2 = iconcat v0, v1
[Op1jmpb#eb]                        jump ebb5

                                ebb2:
[-]                                 v35, v36 = isplit.i128 v27
[Op1jmpb#eb]                        jump ebb4(v35, v36)
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
; error: inst4: v35 is a ghost value used by a real [Op1jmpb#eb] instruction


                                ebb4(v33: i64, v34: i64):
[-]                                 v23 = iconcat v33, v34
[Op1ret#c3]                         return v33, v34

                                ebb5:
[RexOp1rr#8031]                     v37 = bxor.i64 v0, v0
[RexOp1rr#8031]                     v38 = bxor.i64 v1, v1
[-]                                 v27 = iconcat v37, v38
[RexOp1pu_id#b8]                    v32 = iconst.i32 0
[RexOp1tjccb#74]                    brz v32, ebb2
[Op2trap#40b]                       trap user0
}

; 1 verifier error detected (see above). Compilation aborted.
@bjorn3
Copy link
Contributor Author

bjorn3 commented Oct 2, 2019

Discovered while trying to reduce https://github.com/bjorn3/rustc_codegen_cranelift/issues/737.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant