aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/SelectOptimize.cpp
diff options
context:
space:
mode:
authorTeresa Johnson <tejohnson@google.com>2022-09-15 20:23:44 -0700
committerTeresa Johnson <tejohnson@google.com>2022-09-16 13:50:01 -0700
commitc2cf93c1a9f1b8c5b886bb8847ac803d4c053dcf (patch)
treeece8fe3ca87ea16a21c53c072c2d366f34aff7c2 /llvm/lib/CodeGen/SelectOptimize.cpp
parent47e9e588083493414d0abfbe33fe3566879c219b (diff)
downloadllvm-c2cf93c1a9f1b8c5b886bb8847ac803d4c053dcf.zip
llvm-c2cf93c1a9f1b8c5b886bb8847ac803d4c053dcf.tar.gz
llvm-c2cf93c1a9f1b8c5b886bb8847ac803d4c053dcf.tar.bz2
[WPD/LTT] Lower type test feeding assumes via phi correctly
This fixes https://github.com/llvm/llvm-project/issues/57616. Type test lowering in ThinLTO modules relies on having type id summaries set up for the referenced types, which provide the type test resolution. If there is no summary, the type tests are lowered to false. At the very least, a default type id summary gives the type tests a resolution of Unknown, which is handled correctly (ignored by the first invocation of LTT, and lowered to true by the second). WPD sets up the type id summaries (with a default type test resolution) as it is processing the type tests, but only does this for the patterns handled by WPD, which is a type test directly feeding an assume. In the case of type tests feeding an assume via a phi, the type id summary was not being set up, leading to the type tests being lowered to false incorrectly. Fix this by adding the default type id summary entries for all type ids used on globals during index-only WPD. This is not an issue for hybrid (split-lto-unit) LTO, as in that case the type test resolution is determined and set up during LTT, since the type definitions are in the regular LTO split module, and exported via the summary to the ThinLTO split module. Differential Revision: https://reviews.llvm.org/D134012
Diffstat (limited to 'llvm/lib/CodeGen/SelectOptimize.cpp')
0 files changed, 0 insertions, 0 deletions