File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
llvm/lib/Transforms/InstCombine Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -3656,20 +3656,15 @@ Instruction *InstCombinerImpl::visitUnconditionalBranchInst(BranchInst &BI) {
36563656 assert (BI.isUnconditional () && " Only for unconditional branches." );
36573657
36583658 // If this store is the second-to-last instruction in the basic block
3659- // (excluding debug info and bitcasts of pointers ) and if the block ends with
3659+ // (excluding debug info) and if the block ends with
36603660 // an unconditional branch, try to move the store to the successor block.
36613661
36623662 auto GetLastSinkableStore = [](BasicBlock::iterator BBI) {
3663- auto IsNoopInstrForStoreMerging = [](BasicBlock::iterator BBI) {
3664- return BBI->isDebugOrPseudoInst () ||
3665- (isa<BitCastInst>(BBI) && BBI->getType ()->isPointerTy ());
3666- };
3667-
36683663 BasicBlock::iterator FirstInstr = BBI->getParent ()->begin ();
36693664 do {
36703665 if (BBI != FirstInstr)
36713666 --BBI;
3672- } while (BBI != FirstInstr && IsNoopInstrForStoreMerging ( BBI));
3667+ } while (BBI != FirstInstr && BBI-> isDebugOrPseudoInst ( ));
36733668
36743669 return dyn_cast<StoreInst>(BBI);
36753670 };
You can’t perform that action at this time.
0 commit comments