-
Notifications
You must be signed in to change notification settings - Fork 14.3k
InstCombine: Remove a check for pointer bitcasts #128491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
InstCombine: Remove a check for pointer bitcasts #128491
Conversation
@llvm/pr-subscribers-llvm-transforms Author: Matt Arsenault (arsenm) ChangesFull diff: https://github.com/llvm/llvm-project/pull/128491.diff 1 Files Affected:
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();
|
@@ -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(); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
9603433
to
9d870a2
Compare
No description provided.