mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-04 00:55:49 +03:00

For better optimizability, as the length information is lost when using the slice returned by the druntime hooks directly. Resolves #3041.
11 lines
377 B
D
11 lines
377 B
D
// RUN: %ldc -output-ll -of=%t.ll %s && FileCheck %s < %t.ll
|
|
|
|
// CHECK-LABEL: define{{.*}} @{{.*}}3foo
|
|
void[] foo()
|
|
{
|
|
// CHECK-NEXT: %.gc_mem = call {{.*}} @_d_newarrayT
|
|
// CHECK-NEXT: %.ptr = extractvalue {{.*}} %.gc_mem, 1
|
|
// CHECK-NEXT: %1 = insertvalue {{.*}} { i{{32|64}} 3, i8* undef }, i8* %.ptr, 1
|
|
// CHECK-NEXT: ret {{.*}} %1
|
|
return new void[3];
|
|
}
|