llvm-project/llvm/test/Transforms/CorrelatedValuePropagation
Nikita Popov fdc6977ff3 [LVI] Look through extractvalue of insertvalue
This addresses the issue mentioned on D19867. When we simplify
with.overflow instructions in CVP, we leave behind extractvalue
of insertvalue sequences that LVI no longer understands. This
means that we can not simplify any instructions based on the
with.overflow anymore (until some over pass like InstCombine
cleans them up).

This patch extends LVI extractvalue handling by calling
SimplifyExtractValueInst (which doesn't do anything more than
constant folding + looking through insertvalue) and using the block
value of the simplification.

A possible alternative would be to do something similar to
SimplifyIndVars, where we instead directly try to replace
extractvalue users of the with.overflow. This would need some
additional structural changes to CVP, as it's currently not legal
to remove anything but the current instruction -- we'd have to
introduce a worklist with instructions scheduled for deletion or similar.

Differential Revision: https://reviews.llvm.org/D67035

llvm-svn: 371306
2019-09-07 12:03:59 +00:00
..
2010-09-02-Trunc.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
2010-09-26-MergeConstantRange.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
add.ll [CorrelatedValuePropagation] Mark subs that we know not to wrap with nuw/nsw. 2019-04-20 13:14:18 +00:00
alloca.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
ashr.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
basic.ll [CVP] Reenable nowrap flag inference 2019-06-24 20:13:13 +00:00
conflict.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
crash.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
deopt.ll [CVP] Reenable nowrap flag inference 2019-06-24 20:13:13 +00:00
guards.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
icmp.ll [CVP] Reenable nowrap flag inference 2019-06-24 20:13:13 +00:00
non-null.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
overflow_predicate.ll [LVI][CVP] Calculate with.overflow result range 2019-05-25 09:53:45 +00:00
overflows.ll [LVI] Look through extractvalue of insertvalue 2019-09-07 12:03:59 +00:00
phi-common-val.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pointer.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pr35807.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
profmd.ll Resubmit "[CorrelatedValuePropagation] Fix prof branch_weights metadata handling for SwitchInst" 2019-06-05 05:46:40 +00:00
range.ll [CVP] Reenable nowrap flag inference 2019-06-24 20:13:13 +00:00
sdiv.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
select.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
srem.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
sub.ll [CorrelatedValuePropagation] Mark subs that we know not to wrap with nuw/nsw. 2019-04-20 13:14:18 +00:00
udiv.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
urem.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00