28 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: %if x86-registered-target %{ opt -passes=slp-vectorizer -S -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s %}3; RUN: %if aarch64-registered-target %{ opt -passes=slp-vectorizer -S -mtriple=aarch64-unknown-linux-gnu < %s | FileCheck %s %}4 5define <2 x float> @foo() {6; CHECK-LABEL: @foo(7; CHECK-NEXT: entry:8; CHECK-NEXT: [[SOURCE:%.*]] = insertelement <2 x float> undef, float undef, i32 09; CHECK-NEXT: [[TMP0:%.*]] = fsub <2 x float> [[SOURCE]], [[SOURCE]]10; CHECK-NEXT: ret <2 x float> [[TMP0]]11;12entry:13 %source = insertelement <2 x float> undef, float undef, i32 014 %e0 = extractelement <2 x float> %source, i32 015 %e0.dup = extractelement <2 x float> %source, i32 016 %sub1 = fsub float %e0, %e0.dup17 %e1 = extractelement <2 x float> %source, i32 118 %e1.dup = extractelement <2 x float> %source, i32 119 %sub2 = fsub float %e1, %e1.dup20 %res1 = insertelement <2 x float> undef, float %sub1, i32 021 %res2 = insertelement <2 x float> %res1, float %sub2, i32 122 ret <2 x float> %res223}24 25!llvm.ident = !{!0, !0}26 27!0 = !{!"clang version 4.0.0 "}28