[all-commits] [llvm/llvm-project] 30b29d: [amdgpu] Don't crash on empty global ctor/dtor

Jon Chesterfield via All-commits all-commits at lists.llvm.org
Tue Nov 16 06:36:30 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 30b29db7c79ce70801800572b898b2e0df03bbb1
      https://github.com/llvm/llvm-project/commit/30b29db7c79ce70801800572b898b2e0df03bbb1
  Author: Jon Chesterfield <jonathanchesterfield at gmail.com>
  Date:   2021-11-16 (Tue, 16 Nov 2021)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPUCtorDtorLowering.cpp
    A llvm/test/CodeGen/AMDGPU/lower-empty-ctor-dtor.ll

  Log Message:
  -----------
  [amdgpu] Don't crash on empty global ctor/dtor

Global ctor/dtor can be an empty array, which is a Constant not a
ConstantArray. The cast<ConstantArray> therefore asserts / crashes.

Reviewed By: arsenm

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




More information about the All-commits mailing list