Skip to content

ICE with simd_cast #39720

Closed
Closed
@rawrafox

Description

@rawrafox

When casting from i8x3 -> i16x3 there's an ICE on rustc 1.17.0-nightly (24a70eb59 2017-02-09)

PromoteIntegerResult #0: t35: v4i16 = sign_extend_vector_inreg t34

Do not know how to promote this operator!
UNREACHABLE executed at /Users/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-mac/build/src/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:51!

Test case: https://gist.github.com/rawrasaur/27a3e624e5a6e071bc4e9059795fd97b

It seems to trigger when the width is 3, the source is not a float, and in size is smaller than the out size. Clang handles this case fine in its __builtin_convertvector.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-SIMDArea: SIMD (Single Instruction Multiple Data)C-bugCategory: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions