Skip to content

"Expected SME to be available" assert fails on memcpy #144351

Open
@arsenm

Description

@arsenm

Trying to produce the simplest possible testcase that emits __arm_sc_memcpy hits an assertion: https://godbolt.org/z/89GTdMYf5

; RUN: llc -mtriple=arm64-apple-darwin < %s | FileCheck %s

@dst = global [512 x i8] zeroinitializer, align 1
@src = global [512 x i8] zeroinitializer, align 1

define void @se_memcpy(i64 noundef %n) "aarch64_pstate_sm_enabled" nounwind {
entry:
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 @dst, ptr nonnull align 1 @src, i64 %n, i1 false)
  ret void
}
Assertion failed: ((!IsStreaming || I->hasSME()) && "Expected SME to be available"), function getSubtargetImpl, file AArch64TargetMachine.cpp, line 482.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.	Program arguments: llc -o - /tmp/assert-aarch64.ll
1.	Running pass 'Pre-ISel Intrinsic Lowering' on module '/tmp/assert-aarch64.ll'.
 #0 0x00000001072fcf04 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/local/bin/llc+0x1024dcf04)
 #1 0x00000001072fb430 llvm::sys::RunSignalHandlers() (/usr/local/bin/llc+0x1024db430)
 #2 0x00000001072fd598 SignalHandler(int, __siginfo*, void*) (/usr/local/bin/llc+0x1024dd598)
 #3 0x0000000198f4ade4 (/usr/lib/system/libsystem_platform.dylib+0x180482de4)
 #4 0x0000000198f13f70 (/usr/lib/system/libsystem_pthread.dylib+0x18044bf70)
 #5 0x0000000198e20908 (/usr/lib/system/libsystem_c.dylib+0x180358908)
 #6 0x0000000198e1fc1c (/usr/lib/system/libsystem_c.dylib+0x180357c1c)
 #7 0x0000000107f1048c llvm::AArch64TargetMachine::getSubtargetImpl(llvm::Function const&) const (.cold.3) (/usr/local/bin/llc+0x1030f048c)
 #8 0x00000001051d1088 llvm::AArch64TargetMachine::getSubtargetImpl(llvm::Function const&) const (/usr/local/bin/llc+0x1003b1088)
 #9 0x00000001051d1690 llvm::AArch64TargetMachine::getTargetTransformInfo(llvm::Function const&) const (/usr/local/bin/llc+0x1003b1690)
#10 0x0000000106577ab0 llvm::TargetTransformInfoWrapperPass::getTTI(llvm::Function const&) (/usr/local/bin/llc+0x101757ab0)
#11 0x000000010690f2ac (anonymous namespace)::PreISelIntrinsicLowering::lowerIntrinsics(llvm::Module&) const (/usr/local/bin/llc+0x101aef2ac)
#12 0x0000000106910720 (anonymous namespace)::PreISelIntrinsicLoweringLegacyPass::runOnModule(llvm::Module&) (/usr/local/bin/llc+0x101af0720)

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions