aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Function.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2023-07-13 17:25:18 +0200
committerNikita Popov <npopov@redhat.com>2023-07-18 10:36:39 +0200
commit0db5d8e12384d780d2ded6b972233dc8b1632560 (patch)
treebe9934994b52494c382258e5f0595e240353a41d /llvm/lib/IR/Function.cpp
parent5b99aa57f74e1432691f366d26a2ec21907a7a70 (diff)
downloadllvm-0db5d8e12384d780d2ded6b972233dc8b1632560.zip
llvm-0db5d8e12384d780d2ded6b972233dc8b1632560.tar.gz
llvm-0db5d8e12384d780d2ded6b972233dc8b1632560.tar.bz2
Reapply [InstSimplify] Make simplifyWithOpReplaced() recursive (PR63104)
A similar assumption as for the x^x case also existed for the absorber case, which lead to a stage2 miscompile. That assumption is not fixed. ----- Support replacement of operands not only in the immediate instruction, but also instructions it uses. To the most part, this extension is straightforward, but there are two bits worth highlighting: First, we can now no longer assume that if the Op is a vector, the instruction also returns a vector. If Op is a vector and the instruction returns a scalar, we should consider it as a cross-lane operation. Second, for the x ^ x special case and the absorber special case, we can no longer assume that one of the operands is RepOp, as we might have a replacement higher up the instruction chain. There is one optimization regression, but it is in a fuzzer-generated test case. Fixes https://github.com/llvm/llvm-project/issues/63104.
Diffstat (limited to 'llvm/lib/IR/Function.cpp')
0 files changed, 0 insertions, 0 deletions