[all-commits] [llvm/llvm-project] 83ab57: [LV] Don't sink scalar instructions that may read ...

Florian Hahn via All-commits all-commits at lists.llvm.org
Mon Apr 17 01:30:42 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 83ab5708d1d00f4ec2541e960bff3b5c68001c9e
      https://github.com/llvm/llvm-project/commit/83ab5708d1d00f4ec2541e960bff3b5c68001c9e
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2023-04-17 (Mon, 17 Apr 2023)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
    M llvm/test/Transforms/LoopVectorize/if-pred-non-void.ll
    M llvm/test/Transforms/LoopVectorize/if-pred-stores.ll

  Log Message:
  -----------
  [LV] Don't sink scalar instructions that may read from memory.

The current sinking code doesn't prevent us from sinking a load past an
aliasing store. Skip sinking instructions that may read from memory to
avoid a mis-compile.

See @minimal_bit_widths_with_aliasing_store for an example where 2 loads
are sunk past aliasing stores before this fix.

Reviewed By: Ayal

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




More information about the All-commits mailing list