mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Let the fallthrough handle whether or not we've changed anything
before we try to optimize. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97876 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
27ceaa13f8
commit
7b323a34fa
@ -948,7 +948,9 @@ Instruction *InstCombiner::visitCallSite(CallSite CS) {
|
||||
// delete the instruction now.
|
||||
if (CallInst *CI = dyn_cast<CallInst>(CS.getInstruction())) {
|
||||
Instruction *I = tryOptimizeCall(CI, TD);
|
||||
return I ? EraseInstFromFunction(*I): 0;
|
||||
// If we changed something return the result, etc. Otherwise let
|
||||
// the fallthrough check.
|
||||
if (I) return EraseInstFromFunction(*I);
|
||||
}
|
||||
|
||||
return Changed ? CS.getInstruction() : 0;
|
||||
|
Loading…
Reference in New Issue
Block a user