[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:32:45 PDT 2022
bcl5980 added a comment.
In D127942#3588216 <https://reviews.llvm.org/D127942#3588216>, @nlopes wrote:
> Could you please explain what's the bug and why is this the right fix?
The min reproduce RI has two load %b at different basic blocks. %bb2 has assumption for load %b data.
When newgvn pass try to call simplifyCmpInst for `%tobool3.not.i = icmp eq i8 %lb1, 0`, variable E is %lb2 based on allocate BasicExpression code.
%lb2 has assumption lager than 0 cause simplifyCmpInst return constant false on %bb2. But if the icmp return false %bb2 will be dead block cause assumption missing.
So we need to pass context instruction to avoid simplifyCmpInst return false to fix the issue.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127942/new/
https://reviews.llvm.org/D127942
More information about the llvm-commits
mailing list