[all-commits] [llvm/llvm-project] afb526: [LICM] Handle store of pointer to itself (PR54495)
Nikita Popov via All-commits
all-commits at lists.llvm.org
Tue Mar 22 06:00:30 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: afb526b3f49e06d1b72986d3bc4c5d445cfda05b
https://github.com/llvm/llvm-project/commit/afb526b3f49e06d1b72986d3bc4c5d445cfda05b
Author: Nikita Popov <npopov at redhat.com>
Date: 2022-03-22 (Tue, 22 Mar 2022)
Changed paths:
M llvm/lib/Transforms/Scalar/LICM.cpp
A llvm/test/Transforms/LICM/pr54495.ll
Log Message:
-----------
[LICM] Handle store of pointer to itself (PR54495)
Rather than iterating over users and comparing operands, iterate
over uses and check operand number. Otherwise, we'll end up
promoting a store twice if it has two equal operands.
This can only happen with opaque pointers, as otherwise both
operands differ by a level of indirection, so a bitcast would have
to be involved.
Fixes https://github.com/llvm/llvm-project/issues/54495.
More information about the All-commits
mailing list