File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -368,3 +368,36 @@ void test_use_matrix_2() {
368368
369369 selector<2 > r5 = use_matrix_3 (m1);
370370}
371+
372+ // CHECK-LABEL: define void @_Z22test_pseudo_destructorv()
373+ // CHECK-NEXT: entry:
374+ // CHECK-NEXT: %a = alloca [25 x double], align 8
375+ // CHECK-NEXT: %b = alloca [12 x float], align 4
376+ // CHECK-NEXT: %0 = load <25 x double>, ptr %a, align 8
377+ // CHECK-NEXT: call void @_Z17pseudo_destructorIu11matrix_typeILm5ELm5EdEEvT_(<25 x double> %0)
378+ // CHECK-NEXT: %1 = load <12 x float>, ptr %b, align 4
379+ // CHECK-NEXT: call void @_Z17pseudo_destructorIu11matrix_typeILm3ELm4EfEEvT_(<12 x float> %1)
380+ // CHECK-NEXT: ret void
381+
382+ // CHECK-LABEL: define linkonce_odr void @_Z17pseudo_destructorIu11matrix_typeILm5ELm5EdEEvT_(<25 x double> %t)
383+ // CHECK-NEXT: entry:
384+ // CHECK-NEXT: %t.addr = alloca [25 x double], align 8
385+ // CHECK-NEXT: store <25 x double> %t, ptr %t.addr, align 8
386+ // CHECK-NEXT: ret void
387+
388+ // CHECK-LABEL: define linkonce_odr void @_Z17pseudo_destructorIu11matrix_typeILm3ELm4EfEEvT_(<12 x float> %t)
389+ // CHECK-NEXT: entry:
390+ // CHECK-NEXT: %t.addr = alloca [12 x float], align 4
391+ // CHECK-NEXT: store <12 x float> %t, ptr %t.addr, align 4
392+ // CHECK-NEXT: ret void
393+ template <typename T>
394+ void pseudo_destructor (T t) {
395+ t.~T ();
396+ }
397+
398+ void test_pseudo_destructor () {
399+ dx5x5_t a;
400+ fx3x4_t b;
401+ pseudo_destructor (a);
402+ pseudo_destructor (b);
403+ }
You can’t perform that action at this time.
0 commit comments