In both ADCE and BDCE (via DemandedBits) we should not remove instructions that are not guaranteed to return. This issue was pointed out by @fhahn in the recent llvm-dev thread.
Details
Details
Diff Detail
Diff Detail
Unit Tests
Unit Tests
Paths
| Differential D96993
[DCE] Don't remove non-willreturn calls ClosedPublic Authored by nikic on Feb 18 2021, 1:32 PM.
Details
Summary In both ADCE and BDCE (via DemandedBits) we should not remove instructions that are not guaranteed to return. This issue was pointed out by @fhahn in the recent llvm-dev thread.
Diff Detail
Unit TestsFailed Event TimelineThis revision is now accepted and ready to land.Feb 18 2021, 1:37 PM This revision was landed with ongoing or failed builds.Feb 19 2021, 3:36 AM Closed by commit rG2f17ed294fcd: [DCE] Don't remove non-willreturn calls (authored by nikic). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 324757 llvm/lib/Analysis/DemandedBits.cpp
llvm/lib/Transforms/Scalar/ADCE.cpp
llvm/test/Transforms/ADCE/dce_pure_call.ll
llvm/test/Transforms/ADCE/willreturn.ll
llvm/test/Transforms/BDCE/dce-pure.ll
llvm/test/Transforms/BDCE/dead-void-ro.ll
llvm/test/Transforms/BDCE/willreturn.ll
|