[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

Kishan Parmar via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 15 03:05:38 PDT 2024


================
@@ -0,0 +1,177 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 2
+
+// RUN: %clang_cc1 -triple powerpc-unknown-linux-gnu \
+// RUN:   -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-DEF
+// RUN: %clang_cc1 -triple powerpc-unknown-linux-gnu -fcomplex-ppc-gnu-abi \
+// RUN:   -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-GNU
+
+// CHECK-DEF-LABEL: define dso_local void @foo1
+// CHECK-DEF-SAME: (ptr dead_on_unwind noalias writable sret({ float, float }) align 4 [[AGG_RESULT:%.*]], ptr noundef byval({ float, float }) align 4 [[X:%.*]]) #[[ATTR0:[0-9]+]] {
----------------
Long5hot wrote:

I couldn't remove #[[ATTR0:[0-9]+]]1. Because testcase fails saying no missing attributes.
llvm-lit(clang) generates IR with # attributes, so looks like Filecheck expects #attribute fields to be present.

https://github.com/llvm/llvm-project/pull/77732


More information about the cfe-commits mailing list