[all-commits] [llvm/llvm-project] b9f108: [LoopLoadElim] Fix miscompile caused by incorrect ...

Hadong Lee via All-commits all-commits at lists.llvm.org
Tue Sep 22 01:42:50 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b9f108134ca91564e2319ad391904b46fe5af33c
      https://github.com/llvm/llvm-project/commit/b9f108134ca91564e2319ad391904b46fe5af33c
  Author: Hadong Lee <hdchris765 at snu.ac.kr>
  Date:   2026-09-22 (Tue, 22 Sep 2026)

  Changed paths:
    M llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp
    A llvm/test/Transforms/LoopLoadElim/mixed-width-clobber.ll

  Log Message:
  -----------
  [LoopLoadElim] Fix miscompile caused by incorrect store-to-load forwarding across mixed-width clobbers (#224833)

When LoopLoadElimination finds a non-forwardable Store -> Load
dependence, it currently handles it with continue and drops it entirely.
Although that store cannot provide a forwarded value itself, it may
partially clobber the value of another forwarding candidate before the
target load.

This change adds the load to LoadsWithUnsafeDependence when such a
dependence is found, preventing forwarding for that load.

The tests cover zero-distance and non-zero-distance clobbers, including
when a later full-width store overwrites the clobber.

Fixes #224832



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