[all-commits] [llvm/llvm-project] 002b94: [SVE] Fix TypeSize->uint64_t implicit conversion i...

kmclaughlin-arm via All-commits all-commits at lists.llvm.org
Mon Jan 31 06:38:03 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 002b944dfa3d588b05f967d6b55e6c36ce97d4e5
      https://github.com/llvm/llvm-project/commit/002b944dfa3d588b05f967d6b55e6c36ce97d4e5
  Author: Kerry McLaughlin <kerry.mclaughlin at arm.com>
  Date:   2022-01-31 (Mon, 31 Jan 2022)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
    A llvm/test/CodeGen/AArch64/sve-alloca.ll

  Log Message:
  -----------
  [SVE] Fix TypeSize->uint64_t implicit conversion in visitAlloca()

Fixes a crash ('Invalid size request on a scalable vector') in visitAlloca()
when we call this function for a scalable alloca instruction, caused
by the implicit conversion of TySize to uint64_t.
This patch changes TySize to a TypeSize as returned by getTypeAllocSize()
and ensures the allocation size is multiplied by vscale for scalable vectors.

Reviewed By: sdesmalen, david-arm

Differential Revision: https://reviews.llvm.org/D118372




More information about the All-commits mailing list