[Attributor][FIX] Sanitize queries to LVI and ScalarEvolution
authorJohannes Doerfert <johannes@jdoerfert.de>
Thu, 24 Jun 2021 21:01:35 +0000 (16:01 -0500)
committerJohannes Doerfert <johannes@jdoerfert.de>
Sat, 10 Jul 2021 21:45:19 +0000 (16:45 -0500)
commit4761d29633ac7889329dc6ef966eab01c7b7903d
treef76930593fa1e2a05327c50780e02af1c23f79e6
parentc1d53a316d6c7f7d80908ec8b5a65172f82e9721
[Attributor][FIX] Sanitize queries to LVI and ScalarEvolution

When we talk to outside analyse, e.g., LVI and ScalarEvolution, we need
to be careful with the query. The particular error occurred because we
folded a PHI node before the LVI query but the context location was now
not dominated by the value anymore. This is not supported by LVI so we
have to filter these situations before we query the outside analyses.
llvm/lib/Transforms/IPO/AttributorAttributes.cpp
llvm/test/Transforms/Attributor/value-simplify.ll