[PATCH] D148803: [ConstantFolding] Fix crash when folding vector llvm.is.fpclass

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 21 00:53:00 PDT 2023


mstorsjo added a comment.

I've bisected a failed assert to this commit. Repro:

  $ cat repro.c 
  int a;
  float *b;
  float c;
  void d() {
    float *e = d;
    for (int f = 0; f < a; f++) {
      c = b[f];
      e[f] = 10.f * c;
      if (__builtin_isnormal(e[f]))
        e[f] = 351.f;
    }
  }
  $ clang -target aarch64-linux-gnu -c repro.c -O2
  clang: ../lib/IR/Instructions.cpp:652: void llvm::CallInst::init(llvm::FunctionType*, llvm::Value*, llvm::ArrayRef<llvm::Value*>, llvm::ArrayRef<llvm::OperandBundleDefT<llvm::Value*> >, const llvm::Twine&): Assertion `(i >= FTy->getNumParams() || FTy->getParamType(i) == Args[i]->getType()) && "Calling a function with a bad signature!"' failed.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148803/new/

https://reviews.llvm.org/D148803



More information about the llvm-commits mailing list