[all-commits] [llvm/llvm-project] c2fba6: [clang][SPARC] Treat empty structs as if it's a on...

Koakuma via All-commits all-commits at lists.llvm.org
Wed May 15 06:49:50 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c2fba6df944e11e2c9a7073405c6a817fdba14e3
      https://github.com/llvm/llvm-project/commit/c2fba6df944e11e2c9a7073405c6a817fdba14e3
  Author: Koakuma <koachan at protonmail.com>
  Date:   2024-05-15 (Wed, 15 May 2024)

  Changed paths:
    M clang/lib/CodeGen/Targets/Sparc.cpp
    M clang/test/CodeGen/sparcv9-abi.c
    A clang/test/CodeGen/sparcv9-class-return.cpp

  Log Message:
  -----------
  [clang][SPARC] Treat empty structs as if it's a one-bit type in the CC (#90338)

Make sure that empty structs are treated as if it has a size of one bit
in function parameters and return types so that it occupies a full
argument and/or return register slot.

This fixes crashes and miscompilations when passing and/or returning
empty structs.

Reviewed by: @s-barannikov



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list