Fixes #60990.
There is a crash reported during Running pass 'Prepare loop for ppc preferred instruction forms'. The crash occurs in 32bit PowerPC.
Details
Details
- Reviewers
shchenz lkail qiucf - Group Reviewers
Restricted Project - Commits
- rG5541f47326e0: [PowerPC] Check if the latch block is in the value list for the PHI before get…
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Unit Tests
Time | Test | |
---|---|---|
60,040 ms | x64 debian > libFuzzer.libFuzzer::minimize_crash.test |
Event Timeline
llvm/test/CodeGen/PowerPC/loop-instr-form-non-inc.ll | ||
---|---|---|
6 | This is a reduced case from bugpoint: define dso_local void @test_no_inc() local_unnamed_addr align 2 { entry: %call = tail call noundef i32 @_ZN1e1fEv() %cmp10 = icmp sgt i32 %call, 0 br label %for.cond for.cond: ; preds = %for.cond.cleanup, %entry %g.0 = phi i32 [ 1, %entry ], [ %g.1.lcssa, %for.cond.cleanup ] br i1 %cmp10, label %for.body.preheader, label %for.cond.cleanup for.body.preheader: ; preds = %for.cond %0 = add i32 %call, %g.0 br label %for.cond.cleanup for.cond.cleanup: ; preds = %for.body.preheader, %for.cond %g.1.lcssa = phi i32 [ %g.0, %for.cond ], [ %0, %for.body.preheader ] %arrayidx5 = getelementptr inbounds i8, ptr null, i32 %g.1.lcssa store i8 0, ptr %arrayidx5, align 1 br label %for.cond } declare noundef i32 @_ZN1e1fEv() local_unnamed_addr This should be able to further reduce, for example, using a parameter for %call, so that we can remove the external function call. And also we can add nounwind to the function, so that the cfi related instructions will not be generated. |
Comment Actions
LGTM. Thank you for the fix!
Please add Fixes #60990 in the summary and the commit message.
This is a reduced case from bugpoint:
This should be able to further reduce, for example, using a parameter for %call, so that we can remove the external function call. And also we can add nounwind to the function, so that the cfi related instructions will not be generated.