Skip to content

Commit

Permalink
fix(Writer): call PA.getPointerKind only on pointers
Browse files Browse the repository at this point in the history
  • Loading branch information
yuri91 committed Oct 18, 2024
1 parent c01ea7e commit 7effd8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/lib/CheerpWriter/CheerpWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4998,7 +4998,7 @@ CheerpWriter::COMPILE_INSTRUCTION_FEEDBACK CheerpWriter::compileCallInstruction(
// afterwards
bool asmjsCallee = calledFunc && calledFunc->getSection() == StringRef("asmjs");
uint32_t addrShift = 0;
if (!asmjs && asmjsCallee && kind == Registerize::OBJECT && PA.getPointerKindAssert(&ci) == SPLIT_REGULAR && !ci.use_empty())
if (!asmjs && asmjsCallee && kind == Registerize::OBJECT && retTy->isPointerTy() && PA.getPointerKindAssert(&ci) == SPLIT_REGULAR && !ci.use_empty())
{
addrShift = compileHeapForType(cast<PointerType>(ci.getType())->getPointerElementType());
stream << ';' << NewLine;
Expand Down

0 comments on commit 7effd8d

Please sign in to comment.