[PATCH] D121973: Recommit "[SLP] Fix lookahead operand reordering for splat loads."

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 23 10:53:25 PDT 2022


aeubanks added a comment.

One more crash:

  $ cat /tmp/a.ll
  target triple = "x86_64-pc-windows-msvc19.16.0"
  
  %class.MockPrinter = type { %"class.gfx::Size", %"class.gfx::Size" }
  %"class.gfx::Size" = type { i32, i32 }
  
  define %class.MockPrinter* @"??0MockPrinter@@QEAA at XZ"(%class.MockPrinter* %this) #0 {
  entry:
    %page_size_ = getelementptr inbounds %class.MockPrinter, %class.MockPrinter* %this, i64 0, i32 0
    %content_size_ = getelementptr inbounds %class.MockPrinter, %class.MockPrinter* %this, i64 0, i32 1
    %0 = load double, double* null, align 8
    %mul = fmul double %0, 0.000000e+00
    %conv = fptosi double %mul to i32
    %mul10 = fmul double %0, 0.000000e+00
    %conv11 = fptosi double %mul10 to i32
    %width_.i.i = getelementptr inbounds %"class.gfx::Size", %"class.gfx::Size"* %page_size_, i64 0, i32 0
    store i32 %conv11, i32* %width_.i.i, align 4
    %height_.i.i = getelementptr inbounds %"class.gfx::Size", %"class.gfx::Size"* %page_size_, i64 0, i32 1
    store i32 %conv, i32* %height_.i.i, align 4
    %mul14 = fmul double %0, 0.000000e+00
    %conv15 = fptosi double %mul14 to i32
    %mul17 = fmul double %0, 0.000000e+00
    %conv18 = fptosi double %mul17 to i32
    %width_.i.i3 = getelementptr inbounds %"class.gfx::Size", %"class.gfx::Size"* %content_size_, i64 0, i32 0
    store i32 %conv18, i32* %width_.i.i3, align 4
    %height_.i.i4 = getelementptr inbounds %"class.gfx::Size", %"class.gfx::Size"* %content_size_, i64 0, i32 1
    store i32 %conv15, i32* %height_.i.i4, align 4
    ret %class.MockPrinter* null
  }
  
  attributes #0 = { "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+sse3,+x87" }
  $ bin/opt -passes='slp-vectorizer' -disable-output /tmp/a.ll
  opt: ../../llvm/lib/Target/X86/X86TargetTransformInfo.cpp:1563: llvm::InstructionCost llvm::X86TTIImpl::getShuffleCost(TTI::ShuffleKind, llvm::VectorType *, ArrayRef<int>, int, llvm::VectorType *, ArrayRef<llvm::Value *>): Assertion `isLegalBroadcastLoad( BaseTp->getElementType(), cast<FixedVectorType>(BaseTp)->getNumElements()) && "Table entry missing from isLegalBroadcastLoad()"' failed.                                                                                                                                                                                                 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121973



More information about the llvm-commits mailing list