summaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2024-02-21 09:59:02 +0000
committerDimitry Andric <dim@FreeBSD.org>2024-02-21 09:59:02 +0000
commitb3ca86c61e0626b777466609594a8da23ef637e8 (patch)
treef3bc46ef0046dc541efad576e957ee1c4d7632a7 /llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
parente15a4f0a320e3c1248539511adee55a201e9ed2e (diff)
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstructionCombining.cpp')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstructionCombining.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
index 249f4a7710e0..5d207dcfd18d 100644
--- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
@@ -2594,10 +2594,10 @@ Instruction *InstCombinerImpl::visitGetElementPtrInst(GetElementPtrInst &GEP) {
Value *V;
if ((has_single_bit(TyAllocSize) &&
match(GEP.getOperand(1),
- m_Exact(m_AShr(m_Value(V),
- m_SpecificInt(countr_zero(TyAllocSize)))))) ||
+ m_Exact(m_Shr(m_Value(V),
+ m_SpecificInt(countr_zero(TyAllocSize)))))) ||
match(GEP.getOperand(1),
- m_Exact(m_SDiv(m_Value(V), m_SpecificInt(TyAllocSize))))) {
+ m_Exact(m_IDiv(m_Value(V), m_SpecificInt(TyAllocSize))))) {
GetElementPtrInst *NewGEP = GetElementPtrInst::Create(
Builder.getInt8Ty(), GEP.getPointerOperand(), V);
NewGEP->setIsInBounds(GEP.isInBounds());