diff --git a/clang/test/CodeGen/fp-matrix-pragma.c b/clang/test/CodeGen/fp-matrix-pragma.c --- a/clang/test/CodeGen/fp-matrix-pragma.c +++ b/clang/test/CodeGen/fp-matrix-pragma.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -emit-llvm -S -fenable-matrix --target=arm64-unknown-iphoneos -g0 -mllvm -disable-llvm-optzns -o - | FileCheck %s +// RUN: %clang_cc1 -emit-llvm -S -fenable-matrix -mllvm -disable-llvm-optzns -o - | FileCheck %s typedef float fx2x2_t __attribute__((matrix_type(2, 2))); typedef int ix2x2_t __attribute__((matrix_type(2, 2))); @@ -18,6 +18,13 @@ return a + b - c; } +fx2x2_t fp_matrix_ops(fx2x2_t a, fx2x2_t b, fx2x2_t c) { +// CHECK: call reassoc contract <4 x float> @llvm.matrix.multiply.v4f32.v4f32.v4f32 +// CHECK: fadd reassoc contract <4 x float> +#pragma clang fp contract(fast) reassociate(on) + return a * b + c; +} + ix2x2_t int_matrix_ops(ix2x2_t a, ix2x2_t b, ix2x2_t c) { // CHECK: call <4 x i32> @llvm.matrix.multiply.v4i32.v4i32.v4i32 // CHECK: add <4 x i32>