Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
malfet mannequin opened this issue May 19, 2021 · 2 comments
Labels

Comments

@malfet
Copy link
Mannequin

malfet mannequin commented May 19, 2021

Bugzilla Link 50407
Version 12.0
OS MacOS X
Attachments bugpoint simplified repro .bc
CC @Arnaud-de-Grandmaison-ARM,@efriedma-quic,@sdesmalen-arm,@smithp35

Extended Description

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> @&#8203;_Z19vreinterpret_vi2_vfu13__SVFloat32_t(<vscale x 4 x float> %vf) #&#8203;0 {
entry:
  ret <vscale x 4 x i32> zeroinitializer
}

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

!llvm.ident = !{#0}

!&#8203;0 = !{!"clang version 13.0.0 (https://github.com/llvm/llvm-project.git 29a50c5864ddab283c1ff38694fb5926ce37b39a)"}

@sdesmalen-arm
Copy link
Collaborator

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.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 11, 2021
@c-rhodes
Copy link
Collaborator

Fixed in #92607: https://godbolt.org/z/o3Ta1Ybje

@c-rhodes c-rhodes marked this as a duplicate of #107527 May 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants