[Attributor][FIX] Move assertion to make it not trivially fail
authorJohannes Doerfert <johannes@jdoerfert.de>
Wed, 9 Sep 2020 21:08:20 +0000 (16:08 -0500)
committerJohannes Doerfert <johannes@jdoerfert.de>
Tue, 6 Oct 2020 14:32:18 +0000 (09:32 -0500)
commit4a7a988442dfa40309b34746218c07ebf758b378
tree632a8d17a98d3e1b1eef4217390366a82a311625
parent04f6951397cfbb892b99027bd3c0e4e0382f5458
[Attributor][FIX] Move assertion to make it not trivially fail

The idea of this assertion was to check the simplified value before we
assign it, not after, which caused this to trivially fail all the time.
llvm/lib/Transforms/IPO/AttributorAttributes.cpp
llvm/test/Transforms/Attributor/value-simplify.ll