Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Assertion failed: (!Res && "Call operand has unhandled type"), function LowerFormalArguments, file llvm/lib/Target/AArch64/AArch64ISelLowering.cpp, line 4841. #49376

Open Quuxplusone opened 3 years ago

Quuxplusone commented 3 years ago
Bugzilla Link PR50407
Status NEW
Importance P normal
Reported by Nikita Shulga (nikita.shulga@gmail.com)
Reported on 2021-05-19 12:47:05 -0700
Last modified on 2021-05-20 07:36:29 -0700
Version 12.0
Hardware Macintosh MacOS X
CC arnaud.degrandmaison@arm.com, efriedma@quicinc.com, llvm-bugs@lists.llvm.org, sander.desmalen@arm.com, smithp352@googlemail.com, Ties.Stuij@arm.com
Fixed by commit(s)
Attachments bugpoint-reduced-simplified.bc (1792 bytes, application/octet-stream)
Blocks
Blocked by
See also

Created attachment 24875 bugpoint simplified repro .bc

Noticed that clang-1205.0.22.9 crashes while compiling following snippet (reduced repro from sleefsimdsp.c):

#include <arm_sve.h>

svint32_t vreinterpret_vi2_vf(svfloat32_t vf) {
  return __builtin_sve_reinterpret_s32_f32(vf);
}

Crash also reproduces in trunk and using bugpoint can be reduced to (attached):

; ModuleID = 'bugpoint-reduced-simplified.bc'
source_filename = "bar.cpp"
target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
target triple = "arm64-apple-macosx11.0.0"

define <vscale x 4 x i32> @_Z19vreinterpret_vi2_vfu13__SVFloat32_t(<vscale x 4 x float> %vf) #0 {
entry:
  ret <vscale x 4 x i32> zeroinitializer
}

attributes #0 = { "target-features"="+neon,+sve,+zcm,+zcz" }

!llvm.ident = !{!0}

!0 = !{!"clang version 13.0.0 (https://github.com/llvm/llvm-project.git 29a50c5864ddab283c1ff38694fb5926ce37b39a)"}
Quuxplusone commented 3 years ago

Attached bugpoint-reduced-simplified.bc (1792 bytes, application/octet-stream): bugpoint simplified repro .bc

Quuxplusone commented 3 years ago

Hi Nikita, from your example I can see your target triple is "arm64-apple-macosx11.0.0", which uses a different calling convention than Linux. We've only extended the Linux calling convention to include SVE support.