Skip to content

Commit 3a624c3

Browse files
author
Sjoerd Meijer
committed
[Matrix] Add the matrix test from D83570. NFC.
1 parent 569868f commit 3a624c3

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// RUN: %clang -O0 -fenable-matrix -S -emit-llvm %s -o - | FileCheck %s
2+
// RUN: %clang -O1 -fenable-matrix -S -emit-llvm %s -o - | FileCheck %s
3+
// RUN: %clang -O2 -fenable-matrix -S -emit-llvm %s -o - | FileCheck %s
4+
// RUN: %clang -O3 -fenable-matrix -S -emit-llvm %s -o - | FileCheck %s
5+
// RUN: %clang -Ofast -fenable-matrix -S -emit-llvm %s -o - | FileCheck %s
6+
// RUN: %clang -Os -fenable-matrix -S -emit-llvm %s -o - | FileCheck %s
7+
// RUN: %clang -Oz -fenable-matrix -S -emit-llvm %s -o - | FileCheck %s
8+
9+
// Smoke test that the matrix intrinsics are lowered at any optimisation level.
10+
11+
typedef float m4x4_t __attribute__((matrix_type(4, 4)));
12+
13+
m4x4_t f(m4x4_t a, m4x4_t b, m4x4_t c) {
14+
//
15+
// CHECK-LABEL: f(
16+
// CHECK-NOT: @llvm.matrix
17+
// CHECK: }
18+
//
19+
return a + b * c;
20+
}

0 commit comments

Comments
 (0)