[all-commits] [llvm/llvm-project] e8bf01: [LV] Emit better debug and opt-report messages whe...

Tibor Győri via All-commits all-commits at lists.llvm.org
Tue Dec 2 03:47:04 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e8bf01108589be73f4057fe285cd7e04b4143f4a
      https://github.com/llvm/llvm-project/commit/e8bf01108589be73f4057fe285cd7e04b4143f4a
  Author: Tibor Győri <tibor.gyori at chem.u-szeged.hu>
  Date:   2025-12-02 (Tue, 02 Dec 2025)

  Changed paths:
    M llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h
    M llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
    A llvm/test/Transforms/LoopVectorize/diag-disabled-vectorization-msgs.ll

  Log Message:
  -----------
  [LV] Emit better debug and opt-report messages when vectorization is disallowed in the LoopVectorizer (#158513)

While looking into fixing #158499, I found some other cases where the
messages emitted could be improved. This PR improves both the messages
printed to the debug output and the missed-optimization messages in
cases where:

- loop vectorization is explicitly disabled
- loop vectorization is implicitly disabled by disabling all loop
transformations
- loop vectorization is set to happen only where explicitly enabled

A branch that should currently be unreachable is also added. If the
related logic ever breaks (eg. due to changes to getForce() or the
ForceKind enum) this should alert devs and users. New test cases are
also added to verify that the correct messages (and only them) are
outputted.

---------

Co-authored-by: GYT <tiborgyri at gmail.com>
Co-authored-by: Florian Hahn <flo at fhahn.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list