Skip to content

Commit 30fff94

Browse files
committed
InstCombine: Don't bother skipping over pointer bitcasts
These don't really happen with opaque pointers.
1 parent f3589d2 commit 30fff94

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1501,8 +1501,7 @@ Instruction *InstCombinerImpl::visitStoreInst(StoreInst &SI) {
15011501
--BBI;
15021502
// Don't count debug info directives, lest they affect codegen,
15031503
// and we skip pointer-to-pointer bitcasts, which are NOPs.
1504-
if (BBI->isDebugOrPseudoInst() ||
1505-
(isa<BitCastInst>(BBI) && BBI->getType()->isPointerTy())) {
1504+
if (BBI->isDebugOrPseudoInst()) {
15061505
ScanInsts++;
15071506
continue;
15081507
}
@@ -1623,8 +1622,7 @@ bool InstCombinerImpl::mergeStoreIntoSuccessor(StoreInst &SI) {
16231622
if (OtherBr->isUnconditional()) {
16241623
--BBI;
16251624
// Skip over debugging info and pseudo probes.
1626-
while (BBI->isDebugOrPseudoInst() ||
1627-
(isa<BitCastInst>(BBI) && BBI->getType()->isPointerTy())) {
1625+
while (BBI->isDebugOrPseudoInst()) {
16281626
if (BBI==OtherBB->begin())
16291627
return false;
16301628
--BBI;

0 commit comments

Comments
 (0)