[PATCH] D127942: [NewGVN] add context instruction for SimplifyQuery

chenglin.bi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 16 01:51:42 PDT 2022


bcl5980 added a comment.

In D127942#3588322 <https://reviews.llvm.org/D127942#3588322>, @nikic wrote:

> SimplifyContext is created with `CxtI=nullptr` though, so I would expect it to not use a context instruction. Is the problem here that InstSimplify calls into ValueTracking helps like isKnownNonZero, and those convert CxtI==nullptr into the passed instruction in safeCxtI?

Yes,  it call isKnownNonZero to fold `%tobool3.not.i = icmp eq i8 %lb1, 0` to false.


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

https://reviews.llvm.org/D127942



More information about the llvm-commits mailing list