Skip to content
This repository was archived by the owner on Sep 2, 2018. It is now read-only.
This repository was archived by the owner on Sep 2, 2018. It is now read-only.

Assertion failure: Impossible reg-to-reg copy at AVRInstrInfo.cpp:62 #172

Closed
@shepmaster

Description

@shepmaster

While attempting to compile parts of Rust's libcore:

Impossible reg-to-reg copy
UNREACHABLE executed at avr-rust/src/llvm/lib/Target/AVR/AVRInstrInfo.cpp:62!

When running llc -march=avr -mcpu=atmega328p -filetype=obj hello.ll on

; ModuleID = 'bugpoint-reduced-simplified.bc'
target datalayout = "e-p:16:8:8-i8:8:8-i16:8:8-i32:8:8-i64:8:8-f32:8:8-f64:8:8-n8"
target triple = "avr-atmel-none"

; Function Attrs: nounwind readnone
declare { i16, i1 } @llvm.umul.with.overflow.i16(i16, i16) #0

; Function Attrs: inlinehint uwtable
define void @_ZN3ops15usize.MulAssign10mul_assign20h9dc48c05c6ade4e6iRkE() unnamed_addr #1 {
entry-block:
  %0 = call { i16, i1 } @llvm.umul.with.overflow.i16(i16 undef, i16 undef)
  %1 = extractvalue { i16, i1 } %0, 1
  %2 = icmp eq i1 %1, true
  br i1 %2, label %cond, label %next

next:                                             ; preds = %entry-block
  ret void

cond:                                             ; preds = %entry-block
  unreachable
}

attributes #0 = { nounwind readnone }
attributes #1 = { inlinehint uwtable }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions