21 lines · c
1// RUN: %clang -O0 -fenable-matrix -S -emit-llvm %s -o - | FileCheck %s2// RUN: %clang -O1 -fenable-matrix -S -emit-llvm %s -o - | FileCheck %s3// RUN: %clang -O2 -fenable-matrix -S -emit-llvm %s -o - | FileCheck %s4// RUN: %clang -O3 -fenable-matrix -S -emit-llvm %s -o - | FileCheck %s5// RUN: %clang -Ofast -fenable-matrix -S -emit-llvm %s -o - | FileCheck %s6// RUN: %clang -Os -fenable-matrix -S -emit-llvm %s -o - | FileCheck %s7// RUN: %clang -Oz -fenable-matrix -S -emit-llvm %s -o - | FileCheck %s8 9// Smoke test that the matrix intrinsics are lowered at any optimisation level.10 11typedef float m4x4_t __attribute__((matrix_type(4, 4)));12 13m4x4_t f(m4x4_t a, m4x4_t b, m4x4_t c) {14 //15 // CHECK-LABEL: f(16 // CHECK-NOT: @llvm.matrix17 // CHECK: }18 //19 return a + b * c;20}21