Skip to content

[GISEL][RISCV] IRTranslator for scalable vector load #80006

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

Merged
merged 9 commits into from
Mar 20, 2024
Merged
5 changes: 2 additions & 3 deletions llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1363,9 +1363,8 @@ static bool isSwiftError(const Value *V) {

bool IRTranslator::translateLoad(const User &U, MachineIRBuilder &MIRBuilder) {
const LoadInst &LI = cast<LoadInst>(U);

unsigned StoreSize = DL->getTypeStoreSize(LI.getType());
if (StoreSize == 0)
TypeSize StoreSize = DL->getTypeStoreSize(LI.getType());
if (StoreSize.isZero())
return true;

ArrayRef<Register> Regs = getOrCreateVRegs(LI);
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/RISCV/RISCVISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20909,7 +20909,7 @@ bool RISCVTargetLowering::fallBackToDAGISel(const Instruction &Inst) const {
if (Op == Instruction::Add || Op == Instruction::Sub ||
Op == Instruction::And || Op == Instruction::Or ||
Op == Instruction::Xor || Op == Instruction::InsertElement ||
Op == Instruction::Xor || Op == Instruction::ShuffleVector)
Op == Instruction::ShuffleVector || Op == Instruction::Load)
return false;

if (Inst.getType()->isScalableTy())
Expand Down
Loading