https://bugs.llvm.org/show_bug.cgi?id=40798

            Bug ID: 40798
           Summary: GlobalISel unimplemented reg-to-reg copy assertion
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: AArch64
          Assignee: unassignedb...@nondot.org
          Reporter: sam.par...@arm.com
                CC: arnaud.degrandmai...@arm.com,
                    llvm-bugs@lists.llvm.org, peter.sm...@linaro.org,
                    ties.st...@arm.com

Created attachment 21500
  --> https://bugs.llvm.org/attachment.cgi?id=21500&action=edit
reproducer at -O0

Running llc at -O0 with the attached .ll file results in an assertion in
llvm::AArch64InstrInfo::copyPhysReg. I don't know anything about GlobalISel but
from  the debug output, I think the offending instructions are these:
  %20:_(<4 x s32>) = G_EXTRACT %19:_(s384), 0                                   
  %21:_(<4 x s32>) = G_EXTRACT %19:_(s384), 128                                 
  %22:_(<4 x s32>) = G_EXTRACT %19:_(s384), 256

Which get legalised into:
  %20:fpr(<4 x s32>) = G_BUILD_VECTOR %189:gpr(s64), %191:gpr(s64)
  %21:fpr(<4 x s32>) = G_BUILD_VECTOR %179:gpr(s64), %181:gpr(s64)              
  %22:fpr(<4 x s32>) = G_BUILD_VECTOR %169:gpr(s64), %171:gpr(s64)

Which I believe is incorrect because of the type mismatch between the scalars
and the elements of the resulting vector.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to