File tree 2 files changed +2
-1
lines changed
test/Transforms/SimplifyCFG
2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -2366,7 +2366,7 @@ static bool markAliveBlocks(Function &F,
2366
2366
Changed = true ;
2367
2367
}
2368
2368
if (II->doesNotThrow () && canSimplifyInvokeNoUnwind (&F)) {
2369
- if (II->use_empty () && II->onlyReadsMemory ()) {
2369
+ if (II->use_empty () && ! II->mayHaveSideEffects ()) {
2370
2370
// jump to the normal destination branch.
2371
2371
BasicBlock *NormalDestBB = II->getNormalDest ();
2372
2372
BasicBlock *UnwindDestBB = II->getUnwindDest ();
Original file line number Diff line number Diff line change 83
83
define i32 @invoke_readonly_may_not_return () nounwind personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8* ) {
84
84
; CHECK-LABEL: @invoke_readonly_may_not_return(
85
85
; CHECK-NEXT: entry:
86
+ ; CHECK-NEXT: [[CALL:%.*]] = call i32 @readonly()
86
87
; CHECK-NEXT: ret i32 3
87
88
;
88
89
entry:
You can’t perform that action at this time.
0 commit comments