[all-commits] [llvm/llvm-project] f58930: [Mem2Reg] Don't use single store optimization for ...
Nikita Popov via All-commits
all-commits at lists.llvm.org
Thu Jul 4 05:41:35 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f58930f705884dfac3bd8c481c827d027a6068cb
https://github.com/llvm/llvm-project/commit/f58930f705884dfac3bd8c481c827d027a6068cb
Author: Nikita Popov <npopov at redhat.com>
Date: 2024-07-04 (Thu, 04 Jul 2024)
Changed paths:
M llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
M llvm/test/Transforms/Mem2Reg/single-store.ll
Log Message:
-----------
[Mem2Reg] Don't use single store optimization for potentially poison value (#97711)
If there is a single store, then loads must either load the stored value
or uninitialized memory (undef). If the stored value may be poison, then
replacing an uninitialized memory load with it would be incorrect. Fall
back to the generic code in that case.
This PR only fixes the case where there is a literal poison store -- the
case where the value is non-trivially poison will still get miscompiled
by phi simplification later, see #96631.
Fixes https://github.com/llvm/llvm-project/issues/97702.
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