1 ; RUN: llc -verify-machineinstrs -mcpu=pwr8 -mtriple=powerpc64le-unknown-linux-gnu -O3 < %s | FileCheck %s
3 ; This test verifies that VSX swap optimization works for the
4 ; doubleword splat idiom.
6 @a = external global <2 x double>, align 16
7 @b = external global <2 x double>, align 16
9 define void @test(double %s) {
11 %0 = insertelement <2 x double> undef, double %s, i32 0
12 %1 = shufflevector <2 x double> %0, <2 x double> undef, <2 x i32> zeroinitializer
13 %2 = load <2 x double>, ptr @a, align 16
14 %3 = fadd <2 x double> %0, %2
15 store <2 x double> %3, ptr @b, align 16