[PATCH] D132542: [InstCombine] Use dyn_cast instead of cast in visitPHINode

Liao Chunyu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 25 02:24:13 PDT 2022


liaolucy added a comment.

In D132542#3745241 <https://reviews.llvm.org/D132542#3745241>, @fhahn wrote:

> In D132542#3745223 <https://reviews.llvm.org/D132542#3745223>, @liaolucy wrote:
>
>> In D132542#3745150 <https://reviews.llvm.org/D132542#3745150>, @fhahn wrote:
>>
>>> Thanks for tracking this down! Could you please add an instcombine test case for the issue?
>>
>> Any suggestions for test cases? Is it as simple as possible or the complete ir of the issue?
>
> As simple as possible to reproduce the issue by just running `opt -passes=instcombine`. You can use ` -mllvm -print-on-crash -mllvm -print-module-scope` to get the module before the crash and then use the techniques from https://llvm.org/docs/HowToSubmitABug.html to reduce it to the minimal crashing IR.

Sorry I can't add test cases for the time being, because there will be a failure.
/update_test_checks.py --opt=opt pr57329.ll 
PHI nodes not grouped at top of basic block!

  %i.129 = phi i32 [ 0, %L2 ], [ %0, %L1 ]

label %L3.preheader

I'm looking for a better way to fix bug.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D132542



More information about the llvm-commits mailing list