[all-commits] [llvm/llvm-project] 5e85a2: [PowerPC] Implement intrinsic for DARN instruction

Qiu Chaofan via All-commits all-commits at lists.llvm.org
Mon Dec 7 22:13:53 PST 2020


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5e85a2ba1645c3edbf26bba096631fbd318ada47
      https://github.com/llvm/llvm-project/commit/5e85a2ba1645c3edbf26bba096631fbd318ada47
  Author: Qiu Chaofan <qiucofan at cn.ibm.com>
  Date:   2020-12-08 (Tue, 08 Dec 2020)

  Changed paths:
    M clang/include/clang/Basic/BuiltinsPPC.def
    M clang/test/CodeGen/builtins-ppc.c
    M llvm/include/llvm/IR/IntrinsicsPowerPC.td
    M llvm/lib/Target/PowerPC/PPCInstr64Bit.td
    A llvm/test/CodeGen/PowerPC/builtins-ppc-p9-darn.ll

  Log Message:
  -----------
  [PowerPC] Implement intrinsic for DARN instruction

Instruction darn was introduced in ISA 3.0. It means 'Deliver A Random
Number'. The immediate number L means:

- L=0, the number is 32-bit (higher 32-bits are all-zero)
- L=1, the number is 'conditioned' (processed by hardware to reduce bias)
- L=2, the number is not conditioned, directly from noise source

GCC implements them in three separate intrinsics: __builtin_darn,
__builtin_darn_32 and __builtin_darn_raw. This patch implements the
same intrinsics. And this change also addresses Bugzilla PR39800.

Reviewed By: steven.zhang

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




More information about the All-commits mailing list