[all-commits] [llvm/llvm-project] 0703db: [CostModel] Fixed isExtractSubvectorMask for undef...

Tim Renouf via All-commits all-commits at lists.llvm.org
Fri Nov 8 07:41:06 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 0703db39892949ced56590a1ec8586bf20bffdb4
      https://github.com/llvm/llvm-project/commit/0703db39892949ced56590a1ec8586bf20bffdb4
  Author: Tim Renouf <tpr at botech.co.uk>
  Date:   2019-11-08 (Fri, 08 Nov 2019)

  Changed paths:
    M llvm/lib/IR/Instructions.cpp
    M llvm/test/Analysis/CostModel/X86/shuffle-extract_subvector.ll

  Log Message:
  -----------
  [CostModel] Fixed isExtractSubvectorMask for undef index off end

ShuffleVectorInst::isExtractSubvectorMask, introduced in
  [CostModel] Add SK_ExtractSubvector handling to getInstructionThroughput (PR39368)

erroneously thought that
%340 = shufflevector <4 x float> %339, <4 x float> undef, <3 x i32> <i32 2, i32 3, i32 undef>

is a subvector extract, even though it goes off the end of the parent
vector with the undef index. That then caused an assert in
BasicTTIImplBase::getExtractSubvectorOverhead.

This commit fixes that, by not considering the above a subvector
extract.

Differential Revision: https://reviews.llvm.org/D70005

Change-Id: I87b8b00b24bef19ffc9a1b82ef4eca3b8a246eaf




More information about the All-commits mailing list