Skip to content
Unverified Commit 42229b96 authored by Florian Hahn's avatar Florian Hahn
Browse files

[LICM] Only create load in pre-header when promoting load.

When only a store is sunk, there is no need to create a load in the
pre-header, as the result of the load will never get used.

The dead load can can introduce UB, if the function is marked as
writeonly.

Fixes #51248.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D123473
parent 2c6217f2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment