[PATCH] D97092: [ValueTracking] Handle assumes on arguments with context instruction

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 19 19:55:30 PST 2021


reames requested changes to this revision.
reames added a comment.
This revision now requires changes to proceed.

Continuing from my last comment, I've come to believe this change is fatally flawed.  Let me explain the problem I see.  I haven't found a practical test case yet, so it's possible I'm wrong about this.

As noted previously, when analyzing an assume, we must pass in a context instruction to prevent using the assumption in forming facts about the conditions contributing to the assume (when that assume is in the entry block and involves an argument).  The problem is that SCEV does not do so, and in fact, can not.  As a result, SCEV will infer facts about the values which hold because of the assume.  If we can trick any SCEV based transform pass into optimizing the assume condition, we've created the exact condition that the ephemeral logic code exists to prevent.

Until this concern has been addressed, please consider my previous LGTM revoked.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97092/new/

https://reviews.llvm.org/D97092



More information about the llvm-commits mailing list