mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-05-14 01:46:41 +00:00

Set the writable and dead_on_unwind attributes for sret arguments. These indicate that the argument points to writable memory (and it's legal to introduce spurious writes to it on entry to the function) and that the argument memory will not be used if the call unwinds. This enables additional MemCpyOpt/DSE/LICM optimizations.
11 lines
450 B
C
11 lines
450 B
C
// RUN: %clang_cc1 -triple x86_64-apple-macos %s -S -emit-llvm -o- | FileCheck %s
|
|
|
|
typedef __attribute__((__ext_vector_type__(4),__aligned__(16))) double simd_double4;
|
|
typedef struct { simd_double4 columns[4]; } simd_double4x4;
|
|
typedef simd_double4x4 matrix_double4x4;
|
|
|
|
// CHECK: define{{.*}} void @ident(ptr dead_on_unwind noalias writable sret(%struct.simd_double4x4) align 16 %agg.result
|
|
matrix_double4x4 ident(matrix_double4x4 x) {
|
|
return x;
|
|
}
|