1; RUN: llc -verify-machineinstrs -mcpu=pwr7 -O0 -fast-isel=false -mattr=-vsx < %s | FileCheck %s 2; RUN: llc -verify-machineinstrs -mcpu=pwr7 -O0 -fast-isel=false -mattr=+vsx < %s | FileCheck -check-prefix=CHECK-VSX %s 3; RUN: llc -verify-machineinstrs -mcpu=pwr9 -O0 -fast-isel=false -mattr=+vsx < %s | FileCheck %s 4 5; Verify internal alignment of long double in a struct. The double 6; argument comes in in GPR3; GPR4 is skipped; GPRs 5 and 6 contain 7; the long double. Check that these are stored to proper locations 8; in the parameter save area and loaded from there for return in FPR1/2. 9 10target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128-v128:128:128-n32:64" 11target triple = "powerpc64-unknown-linux-gnu" 12 13%struct.S = type { double, ppc_fp128 } 14 15define ppc_fp128 @test(%struct.S* byval %x) nounwind { 16entry: 17 %b = getelementptr inbounds %struct.S, %struct.S* %x, i32 0, i32 1 18 %0 = load ppc_fp128, ppc_fp128* %b, align 16 19 ret ppc_fp128 %0 20} 21 22; CHECK-DAG: std 6, 72(1) 23; CHECK-DAG: std 5, 64(1) 24; CHECK-DAG: std 4, 56(1) 25; CHECK-DAG: std 3, 48(1) 26; CHECK: lfd 1, 64(1) 27; CHECK: lfd 2, 72(1) 28 29; CHECK-VSX-DAG: std 6, 72(1) 30; CHECK-VSX-DAG: std 5, 64(1) 31; CHECK-VSX-DAG: std 4, 56(1) 32; CHECK-VSX-DAG: std 3, 48(1) 33; CHECK-VSX: li 3, 16 34; CHECK-VSX: addi 4, 1, 48 35; CHECK-VSX: lxsdx 1, 4, 3 36; CHECK-VSX: li 3, 24 37; CHECK-VSX: lxsdx 2, 4, 3 38