Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
bd0efca
[lldb-dap] Correctly trigger 'entry' stop reasons. (#165901)
ashgti Oct 31, 2025
74ffe1c
[DirectX] Annotate interfaces for DLL export (#165914)
bogner Oct 31, 2025
1e2ed8a
[MLGO] Update MLRegAlloc Test
boomanaiden154 Oct 31, 2025
c528f60
Revert "[SLP][NFC]Add a test with the incorrect minbitwidth in altern…
boomanaiden154 Oct 31, 2025
cf829cc
AMDGPU: Add baseline test for #161651 (#165921)
arsenm Oct 31, 2025
4ac74fc
[SLP][NFC]Add a test with the incorrect minbitwidth in alternate node…
alexey-bataev Oct 31, 2025
74d4870
update ManualDWARFIndex::Index to use std::once (#165896)
zhyty Oct 31, 2025
d310693
[SelectionDAG] Use GetPromotedInteger when promoting integer operands…
topperc Oct 31, 2025
964c771
[SLP]Fix the minbitwidth analysis for slternate opcodes
alexey-bataev Oct 31, 2025
c87e3c9
[MLIR][XeGPU] Remove an unused include and break circular dependency …
norx1991 Oct 31, 2025
045f3ce
Add test cases to profcheck-xfail.txt in unfixed (yet) areas (#165933)
mtrofin Oct 31, 2025
6adef40
[SimplifyCFG] Don't propagate weights to unconditional branches in `t…
mtrofin Oct 31, 2025
3d1aece
[docs] Fix GlobalISel sync up gcal link to point to the new one.
aemerson Oct 31, 2025
be2081d
[AMDGPU] Set VADDR4 field to NULL for tensor ops for gfx1250 (#165917)
changpeng Oct 31, 2025
128af45
[lldb-dap] Move Options.td into tool subdirectory (NFC) (#165925)
JDevlieghere Nov 1, 2025
34f1dbf
[mlir][memref] Refine doc examples for operations (#165889)
FruitClover Nov 1, 2025
23ef59a
[mlir] Fix mlir-runner memref-reshape test with unranked inputs (#165…
FruitClover Nov 1, 2025
cc27143
[LoongArch] Make ceil,floor,trunc,roundeven legal for lsx/lasx (#165217)
ylzsx Nov 1, 2025
a943132
[VPlan] Add VPRegionBlock::getCanonicalIVType (NFC). (#164127)
fhahn Nov 1, 2025
14d6c98
merge main into amd-staging
z1-cciauto Nov 1, 2025
caaa395
Regen llvm/test/Transforms/SLPVectorizer/X86/alternate-opcode-strict-…
ronlieb Nov 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,16 @@ def verify_stop_exception_info(self, expected_description):
return True
return False

def verify_stop_on_entry(self) -> None:
"""Waits for the process to be stopped and then verifies at least one
thread has the stop reason 'entry'."""
self.dap_server.wait_for_stopped()
self.assertIn(
"entry",
(t["reason"] for t in self.dap_server.thread_stop_reasons.values()),
"Expected at least one thread to report stop reason 'entry' in {self.dap_server.thread_stop_reasons}",
)

def verify_commands(self, flavor: str, output: str, commands: list[str]):
self.assertTrue(output and len(output) > 0, "expect console output")
lines = output.splitlines()
Expand Down
7 changes: 3 additions & 4 deletions lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include "lldb/Utility/Stream.h"
#include "lldb/Utility/Timer.h"
#include "lldb/lldb-private-enumerations.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/ThreadPool.h"
#include <atomic>
#include <optional>
Expand All @@ -33,10 +32,10 @@ using namespace lldb_private::plugin::dwarf;
using namespace llvm::dwarf;

void ManualDWARFIndex::Index() {
if (m_indexed)
return;
m_indexed = true;
std::call_once(m_indexed_flag, [this]() { IndexImpl(); });
}

void ManualDWARFIndex::IndexImpl() {
ElapsedTime elapsed(m_index_time);
LLDB_SCOPED_TIMERF("%p", static_cast<void *>(m_dwarf));
if (LoadFromCache()) {
Expand Down
8 changes: 7 additions & 1 deletion lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,14 @@ class ManualDWARFIndex : public DWARFIndex {
void Dump(Stream &s) override;

private:
/// Reads the DWARF debug info to build the index once.
///
/// Should be called before attempting to retrieve symbols.
void Index();

/// Call `ManualDWARFIndex::Index()` instead.
void IndexImpl();

/// Decode a serialized version of this object from data.
///
/// \param data
Expand Down Expand Up @@ -170,7 +176,7 @@ class ManualDWARFIndex : public DWARFIndex {
llvm::DenseSet<uint64_t> m_type_sigs_to_avoid;

IndexSet<NameToDIE> m_set;
bool m_indexed = false;
std::once_flag m_indexed_flag;
};
} // namespace dwarf
} // namespace lldb_private::plugin
Expand Down
28 changes: 3 additions & 25 deletions lldb/test/API/tools/lldb-dap/restart/TestDAP_restart.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,8 @@ def test_stopOnEntry(self):
self.build_and_launch(program, stopOnEntry=True)
[bp_main] = self.set_function_breakpoints(["main"])

self.dap_server.request_configurationDone()
self.dap_server.wait_for_stopped()
# Once the "configuration done" event is sent, we should get a stopped
# event immediately because of stopOnEntry.
self.assertTrue(
len(self.dap_server.thread_stop_reasons) > 0,
"expected stopped event during launch",
)
for _, body in self.dap_server.thread_stop_reasons.items():
if "reason" in body:
reason = body["reason"]
self.assertNotEqual(
reason, "breakpoint", 'verify stop isn\'t "main" breakpoint'
)
self.continue_to_next_stop()
self.verify_stop_on_entry()

# Then, if we continue, we should hit the breakpoint at main.
self.continue_to_breakpoints([bp_main])
Expand All @@ -73,17 +61,7 @@ def test_stopOnEntry(self):
# main.
resp = self.dap_server.request_restart()
self.assertTrue(resp["success"])
stopped_events = self.dap_server.wait_for_stopped()
for stopped_event in stopped_events:
if "body" in stopped_event:
body = stopped_event["body"]
if "reason" in body:
reason = body["reason"]
self.assertNotEqual(
reason,
"breakpoint",
'verify stop after restart isn\'t "main" breakpoint',
)
self.verify_stop_on_entry()

@skipIfWindows
def test_arguments(self):
Expand Down
31 changes: 3 additions & 28 deletions lldb/test/API/tools/lldb-dap/restart/TestDAP_restart_console.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,6 @@

@skipIfBuildType(["debug"])
class TestDAP_restart_console(lldbdap_testcase.DAPTestCaseBase):
def verify_stopped_on_entry(self, stopped_events: List[Dict[str, Any]]):
seen_stopped_event = 0
for stopped_event in stopped_events:
body = stopped_event.get("body")
if body is None:
continue

reason = body.get("reason")
if reason is None:
continue

self.assertNotEqual(
reason,
"breakpoint",
'verify stop after restart isn\'t "main" breakpoint',
)
if reason == "entry":
seen_stopped_event += 1

self.assertEqual(seen_stopped_event, 1, "expect only one stopped entry event.")

@skipIfAsan
@skipIfWindows
@skipIf(oslist=["linux"], archs=["arm$"]) # Always times out on buildbot
Expand Down Expand Up @@ -92,11 +71,8 @@ def test_stopOnEntry(self):
self.build_and_launch(program, console="integratedTerminal", stopOnEntry=True)
[bp_main] = self.set_function_breakpoints(["main"])

self.dap_server.request_continue() # sends configuration done
stopped_events = self.dap_server.wait_for_stopped()
# We should be stopped at the entry point.
self.assertGreaterEqual(len(stopped_events), 0, "expect stopped events")
self.verify_stopped_on_entry(stopped_events)
self.dap_server.request_configurationDone()
self.verify_stop_on_entry()

# Then, if we continue, we should hit the breakpoint at main.
self.dap_server.request_continue()
Expand All @@ -105,8 +81,7 @@ def test_stopOnEntry(self):
# Restart and check that we still get a stopped event before reaching
# main.
self.dap_server.request_restart()
stopped_events = self.dap_server.wait_for_stopped()
self.verify_stopped_on_entry(stopped_events)
self.verify_stop_on_entry()

# continue to main
self.dap_server.request_continue()
Expand Down
3 changes: 0 additions & 3 deletions lldb/tools/lldb-dap/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# We need to include the llvm components we depend on manually, as liblldb does
# not re-export those.
set(LLVM_LINK_COMPONENTS Support)
set(LLVM_TARGET_DEFINITIONS Options.td)
tablegen(LLVM Options.inc -gen-opt-parser-defs)
add_public_tablegen_target(LLDBDAPOptionsTableGen)

add_lldb_library(lldbDAP
Breakpoint.cpp
Expand Down
2 changes: 1 addition & 1 deletion lldb/tools/lldb-dap/EventHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ llvm::Error SendThreadStoppedEvent(DAP &dap, bool on_entry) {

llvm::DenseSet<lldb::tid_t> old_thread_ids;
old_thread_ids.swap(dap.thread_ids);
uint32_t stop_id = process.GetStopID();
uint32_t stop_id = on_entry ? 0 : process.GetStopID();
const uint32_t num_threads = process.GetNumThreads();

// First make a pass through the threads to see if the focused thread
Expand Down
2 changes: 1 addition & 1 deletion lldb/tools/lldb-dap/JSONUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ llvm::json::Value CreateThreadStopped(DAP &dap, lldb::SBThread &thread,
break;
}
if (stop_id == 0)
body.try_emplace("reason", "entry");
body["reason"] = "entry";
const lldb::tid_t tid = thread.GetThreadID();
body.try_emplace("threadId", (int64_t)tid);
// If no description has been set, then set it to the default thread stopped
Expand Down
4 changes: 4 additions & 0 deletions lldb/tools/lldb-dap/tool/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
set(LLVM_TARGET_DEFINITIONS Options.td)
tablegen(LLVM Options.inc -gen-opt-parser-defs)
add_public_tablegen_target(LLDBDAPOptionsTableGen)

add_lldb_tool(lldb-dap
lldb-dap.cpp

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion llvm/docs/GettingInvolved.rst
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ what to add to your calendar invite.
-
* - GlobalISel
- Every 2nd Tuesday of the month
- `gcal <https://calendar.google.com/calendar/u/0?cid=ZDcyMjc0ZjZiZjNhMzFlYmE3NTNkMWM2MGM2NjM5ZWU3ZDE2MjM4MGFlZDc2ZjViY2UyYzMwNzVhZjk4MzQ4ZEBncm91cC5jYWxlbmRhci5nb29nbGUuY29t>`__
- `gcal <https://calendar.google.com/calendar/u/0?cid=YWZjNzhmMzE4MDNlNTAyNGY1NmE1MDIyODY0YTYwZmJmYzRjYTEwNTE1NmUxODA2NzBkYTliY2ZhYTVkNjk0NUBncm91cC5jYWxlbmRhci5nb29nbGUuY29t>`__
- `Meeting details/agenda <https://docs.google.com/document/d/1Ry8O4-Tm5BFj9AMjr8qTQFU80z-ptiNQ62687NaIvLs/edit?usp=sharing>`__


Expand Down
1 change: 0 additions & 1 deletion llvm/include/llvm/InitializePasses.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ LLVM_ABI void initializeDSELegacyPassPass(PassRegistry &);
LLVM_ABI void initializeDXILMetadataAnalysisWrapperPassPass(PassRegistry &);
LLVM_ABI void initializeDXILMetadataAnalysisWrapperPrinterPass(PassRegistry &);
LLVM_ABI void initializeDXILResourceBindingWrapperPassPass(PassRegistry &);
LLVM_ABI void initializeDXILResourceImplicitBindingLegacyPass(PassRegistry &);
LLVM_ABI void initializeDXILResourceTypeWrapperPassPass(PassRegistry &);
LLVM_ABI void initializeDXILResourceWrapperPassPass(PassRegistry &);
LLVM_ABI void initializeDeadMachineInstructionElimPass(PassRegistry &);
Expand Down
8 changes: 2 additions & 6 deletions llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2871,18 +2871,14 @@ SDValue DAGTypeLegalizer::PromoteIntOp_SET_ROUNDING(SDNode *N) {
SDValue DAGTypeLegalizer::PromoteIntOp_STACKMAP(SDNode *N, unsigned OpNo) {
assert(OpNo > 1); // Because the first two arguments are guaranteed legal.
SmallVector<SDValue> NewOps(N->ops());
SDValue Operand = N->getOperand(OpNo);
EVT NVT = TLI.getTypeToTransformTo(*DAG.getContext(), Operand.getValueType());
NewOps[OpNo] = DAG.getNode(ISD::ANY_EXTEND, SDLoc(N), NVT, Operand);
NewOps[OpNo] = GetPromotedInteger(NewOps[OpNo]);
return SDValue(DAG.UpdateNodeOperands(N, NewOps), 0);
}

SDValue DAGTypeLegalizer::PromoteIntOp_PATCHPOINT(SDNode *N, unsigned OpNo) {
assert(OpNo >= 7);
SmallVector<SDValue> NewOps(N->ops());
SDValue Operand = N->getOperand(OpNo);
EVT NVT = TLI.getTypeToTransformTo(*DAG.getContext(), Operand.getValueType());
NewOps[OpNo] = DAG.getNode(ISD::ANY_EXTEND, SDLoc(N), NVT, Operand);
NewOps[OpNo] = GetPromotedInteger(NewOps[OpNo]);
return SDValue(DAG.UpdateNodeOperands(N, NewOps), 0);
}

Expand Down
4 changes: 3 additions & 1 deletion llvm/lib/Target/AMDGPU/MIMGInstructions.td
Original file line number Diff line number Diff line change
Expand Up @@ -2116,8 +2116,10 @@ class VIMAGE_TENSOR_Real <bits<8> op, VIMAGE_TENSOR_Pseudo ps, string opName = p
let vaddr2 = !if(ps.UpTo2D, !cast<int>(SGPR_NULL_gfx11plus.HWEncoding), ?);
let vaddr3 = !if(ps.UpTo2D, !cast<int>(SGPR_NULL_gfx11plus.HWEncoding), ?);

// Set VADDR4 to NULL
let vaddr4 = !cast<int>(SGPR_NULL_gfx11plus.HWEncoding);

// set to 0 based on SPG.
let vaddr4 = 0;
let rsrc = 0;
let vdata = 0;
let d16 = 0;
Expand Down
3 changes: 2 additions & 1 deletion llvm/lib/Target/DirectX/DirectXAsmPrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ void DXILAsmPrinter::emitGlobalVariable(const GlobalVariable *GV) {
emitGlobalConstant(GV->getDataLayout(), GV->getInitializer());
}

extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeDirectXAsmPrinter() {
extern "C" LLVM_ABI LLVM_EXTERNAL_VISIBILITY void
LLVMInitializeDirectXAsmPrinter() {
RegisterAsmPrinter<DXILAsmPrinter> X(getTheDirectXTarget());
}
3 changes: 2 additions & 1 deletion llvm/lib/Target/DirectX/DirectXTargetMachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@

using namespace llvm;

extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeDirectXTarget() {
extern "C" LLVM_ABI LLVM_EXTERNAL_VISIBILITY void
LLVMInitializeDirectXTarget() {
RegisterTargetMachine<DirectXTargetMachine> X(getTheDirectXTarget());
auto *PR = PassRegistry::getPassRegistry();
initializeDXILIntrinsicExpansionLegacyPass(*PR);
Expand Down
3 changes: 2 additions & 1 deletion llvm/lib/Target/DirectX/MCTargetDesc/DirectXMCTargetDesc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ static MCRegisterInfo *createDirectXMCRegisterInfo(const Triple &Triple) {

static MCInstrInfo *createDirectXMCInstrInfo() { return new MCInstrInfo(); }

extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeDirectXTargetMC() {
extern "C" LLVM_ABI LLVM_EXTERNAL_VISIBILITY void
LLVMInitializeDirectXTargetMC() {
Target &T = getTheDirectXTarget();
RegisterMCAsmInfo<DirectXMCAsmInfo> X(T);
TargetRegistry::RegisterMCInstrInfo(T, createDirectXMCInstrInfo);
Expand Down
3 changes: 2 additions & 1 deletion llvm/lib/Target/DirectX/TargetInfo/DirectXTargetInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ Target &getTheDirectXTarget() {

using namespace llvm;

extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeDirectXTargetInfo() {
extern "C" LLVM_ABI LLVM_EXTERNAL_VISIBILITY void
LLVMInitializeDirectXTargetInfo() {
RegisterTarget<Triple::dxil, /*HasJIT=*/false> X(
getTheDirectXTarget(), "dxil", "DirectX Intermediate Language", "DXIL");
}
8 changes: 8 additions & 0 deletions llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,10 @@ LoongArchTargetLowering::LoongArchTargetLowering(const TargetMachine &TM,
ISD::SETUGE, ISD::SETUGT},
VT, Expand);
setOperationAction(ISD::SCALAR_TO_VECTOR, VT, Legal);
setOperationAction(ISD::FCEIL, VT, Legal);
setOperationAction(ISD::FFLOOR, VT, Legal);
setOperationAction(ISD::FTRUNC, VT, Legal);
setOperationAction(ISD::FROUNDEVEN, VT, Legal);
}
setOperationAction(ISD::CTPOP, GRLenVT, Legal);
setOperationAction(ISD::FCEIL, {MVT::f32, MVT::f64}, Legal);
Expand Down Expand Up @@ -453,6 +457,10 @@ LoongArchTargetLowering::LoongArchTargetLowering(const TargetMachine &TM,
ISD::SETUGE, ISD::SETUGT},
VT, Expand);
setOperationAction(ISD::SCALAR_TO_VECTOR, VT, Legal);
setOperationAction(ISD::FCEIL, VT, Legal);
setOperationAction(ISD::FFLOOR, VT, Legal);
setOperationAction(ISD::FTRUNC, VT, Legal);
setOperationAction(ISD::FROUNDEVEN, VT, Legal);
}
}

Expand Down
6 changes: 6 additions & 0 deletions llvm/lib/Target/LoongArch/LoongArchLASXInstrInfo.td
Original file line number Diff line number Diff line change
Expand Up @@ -2424,6 +2424,12 @@ def : Pat<(int_loongarch_lasx_xvpickve_w_f v8f32:$xj, timm:$imm),
def : Pat<(int_loongarch_lasx_xvpickve_d_f v4f64:$xj, timm:$imm),
(XVPICKVE_D v4f64:$xj, (to_valid_timm timm:$imm))>;

// Vector floating-point conversion
defm : PatXrF<fceil, "XVFRINTRP">;
defm : PatXrF<ffloor, "XVFRINTRM">;
defm : PatXrF<ftrunc, "XVFRINTRZ">;
defm : PatXrF<froundeven, "XVFRINTRNE">;

// load
def : Pat<(int_loongarch_lasx_xvld GPR:$rj, timm:$imm),
(XVLD GPR:$rj, (to_valid_timm timm:$imm))>;
Expand Down
5 changes: 5 additions & 0 deletions llvm/lib/Target/LoongArch/LoongArchLSXInstrInfo.td
Original file line number Diff line number Diff line change
Expand Up @@ -2552,6 +2552,11 @@ def : Pat<(f64 (froundeven FPR64:$fj)),
(f64 (EXTRACT_SUBREG (VFRINTRNE_D (VREPLVEI_D
(SUBREG_TO_REG (i64 0), FPR64:$fj, sub_64), 0)), sub_64))>;

defm : PatVrF<fceil, "VFRINTRP">;
defm : PatVrF<ffloor, "VFRINTRM">;
defm : PatVrF<ftrunc, "VFRINTRZ">;
defm : PatVrF<froundeven, "VFRINTRNE">;

// load
def : Pat<(int_loongarch_lsx_vld GPR:$rj, timm:$imm),
(VLD GPR:$rj, (to_valid_timm timm:$imm))>;
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Transforms/Utils/SimplifyCFG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5956,7 +5956,7 @@ bool SimplifyCFGOpt::turnSwitchRangeIntoICmp(SwitchInst *SI,
}

// Update weight for the newly-created conditional branch.
if (hasBranchWeightMD(*SI)) {
if (hasBranchWeightMD(*SI) && NewBI->isConditional()) {
SmallVector<uint64_t, 8> Weights;
getBranchWeights(SI, Weights);
if (Weights.size() == 1 + SI->getNumCases()) {
Expand Down
21 changes: 21 additions & 0 deletions llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22134,6 +22134,27 @@ bool BoUpSLP::collectValuesToDemote(
{VectorizableTree[E.CombinedEntriesWithIndices.front().first].get(),
VectorizableTree[E.CombinedEntriesWithIndices.back().first].get()});

if (E.isAltShuffle()) {
// Combining these opcodes may lead to incorrect analysis, skip for now.
auto IsDangerousOpcode = [](unsigned Opcode) {
switch (Opcode) {
case Instruction::Shl:
case Instruction::AShr:
case Instruction::LShr:
case Instruction::UDiv:
case Instruction::SDiv:
case Instruction::URem:
case Instruction::SRem:
return true;
default:
break;
}
return false;
};
if (IsDangerousOpcode(E.getAltOpcode()))
return FinalAnalysis();
}

switch (E.getOpcode()) {

// We can always demote truncations and extensions. Since truncations can
Expand Down
6 changes: 6 additions & 0 deletions llvm/lib/Transforms/Vectorize/VPlan.h
Original file line number Diff line number Diff line change
Expand Up @@ -4109,6 +4109,12 @@ class LLVM_ABI_FOR_TEST VPRegionBlock : public VPBlockBase {
const VPCanonicalIVPHIRecipe *getCanonicalIV() const {
return const_cast<VPRegionBlock *>(this)->getCanonicalIV();
}

/// Return the type of the canonical IV for loop regions.
Type *getCanonicalIVType() { return getCanonicalIV()->getScalarType(); }
const Type *getCanonicalIVType() const {
return getCanonicalIV()->getScalarType();
}
};

inline VPRegionBlock *VPRecipeBase::getRegion() {
Expand Down
3 changes: 1 addition & 2 deletions llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2372,9 +2372,8 @@ bool VPWidenIntOrFpInductionRecipe::isCanonical() const {
return false;
auto *StepC = dyn_cast<ConstantInt>(getStepValue()->getLiveInIRValue());
auto *StartC = dyn_cast<ConstantInt>(getStartValue()->getLiveInIRValue());
auto *CanIV = getRegion()->getCanonicalIV();
return StartC && StartC->isZero() && StepC && StepC->isOne() &&
getScalarType() == CanIV->getScalarType();
getScalarType() == getRegion()->getCanonicalIVType();
}

#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
Expand Down
Loading