1; RUN: llc -mcpu=pwr7 -verify-machineinstrs < %s | FileCheck %s
2target datalayout = "E-m:e-i64:64-n32:64"
3target triple = "powerpc64-unknown-linux-gnu"
4
5@.str1 = external unnamed_addr constant [5 x i8], align 1
6@.str10 = external unnamed_addr constant [9 x i8], align 1
7@.v2f64 = external unnamed_addr constant <2 x double>, align 16
8
9; Function Attrs: nounwind
10define void @main() #0 {
11; CHECK-LABEL: @main
12; Make sure that the stxvd2x passes -verify-machineinstrs
13; CHECK: stxvd2x
14
15entry:
16  %val = load <2 x double>, <2 x double>* @.v2f64, align 16
17  %0 = tail call <8 x i16> @llvm.ppc.altivec.vupkhsb(<16 x i8> <i8 0, i8 -1, i8 -1, i8 0, i8 0, i8 0, i8 -1, i8 0, i8 -1, i8 0, i8 0, i8 -1, i8 -1, i8 -1, i8 0, i8 -1>) #0
18  %1 = tail call <8 x i16> @llvm.ppc.altivec.vupklsb(<16 x i8> <i8 0, i8 -1, i8 -1, i8 0, i8 0, i8 0, i8 -1, i8 0, i8 -1, i8 0, i8 0, i8 -1, i8 -1, i8 -1, i8 0, i8 -1>) #0
19  br i1 false, label %if.then.i68.i, label %check.exit69.i
20
21if.then.i68.i:                                    ; preds = %entry
22  unreachable
23
24check.exit69.i:                                   ; preds = %entry
25  br i1 undef, label %if.then.i63.i, label %check.exit64.i
26
27if.then.i63.i:                                    ; preds = %check.exit69.i
28  tail call void (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str10, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str1, i64 0, i64 0), <2 x double> %val) #0
29  br label %check.exit64.i
30
31check.exit64.i:                                   ; preds = %if.then.i63.i, %check.exit69.i
32  %2 = tail call i32 @llvm.ppc.altivec.vcmpequh.p(i32 2, <8 x i16> %0, <8 x i16> <i16 0, i16 -1, i16 -1, i16 0, i16 0, i16 0, i16 -1, i16 0>) #0
33  %tobool.i55.i = icmp eq i32 %2, 0
34  br i1 %tobool.i55.i, label %if.then.i58.i, label %check.exit59.i
35
36if.then.i58.i:                                    ; preds = %check.exit64.i
37  unreachable
38
39check.exit59.i:                                   ; preds = %check.exit64.i
40  %3 = tail call i32 @llvm.ppc.altivec.vcmpequh.p(i32 2, <8 x i16> %1, <8 x i16> <i16 -1, i16 0, i16 0, i16 -1, i16 -1, i16 -1, i16 0, i16 -1>) #0
41  %tobool.i50.i = icmp eq i32 %3, 0
42  br i1 %tobool.i50.i, label %if.then.i53.i, label %check.exit54.i
43
44if.then.i53.i:                                    ; preds = %check.exit59.i
45  unreachable
46
47check.exit54.i:                                   ; preds = %check.exit59.i
48  unreachable
49}
50
51; Function Attrs: nounwind readnone
52declare <8 x i16> @llvm.ppc.altivec.vupkhsb(<16 x i8>) #1
53
54; Function Attrs: nounwind readnone
55declare <8 x i16> @llvm.ppc.altivec.vupklsb(<16 x i8>) #1
56
57; Function Attrs: nounwind
58declare void @printf(i8* nocapture readonly, ...) #0
59
60; Function Attrs: nounwind readnone
61declare i32 @llvm.ppc.altivec.vcmpequh.p(i32, <8 x i16>, <8 x i16>) #1
62
63attributes #0 = { nounwind }
64attributes #1 = { nounwind readnone }
65
66