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) {
3656
3656
assert (BI.isUnconditional () && " Only for unconditional branches." );
3657
3657
3658
3658
// 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
3660
3660
// an unconditional branch, try to move the store to the successor block.
3661
3661
3662
3662
auto GetLastSinkableStore = [](BasicBlock::iterator BBI) {
3663
- auto IsNoopInstrForStoreMerging = [](BasicBlock::iterator BBI) {
3664
- return BBI->isDebugOrPseudoInst () ||
3665
- (isa<BitCastInst>(BBI) && BBI->getType ()->isPointerTy ());
3666
- };
3667
-
3668
3663
BasicBlock::iterator FirstInstr = BBI->getParent ()->begin ();
3669
3664
do {
3670
3665
if (BBI != FirstInstr)
3671
3666
--BBI;
3672
- } while (BBI != FirstInstr && IsNoopInstrForStoreMerging ( BBI));
3667
+ } while (BBI != FirstInstr && BBI-> isDebugOrPseudoInst ( ));
3673
3668
3674
3669
return dyn_cast<StoreInst>(BBI);
3675
3670
};
You can’t perform that action at this time.
0 commit comments