[all-commits] [llvm/llvm-project] 32febe: [PowerPC] Support for Packed BCD conversion builti...

Himadhith via All-commits all-commits at lists.llvm.org
Wed Jun 25 02:17:59 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 32febe60f36441f8a139b4119a99d17285ca0b4b
      https://github.com/llvm/llvm-project/commit/32febe60f36441f8a139b4119a99d17285ca0b4b
  Author: Himadhith <79003240+Himadhith at users.noreply.github.com>
  Date:   2025-06-25 (Wed, 25 Jun 2025)

  Changed paths:
    M clang/include/clang/Basic/BuiltinsPPC.def
    M clang/lib/Basic/Targets/PPC.cpp
    M clang/lib/Sema/SemaPPC.cpp
    A clang/test/CodeGen/PowerPC/builtins-bcd-transform.c
    A clang/test/Sema/builtins-bcd-transform.c
    M llvm/include/llvm/IR/IntrinsicsPowerPC.td
    M llvm/lib/Target/PowerPC/PPCInstrAltivec.td
    A llvm/test/CodeGen/PowerPC/builtins-bcd-transform.ll

  Log Message:
  -----------
  [PowerPC] Support for Packed BCD conversion builtins (#142723)

Support the following packed BCD builtins for PowerPC.
  
```
__builtin_national2packed - Conversion of National format to Packed decimal format.
__builtin_packed2national - Conversion of Packed decimal format to national format.
__builtin_packed2zoned    - Conversion of Packed decimal format to Zoned decimal format.
__builtin_zoned2packed    - Conversion of Zoned decimal format to Packed decimal format.
```
### Prototypes: 
`vector unsigned char __builtin_national2packed(vector unsigned char a,
unsigned char b);`
`vector unsigned char __builtin_packed2zoned(vector unsigned char,
unsigned char);`
`vector unsigned char __builtin_zoned2packed(vector unsigned char,
unsigned char);`

The condition for the 2nd parameter is consistent over all the 3
prototypes (0 or 1 only).

`vector unsigned char __builtin_packed2national(vector unsigned char);`

Co-authored-by: himadhith <himadhith.v at ibm.com>
Co-authored-by: Tony Varghese <tonypalampalliyil at gmail.com>



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