[all-commits] [llvm/llvm-project] 2aae5b: [PowerPC] Fix EmitPPCBuiltinExpr to emit arguments...

Quinn Pham via All-commits all-commits at lists.llvm.org
Thu Apr 7 14:00:25 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2aae5b1fac3898afa10b550eee5e97f394aed0e6
      https://github.com/llvm/llvm-project/commit/2aae5b1fac3898afa10b550eee5e97f394aed0e6
  Author: Quinn Pham <Quinn.Pham at ibm.com>
  Date:   2022-04-07 (Thu, 07 Apr 2022)

  Changed paths:
    M clang/lib/CodeGen/CGBuiltin.cpp
    M clang/test/CodeGen/PowerPC/builtins-ppc-fastmath.c
    A clang/test/CodeGen/PowerPC/builtins-ppc-pair-mma-types.c
    A clang/test/CodeGen/PowerPC/builtins-ppc-stmtexpr-argument.c
    M clang/test/CodeGen/PowerPC/builtins-ppc-vsx.c
    M clang/test/CodeGen/PowerPC/builtins-ppc-xlcompat-cas.c
    M clang/test/CodeGen/PowerPC/builtins-ppc-xlcompat-fetch.c
    M clang/test/CodeGen/PowerPC/builtins-ppc-xlcompat-fp.c
    M clang/test/CodeGen/PowerPC/builtins-ppc-xlcompat-math.c
    M clang/test/CodeGen/PowerPC/builtins-ppc-xlcompat-sync.c
    M clang/test/CodeGen/PowerPC/ppc-mma-types.c
    M clang/test/Sema/ppc-pair-mma-types.c

  Log Message:
  -----------
  [PowerPC] Fix EmitPPCBuiltinExpr to emit arguments once

This patch changes `EmitPPCBuiltinExpr` in `CGBuiltin.cpp` to remove
the loop at the beginning of the function that emits the arguments and
to delay emitting the arguments until inside the switch statement. These
changes will put `EmitPPCBuiltinExpr` in line with the strategy of the
target independent function `EmitBuiltinExpr`. Also, this patch
ensures that arguments are only emitted once.

Tests that included builtins affected by these changes have been
modified to match expected behaviour.

Reviewed By: #powerpc, nemanjai, amyk

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




More information about the All-commits mailing list