[PATCH] D77560: [SCEV] CreateNodeForPhi should return SCEVUnknown for incomplete PHIs

ChenZheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 6 20:44:08 PDT 2020


shchenz added a comment.

I prefer solution 1 if SCEV for an incomplete PHI is meaningless.

`%incomplete_1 = phi i32 [0, %entry]` will be simplified to `undef` in `createNodeForPHI()->SimplifyInstruction()`, and for every incomplete PHI like above will be mapped to same `SCEVUnknown` object in `ValueExprMap` and will not be updated even after the PHI is populated with all its incoming values. So SCEV returns the wrong cached `SCEVUnknown` value to the populated PHI values.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77560





More information about the llvm-commits mailing list