25 lines · plain
1; RUN: llc -verify-machineinstrs -mcpu=pwr8 -mtriple=powerpc64le-unknown-linux-gnu -O3 < %s | FileCheck %s2 3; This test verifies that VSX swap optimization works for the4; doubleword splat idiom.5 6@a = external global <2 x double>, align 167@b = external global <2 x double>, align 168 9define void @test(double %s) {10entry:11 %0 = insertelement <2 x double> undef, double %s, i32 012 %1 = shufflevector <2 x double> %0, <2 x double> undef, <2 x i32> zeroinitializer13 %2 = load <2 x double>, ptr @a, align 1614 %3 = fadd <2 x double> %0, %215 store <2 x double> %3, ptr @b, align 1616 ret void17}18 19; CHECK-LABEL: @test20; CHECK-DAG: xxspltd21; CHECK-DAG: lxvd2x22; CHECK: xvadddp23; CHECK: stxvd2x24; CHECK-NOT: xxswapd25