[all-commits] [llvm/llvm-project] ad87d9: [clang] Fix __builtin_mul_overflow for big _BitInt...

Mariya Podchishchaeva via All-commits all-commits at lists.llvm.org
Wed Jun 25 01:58:10 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ad87d951c94f045389b2e424c2d2a1505c593b85
      https://github.com/llvm/llvm-project/commit/ad87d951c94f045389b2e424c2d2a1505c593b85
  Author: Mariya Podchishchaeva <mariya.podchishchaeva at intel.com>
  Date:   2025-06-25 (Wed, 25 Jun 2025)

  Changed paths:
    M clang/lib/CodeGen/CGBuiltin.cpp
    M clang/test/CodeGen/builtins-overflow.c

  Log Message:
  -----------
  [clang] Fix __builtin_mul_overflow for big _BitInts (#145497)

For long enough _BitInt types we use different types for memory,
storing-loading and other operations. Makes sure it is correct for mixed
sign __builtin_mul_overflow cases. Using pointer element type as a
result type doesn't work, because it will be "in-memory" type which is
usually bigger than "operations" type and that caused crashes because
clang was trying to emit trunc to a bigger type.

Fixes https://github.com/llvm/llvm-project/issues/144771



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