[PATCH] D90554: [CostModel] remove cost-kind predicate for intrinsics in basic TTI implementation

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 19 18:38:17 PST 2020


MaskRay added a comment.

In D90554#2406927 <https://reviews.llvm.org/D90554#2406927>, @brooksmoses wrote:

> As a heads-up: This is causing a lot of Clang segfaults in Google's builds with sanitizers enabled.  We're working work on a reduced testcase, but wanted to let you know while we do that.

`opt -O2 < a.ll` on the following IR triggers an assertion failure:

  616│ FixedVectorType *FixedVectorType::get(Type *ElementType, unsigned NumElts) {
  617│   assert(NumElts > 0 && "#Elements of a VectorType must be greater than 0");
  ////////////////// ElementType is MetadataTy, not Integer/FloatingPoint/Pointer
  618│   assert(isValidElementType(ElementType) && "Element type of a VectorType must " 
  619│                                             "be an integer, floating point, or "
  620│                                             "pointer type.");



  target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
  target triple = "x86_64-unknown-linux-gnu"
  
  define void @wombat() {
  bb:
    call void @baz()
    ret void
  }
  
  define dso_local void @baz() {
  bb:
    %tmp = call <2 x double> @llvm.experimental.constrained.fadd.v2f64(<2 x double> undef, <2 x double> undef, metadata !"round.dynamic", metadata !"fpexcept.ignore")
    ret void
  }
  
  ; Function Attrs: inaccessiblememonly nofree nosync nounwind willreturn
  declare <2 x double> @llvm.experimental.constrained.fadd.v2f64(<2 x double>, <2 x double>, metadata, metadata) #0
  
  attributes #0 = { inaccessiblememonly nofree nosync nounwind willreturn }


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90554



More information about the llvm-commits mailing list