[CVP] Allow two transforms in one invocation
authorPhilip Reames <listmail@philipreames.com>
Mon, 28 Sep 2020 22:08:25 +0000 (15:08 -0700)
committerPhilip Reames <listmail@philipreames.com>
Mon, 28 Sep 2020 22:11:42 +0000 (15:11 -0700)
commite46d74b58922a427562552464d798448520e4928
tree398c6d87988953afd46ace28d24e5337d7d5fe4d
parentbd08a87cfede308f040d79b45245213afd87959a
[CVP] Allow two transforms in one invocation

For a call site which had both constant deopt operands and nonnull arguments, we were missing the opportunity to recognize the later by bailing early.

This is somewhat of a speculative fix.  Months ago, I'd had a private report of performance and compile time regressions from the deopt operand folding.  I never received a test case.  However, the only possibility I see was that after that change CVP missed the nonnull fold, and we end up with a pass ordering/missed simplification issue.  So, since it's a real issue, fix it and hope.
llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
llvm/test/Transforms/CorrelatedValuePropagation/deopt.ll