Skip to content

Commit 579cb5b

Browse files
author
git apple-llvm automerger
committed
Merge commit '75106413d080' from llvm.org/main into next
2 parents c7cbd39 + 7510641 commit 579cb5b

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2+
; RUN: opt < %s -slp-vectorizer -S -mtriple=x86_64-unknown-linux -march=core-avx2 -pass-remarks-output=%t | FileCheck %s
3+
; RUN: FileCheck %s --input-file=%t --check-prefix=YAML
4+
5+
; YAML: --- !Missed
6+
; YAML: Pass: slp-vectorizer
7+
; YAML: Name: NotBeneficial
8+
; YAML: Function: multi_uses
9+
; YAML: Args:
10+
; YAML: - String: 'List vectorization was possible but not beneficial with cost '
11+
; YAML: - Cost: '0'
12+
; YAML: - String: ' >= '
13+
; YAML: - Treshold: '0'
14+
15+
define float @multi_uses(<2 x float> %x, <2 x float> %y) {
16+
; CHECK-LABEL: @multi_uses(
17+
; CHECK-NEXT: [[X0:%.*]] = extractelement <2 x float> [[X:%.*]], i32 0
18+
; CHECK-NEXT: [[X1:%.*]] = extractelement <2 x float> [[X]], i32 1
19+
; CHECK-NEXT: [[Y1:%.*]] = extractelement <2 x float> [[Y:%.*]], i32 1
20+
; CHECK-NEXT: [[X0X0:%.*]] = fmul float [[X0]], [[Y1]]
21+
; CHECK-NEXT: [[X1X1:%.*]] = fmul float [[X1]], [[Y1]]
22+
; CHECK-NEXT: [[ADD:%.*]] = fadd float [[X0X0]], [[X1X1]]
23+
; CHECK-NEXT: ret float [[ADD]]
24+
;
25+
%x0 = extractelement <2 x float> %x, i32 0
26+
%x1 = extractelement <2 x float> %x, i32 1
27+
%y1 = extractelement <2 x float> %y, i32 1
28+
%x0x0 = fmul float %x0, %y1
29+
%x1x1 = fmul float %x1, %y1
30+
%add = fadd float %x0x0, %x1x1
31+
ret float %add
32+
}

0 commit comments

Comments
 (0)