33; RUN: opt < %s -passes=vector-combine -S -mtriple=x86_64-- -mcpu=x86-64-v3 | FileCheck %s --check-prefixes=CHECK,AVX
44
55define <4 x float > @shuffle_fma_const_chain (<4 x float > %a0 ) {
6- ; CHECK-LABEL: define <4 x float> @shuffle_fma_const_chain(
7- ; CHECK-SAME: <4 x float> [[A0:%.*]]) #[[ATTR0:[0-9]+]] {
8- ; CHECK-NEXT: [[F:%.*]] = tail call noundef <4 x float> @llvm.fma.v4f32(<4 x float> [[A0]], <4 x float> splat (float 0x3F8DE8D040000000), <4 x float> splat (float 0xBFB3715EE0000000))
9- ; CHECK-NEXT: [[RES:%.*]] = shufflevector <4 x float> [[F]], <4 x float> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
10- ; CHECK-NEXT: ret <4 x float> [[RES]]
6+ ; SSE-LABEL: define <4 x float> @shuffle_fma_const_chain(
7+ ; SSE-SAME: <4 x float> [[A0:%.*]]) #[[ATTR0:[0-9]+]] {
8+ ; SSE-NEXT: [[F:%.*]] = tail call noundef <4 x float> @llvm.fma.v4f32(<4 x float> [[A0]], <4 x float> splat (float 0x3F8DE8D040000000), <4 x float> splat (float 0xBFB3715EE0000000))
9+ ; SSE-NEXT: [[RES:%.*]] = shufflevector <4 x float> [[F]], <4 x float> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
10+ ; SSE-NEXT: ret <4 x float> [[RES]]
11+ ;
12+ ; AVX-LABEL: define <4 x float> @shuffle_fma_const_chain(
13+ ; AVX-SAME: <4 x float> [[A0:%.*]]) #[[ATTR0:[0-9]+]] {
14+ ; AVX-NEXT: [[TMP1:%.*]] = shufflevector <4 x float> [[A0]], <4 x float> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
15+ ; AVX-NEXT: [[RES:%.*]] = call <4 x float> @llvm.fma.v4f32(<4 x float> [[TMP1]], <4 x float> splat (float 0x3F8DE8D040000000), <4 x float> splat (float 0xBFB3715EE0000000))
16+ ; AVX-NEXT: ret <4 x float> [[RES]]
1117;
1218 %f = tail call noundef <4 x float > @llvm.fma.v4f32 (<4 x float > %a0 , <4 x float > splat (float 0x3F8DE8D040000000 ), <4 x float > splat (float 0xBFB3715EE0000000 ))
1319 %res = shufflevector <4 x float > %f , <4 x float > poison, <4 x i32 > <i32 3 , i32 2 , i32 1 , i32 0 >
@@ -16,7 +22,7 @@ define <4 x float> @shuffle_fma_const_chain(<4 x float> %a0) {
1622
1723define <8 x float > @concat_fma_const_chain (<4 x float > %a0 , <4 x float > %a1 ) {
1824; CHECK-LABEL: define <8 x float> @concat_fma_const_chain(
19- ; CHECK-SAME: <4 x float> [[A0:%.*]], <4 x float> [[A1:%.*]]) #[[ATTR0]] {
25+ ; CHECK-SAME: <4 x float> [[A0:%.*]], <4 x float> [[A1:%.*]]) #[[ATTR0:[0-9]+ ]] {
2026; CHECK-NEXT: [[TMP1:%.*]] = shufflevector <4 x float> [[A0]], <4 x float> [[A1]], <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
2127; CHECK-NEXT: [[RES:%.*]] = call <8 x float> @llvm.fma.v8f32(<8 x float> [[TMP1]], <8 x float> splat (float 0x3F8DE8D040000000), <8 x float> splat (float 0xBFB3715EE0000000))
2228; CHECK-NEXT: ret <8 x float> [[RES]]
0 commit comments