Skip to content

Cranelift: hit unreachable case while lowering fcvt_to_uint #4693

@elliottt

Description

@elliottt

.clif Test Case

function %f13(f32x4) -> i32x4 {                                                      
block0(v0: f32x4):                                                                   
  v1 = fcvt_to_uint.i32x4 v0                                                         
  return v1                                                                          
} 

Steps to Reproduce

Compiling this causes an unreachable case to be reached:

// Since this branch is also guarded by a check for vector types
// neither Opcode::FcvtToUint nor Opcode::FcvtToSint can reach here
// due to vector varients not existing. The first two branches will
// cover all reachable cases.
unreachable!();

Expected Results

Either an error or a successful compilation.

Actual Results

Panic

Versions and Environment

Cranelift version or commit: 0c2e049

Operating system: linux

Architecture: x86_64

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIncorrect behavior in the current implementation that needs fixingcraneliftIssues related to the Cranelift code generator

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions