[all-commits] [llvm/llvm-project] 42229b: [LICM] Only create load in pre-header when promoti...
Florian Hahn via All-commits
all-commits at lists.llvm.org
Mon Apr 11 07:45:42 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 42229b96bf94ec896d5c62fa643d83ba96e86eea
https://github.com/llvm/llvm-project/commit/42229b96bf94ec896d5c62fa643d83ba96e86eea
Author: Florian Hahn <flo at fhahn.com>
Date: 2022-04-11 (Mon, 11 Apr 2022)
Changed paths:
M llvm/lib/Transforms/Scalar/LICM.cpp
M llvm/test/Transforms/LICM/scalar-promote.ll
Log Message:
-----------
[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
More information about the All-commits
mailing list