[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 17:32:51 +0000 (12:32 -0500)
commit966342790e8d4a64295845b50f49117d4ec9e7cf
tree346df33ecbd8dfbb55f78e0dd19f862b8f2fdf84
parentae08df87dfbae62542d2a37ecebbbc5fa04b82f4
[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