For a default visibility external linkage definition, dso_local is set for ELF
-fno-pic/-fpie and COFF and Mach-O. Since default clang -cc1 for ELF is similar
to -fpic ("PIC Level" is not set), this nuance causes unneeded binary format differences.
To make emitted IR similar, ELF -cc1 -fpic will default to -fno-semantic-interposition,
which sets dso_local for default visibility external linkage definitions.
To make this flip smooth and enable future (dso_local as definition default),
this patch replaces (function) `define ` with `define{{.*}} `,
(variable/constant/alias) `= ` with `={{.*}} `, or inserts appropriate `{{.*}} `.
14 lines
373 B
C
14 lines
373 B
C
// REQUIRES: powerpc-registered-target
|
|
// RUN: %clang_cc1 -O2 -triple powerpc64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s
|
|
|
|
typedef float v4sf __attribute__ ((vector_size (16)));
|
|
|
|
struct s { v4sf v; };
|
|
|
|
v4sf foo (struct s a) {
|
|
return a.v;
|
|
}
|
|
|
|
// CHECK-LABEL: define{{.*}} <4 x float> @foo(<4 x float> inreg returned %a.coerce)
|
|
// CHECK: ret <4 x float> %a.coerce
|