Skip to content

Conversation

@arsenm
Copy link
Contributor

@arsenm arsenm commented Feb 24, 2025

No description provided.

@arsenm arsenm added the llvm:instcombine Covers the InstCombine, InstSimplify and AggressiveInstCombine passes label Feb 24, 2025 — with Graphite App
Copy link
Contributor Author

arsenm commented Feb 24, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@arsenm arsenm requested review from dmpots, dtcxzyw and nikic February 24, 2025 11:08
@arsenm arsenm marked this pull request as ready for review February 24, 2025 11:09
@llvmbot
Copy link
Member

llvmbot commented Feb 24, 2025

@llvm/pr-subscribers-llvm-transforms

Author: Matt Arsenault (arsenm)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/128491.diff

1 Files Affected:

  • (modified) llvm/lib/Transforms/InstCombine/InstructionCombining.cpp (+1-2)
diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
index 81b057c10b484..90cb499947601 100644
--- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
@@ -3661,8 +3661,7 @@ Instruction *InstCombinerImpl::visitUnconditionalBranchInst(BranchInst &BI) {
 
   auto GetLastSinkableStore = [](BasicBlock::iterator BBI) {
     auto IsNoopInstrForStoreMerging = [](BasicBlock::iterator BBI) {
-      return BBI->isDebugOrPseudoInst() ||
-             (isa<BitCastInst>(BBI) && BBI->getType()->isPointerTy());
+      return BBI->isDebugOrPseudoInst();
     };
 
     BasicBlock::iterator FirstInstr = BBI->getParent()->begin();

auto IsNoopInstrForStoreMerging = [](BasicBlock::iterator BBI) {
return BBI->isDebugOrPseudoInst() ||
(isa<BitCastInst>(BBI) && BBI->getType()->isPointerTy());
return BBI->isDebugOrPseudoInst();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inline the lambda, now that it's trivial?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't sure if this should be updated to include assumes

@arsenm arsenm force-pushed the users/arsenm/instcombine/remove-pointer-bitcast-check branch from 9603433 to 9d870a2 Compare February 24, 2025 11:48
@arsenm arsenm merged commit 0f34b65 into main Feb 24, 2025
8 of 11 checks passed
@arsenm arsenm deleted the users/arsenm/instcombine/remove-pointer-bitcast-check branch February 24, 2025 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

llvm:instcombine Covers the InstCombine, InstSimplify and AggressiveInstCombine passes llvm:transforms

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants