1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -passes=slp-vectorizer -S -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s
4 define <2 x float> @foo() {
7 ; CHECK-NEXT: [[SOURCE:%.*]] = insertelement <2 x float> poison, float undef, i32 0
8 ; CHECK-NEXT: [[TMP0:%.*]] = fsub <2 x float> [[SOURCE]], [[SOURCE]]
9 ; CHECK-NEXT: ret <2 x float> [[TMP0]]
12 %source = insertelement <2 x float> poison, float undef, i32 0
13 %e0 = extractelement <2 x float> %source, i32 0
14 %e0.dup = extractelement <2 x float> %source, i32 0
15 %sub1 = fsub float %e0, %e0.dup
16 %e1 = extractelement <2 x float> %source, i32 1
17 %e1.dup = extractelement <2 x float> %source, i32 1
18 %sub2 = fsub float %e1, %e1.dup
19 %res1 = insertelement <2 x float> poison, float %sub1, i32 0
20 %res2 = insertelement <2 x float> %res1, float %sub2, i32 1
24 !llvm.ident = !{!0, !0}
26 !0 = !{!"clang version 4.0.0 "}