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
f(m4x4_t a,m4x4_t b,m4x4_t c)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 }
21