blob: 0bbc633363a763f85cd4e502a3e3c07c0af02b62 [file] [log] [blame]
Nemanja Ivanovic6e7879c2016-09-22 09:52:19 +00001; RUN: llc -verify-machineinstrs -mcpu=pwr8 -mattr=+vsx -O2 \
2; RUN: -mtriple=powerpc64-unknown-linux-gnu < %s > %t
Bill Seurer1baeeb02014-12-05 20:32:05 +00003; RUN: grep lxvw4x < %t | count 3
4; RUN: grep lxvd2x < %t | count 3
5; RUN: grep stxvw4x < %t | count 3
6; RUN: grep stxvd2x < %t | count 3
Bill Schmidt72954782014-11-12 04:19:40 +00007
Nemanja Ivanovic6e7879c2016-09-22 09:52:19 +00008; RUN: llc -verify-machineinstrs -mcpu=pwr8 -mattr=+vsx -O0 -fast-isel=1 \
9; RUN: -mtriple=powerpc64-unknown-linux-gnu < %s > %t
10; RUN: grep lxvw4x < %t | count 3
11; RUN: grep lxvd2x < %t | count 3
12; RUN: grep stxvw4x < %t | count 3
13; RUN: grep stxvd2x < %t | count 3
14
15; RUN: llc -verify-machineinstrs -mcpu=pwr8 -mattr=+vsx -O2 \
16; RUN: -mtriple=powerpc64le-unknown-linux-gnu < %s > %t
Nemanja Ivanovicb89c27f2017-05-02 01:47:34 +000017; RUN: grep lxvd2x < %t | count 3
18; RUN: grep lvx < %t | count 3
19; RUN: grep stxvd2x < %t | count 3
20; RUN: grep stvx < %t | count 3
Bill Schmidtfae5d712014-12-09 16:35:51 +000021
Nemanja Ivanovic6e7879c2016-09-22 09:52:19 +000022; RUN: llc -verify-machineinstrs -mcpu=pwr9 -O2 \
23; RUN: -mtriple=powerpc64le-unknown-linux-gnu < %s > %t
Zaara Syeda93297832017-05-24 17:50:37 +000024; RUN: grep lxv < %t | count 6
25; RUN: grep stxv < %t | count 6
Nemanja Ivanovic6e7879c2016-09-22 09:52:19 +000026
27
Bill Schmidt72954782014-11-12 04:19:40 +000028@vsi = global <4 x i32> <i32 -1, i32 2, i32 -3, i32 4>, align 16
29@vui = global <4 x i32> <i32 0, i32 1, i32 2, i32 3>, align 16
30@vf = global <4 x float> <float -1.500000e+00, float 2.500000e+00, float -3.500000e+00, float 4.500000e+00>, align 16
31@vsll = global <2 x i64> <i64 255, i64 -937>, align 16
32@vull = global <2 x i64> <i64 1447, i64 2894>, align 16
33@vd = global <2 x double> <double 3.500000e+00, double -7.500000e+00>, align 16
34@res_vsi = common global <4 x i32> zeroinitializer, align 16
35@res_vui = common global <4 x i32> zeroinitializer, align 16
36@res_vf = common global <4 x float> zeroinitializer, align 16
37@res_vsll = common global <2 x i64> zeroinitializer, align 16
38@res_vull = common global <2 x i64> zeroinitializer, align 16
39@res_vd = common global <2 x double> zeroinitializer, align 16
40
41; Function Attrs: nounwind
42define void @test1() {
43entry:
David Blaikiea79ac142015-02-27 21:17:42 +000044 %0 = load <4 x i32>, <4 x i32>* @vsi, align 16
45 %1 = load <4 x i32>, <4 x i32>* @vui, align 16
46 %2 = load <4 x i32>, <4 x i32>* bitcast (<4 x float>* @vf to <4 x i32>*), align 16
47 %3 = load <2 x double>, <2 x double>* bitcast (<2 x i64>* @vsll to <2 x double>*), align 16
48 %4 = load <2 x double>, <2 x double>* bitcast (<2 x i64>* @vull to <2 x double>*), align 16
49 %5 = load <2 x double>, <2 x double>* @vd, align 16
Bill Schmidt72954782014-11-12 04:19:40 +000050 store <4 x i32> %0, <4 x i32>* @res_vsi, align 16
51 store <4 x i32> %1, <4 x i32>* @res_vui, align 16
52 store <4 x i32> %2, <4 x i32>* bitcast (<4 x float>* @res_vf to <4 x i32>*), align 16
53 store <2 x double> %3, <2 x double>* bitcast (<2 x i64>* @res_vsll to <2 x double>*), align 16
54 store <2 x double> %4, <2 x double>* bitcast (<2 x i64>* @res_vull to <2 x double>*), align 16
55 store <2 x double> %5, <2 x double>* @res_vd, align 16
56 ret void
57}