Skip to content

UpgradeIntrinsicCall asserts on intrinsic use with wrong declared type #148776

@arsenm

Description

@arsenm

This example crashes in the autoupgrader

; RUN: llvm-as -disable-output %s

define { fp128, i32 } @misdeclared_intrinsic_crash(fp128 %a) {
  %result = call { fp128, i32 } @llvm.frexp.fp128.i32(fp128 %a)
  ret { fp128, i32 } %result
}

declare { double, i32 } @llvm.frexp.fp128.i32(double)

/Users/matt/src/llvm-project/build_rel_with_debinfo/bin/llvm-as -disable-output /Users/matt/src/llvm-project/llvm/test/Bitcode/parser-crash.ll # RUN: at line 1
+ /Users/matt/src/llvm-project/build_rel_with_debinfo/bin/llvm-as -disable-output /Users/matt/src/llvm-project/llvm/test/Bitcode/parser-crash.ll
Assertion failed: ((i >= FTy->getNumParams() || FTy->getParamType(i) == Args[i]->getType()) && "Calling a function with a bad signature!"), function init, file Instructions.cpp, line 761.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.	Program arguments: /Users/matt/src/llvm-project/build_rel_with_debinfo/bin/llvm-as -disable-output /Users/matt/src/llvm-project/llvm/test/Bitcode/parser-crash.ll
 #0 0x0000000102e48348 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/Users/matt/src/llvm-project/build_rel_with_debinfo/bin/llvm-as+0x10021c348)

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions