[all-commits] [llvm/llvm-project] 74ddac: [Clang] Ensure vector predication loop metadata is...

Michael Kruse via All-commits all-commits at lists.llvm.org
Sat Feb 13 15:36:46 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 74ddacd30de54e19b28218bc8563bd0f34f32cad
      https://github.com/llvm/llvm-project/commit/74ddacd30de54e19b28218bc8563bd0f34f32cad
  Author: Malhar <malhar.jajoo at arm.com>
  Date:   2021-02-13 (Sat, 13 Feb 2021)

  Changed paths:
    M clang/lib/CodeGen/CGLoopInfo.cpp
    M clang/test/CodeGenCXX/pragma-loop-predicate.cpp

  Log Message:
  -----------
  [Clang] Ensure vector predication loop metadata is always emitted when pragma is specified.

This patch ensures that vector predication and vectorization width
pragmas work together correctly/as expected. Specifically, this patch
fixes the issue that when vectorization_width > 1, the vector
predication behaviour (this would matter if it has NOT been disabled
explicitly by a pragma) was getting ignored, which was incorrect.

The fix here removes the dependence of vector predication on the
vectorization width. The loop metadata corresponding to clang loop
pragma vectorize_predicate is always emitted, if the pragma is
specified, even if vectorization is disabled by vectorize_width(1)
or vectorize(disable) since the option is also used for interleaving
by the LoopVectorize pass.

Reviewed By: dmgreen, Meinersbur

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




More information about the All-commits mailing list