Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
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.
Comment Actions
Thanks! Here's an IR repro:
; RUN: opt < %s -passes=loop-vectorize -S | FileCheck %s target triple = "aarch64-unknown-linux-gnu" define void @d() { bb: br label %bb2 bb1: ret void bb2: %i = phi i64 [ 0, %bb ], [ %i7, %bb2 ] %i3 = load float, ptr null, align 4 %i4 = getelementptr float, ptr @d, i64 %i %i5 = tail call i1 @llvm.is.fpclass.f32(float 0.0, i32 0) %i6 = select i1 %i5, float 0.0, float 0.0 store float %i6, ptr %i4, align 4 %i7 = add i64 %i, 1 %i8 = icmp eq i64 %i7, 0 br i1 %i8, label %bb1, label %bb2 } declare i1 @llvm.is.fpclass.f32(float, i32 immarg)
The problem is that VPWidenCallRecipe::execute assumes that vector intrinsics are overloaded on their result type. llvm.is.fpclass is overloaded on the type of its first argument instead. I'm not sure what the best fix is. @fhahn?
Comment Actions
Thanks for the quick fix, @foad. I encountered some internal failures caused by this patch as well. While the fix is waiting for review, can we temporarily revert this patch until the fix is ready?