[all-commits] [llvm/llvm-project] 7f1733: [GVN] Fix use-after-free in load PRE with select a...

Nikita Popov via All-commits all-commits at lists.llvm.org
Thu Oct 19 00:09:15 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7f1733a252cbbad74445bd54dc95aeec52bb3199
      https://github.com/llvm/llvm-project/commit/7f1733a252cbbad74445bd54dc95aeec52bb3199
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2023-10-19 (Thu, 19 Oct 2023)

  Changed paths:
    M llvm/lib/Transforms/Scalar/GVN.cpp
    A llvm/test/Transforms/GVN/pr69301.ll

  Log Message:
  -----------
  [GVN] Fix use-after-free in load PRE with select available value (#69314)

replaceValuesPerBlockEntry() only handled simple and coerced load
values, however the load may also be referenced by a select value.

Additionally, I suspect that the previous code might have been incorrect
if a load had an offset, as it always constructed the AvailableValue
from scratch.

Fixes https://github.com/llvm/llvm-project/issues/69301.




More information about the All-commits mailing list