[all-commits] [llvm/llvm-project] 6136f9: [SLP][NFC] Test for a follow-up fix of the the vec...

vporpo via All-commits all-commits at lists.llvm.org
Thu Feb 24 18:29:26 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6136f97c69ad06718fc2c335b94ed5abbcb4bb9c
      https://github.com/llvm/llvm-project/commit/6136f97c69ad06718fc2c335b94ed5abbcb4bb9c
  Author: Vasileios Porpodas <vporpodas at google.com>
  Date:   2022-02-24 (Thu, 24 Feb 2022)

  Changed paths:
    A llvm/test/Transforms/SLPVectorizer/X86/arith-max-cost.ll

  Log Message:
  -----------
  [SLP][NFC] Test for a follow-up fix of the the vector min/max instrinsic cost calculation.

The code in this test should not have been vectorized.
It looks worse than the scalar code.

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


  Commit: 4bbc3290a25c0dc26007912a96e0f77b2092ee56
      https://github.com/llvm/llvm-project/commit/4bbc3290a25c0dc26007912a96e0f77b2092ee56
  Author: Vasileios Porpodas <vporpodas at google.com>
  Date:   2022-02-24 (Thu, 24 Feb 2022)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
    M llvm/test/Transforms/SLPVectorizer/X86/arith-max-cost.ll

  Log Message:
  -----------
  [SLP] Fix for the min/max intrinsic cost.

The min/max intrinsic cost is currently too low because in the cost calculation
we subtract the cost of the vector compare as we will not emit it.
For the cost of the vector compare we are currently passing BAD_ICMP_PREDICATE
which returns 3, the worst case cost.
I think we should be passing VecPred instead, since we know the predicates of
the compare instr.

I think this is related to commit b3b993a7ad817 which introduced the predicate
argument to getCmpSelInstrCost().
https://reviews.llvm.org/rGb3b993a7ad817c3c5801341fa78f34332900eb83

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


Compare: https://github.com/llvm/llvm-project/compare/f37d21ed20fb...4bbc3290a25c


More information about the All-commits mailing list