1 ; RUN: llc -verify-machineinstrs -mcpu=pwr7 < %s | FileCheck %s
2 target 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"
3 target triple = "powerpc64-unknown-linux-gnu"
5 declare <4 x i32> @llvm.ppc.altivec.lvx(ptr) #1
7 define <4 x i32> @test1(ptr %h) #0 {
9 %h1 = getelementptr <4 x i32>, ptr %h, i64 1
10 %vl = call <4 x i32> @llvm.ppc.altivec.lvx(ptr %h1)
12 %v0 = load <4 x i32>, ptr %h, align 8
14 %a = add <4 x i32> %v0, %vl
18 ; CHECK: li [[REG:[0-9]+]], 16
19 ; CHECK-NOT: li {{[0-9]+}}, 15
20 ; CHECK-DAG: lvx {{[0-9]+}}, 0, 3
21 ; CHECK-DAG: lvx {{[0-9]+}}, 3, [[REG]]
25 declare void @llvm.ppc.altivec.stvx(<4 x i32>, ptr) #0
27 define <4 x i32> @test2(ptr %h, <4 x i32> %d) #0 {
29 %h1 = getelementptr <4 x i32>, ptr %h, i64 1
30 call void @llvm.ppc.altivec.stvx(<4 x i32> %d, ptr %h1)
32 %v0 = load <4 x i32>, ptr %h, align 8
37 ; CHECK: li [[REG:[0-9]+]], 16
38 ; CHECK-NOT: li {{[0-9]+}}, 15
39 ; CHECK-DAG: lvx {{[0-9]+}}, 0, 3
40 ; CHECK-DAG: lvx {{[0-9]+}}, 3, [[REG]]
44 attributes #0 = { nounwind }
45 attributes #1 = { nounwind readonly }