brintos

brintos / llvm-project-archived public Read only

0
0
Text · 5.4 KiB · ae8ec07 Raw
148 lines · plain
1; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s2; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mtriple=powerpc64-unknown-linux-gnu < %s | FileCheck %s \3; RUN:   --check-prefix=CHECK-BE4 5define <4 x float> @test0f(<4 x float> %a) {6entry:7  %0 = bitcast <4 x float> %a to <16 x i8>8  %1 = shufflevector <16 x i8> %0, <16 x i8> undef, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>9  %2 = bitcast <16 x i8> %1 to <4 x float>10  ret <4 x float> %211; CHECK-LABEL: test0f12; CHECK: xxspltw 34, 34, 313; CHECK-BE-LABEL: test0f14; CHECK-BE: xxspltw 34, 34, 015}16 17define <4 x float> @test1f(<4 x float> %a) {18entry:19  %0 = bitcast <4 x float> %a to <16 x i8>20  %1 = shufflevector <16 x i8> %0, <16 x i8> undef, <16 x i32> <i32 4, i32 5, i32 6, i32 7, i32 4, i32 5, i32 6, i32 7, i32 4, i32 5, i32 6, i32 7, i32 4, i32 5, i32 6, i32 7>21  %2 = bitcast <16 x i8> %1 to <4 x float>22  ret <4 x float> %223; CHECK-LABEL: test1f24; CHECK: xxspltw 34, 34, 225; CHECK-BE-LABEL: test1f26; CHECK-BE: xxspltw 34, 34, 127}28 29define <4 x float> @test2f(<4 x float> %a) {30entry:31  %0 = bitcast <4 x float> %a to <16 x i8>32  %1 = shufflevector <16 x i8> %0, <16 x i8> undef, <16 x i32> <i32 8, i32 9, i32 10, i32 11, i32 8, i32 9, i32 10, i32 11, i32 8, i32 9, i32 10, i32 11, i32 8, i32 9, i32 10, i32 11>33  %2 = bitcast <16 x i8> %1 to <4 x float>34  ret <4 x float> %235; CHECK-LABEL: test2f36; CHECK: xxspltw 34, 34, 137; CHECK-BE-LABEL: test2f38; CHECK-BE: xxspltw 34, 34, 239}40 41define <4 x float> @test3f(<4 x float> %a) {42entry:43  %0 = bitcast <4 x float> %a to <16 x i8>44  %1 = shufflevector <16 x i8> %0, <16 x i8> undef, <16 x i32> <i32 12, i32 13, i32 14, i32 15, i32 12, i32 13, i32 14, i32 15, i32 12, i32 13, i32 14, i32 15, i32 12, i32 13, i32 14, i32 15>45  %2 = bitcast <16 x i8> %1 to <4 x float>46  ret <4 x float> %247; CHECK-LABEL: test3f48; CHECK: xxspltw 34, 34, 049; CHECK-BE-LABEL: test3f50; CHECK-BE: xxspltw 34, 34, 351}52 53define <4 x i32> @test0si(<4 x i32> %a) {54entry:55  %0 = bitcast <4 x i32> %a to <16 x i8>56  %1 = shufflevector <16 x i8> %0, <16 x i8> undef, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>57  %2 = bitcast <16 x i8> %1 to <4 x i32>58  ret <4 x i32> %259; CHECK-LABEL: test0si60; CHECK: xxspltw 34, 34, 361; CHECK-BE-LABEL: test0si62; CHECK-BE: xxspltw 34, 34, 063}64 65define <4 x i32> @test1si(<4 x i32> %a) {66entry:67  %0 = bitcast <4 x i32> %a to <16 x i8>68  %1 = shufflevector <16 x i8> %0, <16 x i8> undef, <16 x i32> <i32 4, i32 5, i32 6, i32 7, i32 4, i32 5, i32 6, i32 7, i32 4, i32 5, i32 6, i32 7, i32 4, i32 5, i32 6, i32 7>69  %2 = bitcast <16 x i8> %1 to <4 x i32>70  ret <4 x i32> %271; CHECK-LABEL: test1si72; CHECK: xxspltw 34, 34, 273; CHECK-BE-LABEL: test1si74; CHECK-BE: xxspltw 34, 34, 175}76 77define <4 x i32> @test2si(<4 x i32> %a) {78entry:79  %0 = bitcast <4 x i32> %a to <16 x i8>80  %1 = shufflevector <16 x i8> %0, <16 x i8> undef, <16 x i32> <i32 8, i32 9, i32 10, i32 11, i32 8, i32 9, i32 10, i32 11, i32 8, i32 9, i32 10, i32 11, i32 8, i32 9, i32 10, i32 11>81  %2 = bitcast <16 x i8> %1 to <4 x i32>82  ret <4 x i32> %283; CHECK-LABEL: test2si84; CHECK: xxspltw 34, 34, 185; CHECK-BE-LABEL: test2si86; CHECK-BE: xxspltw 34, 34, 287}88 89define <4 x i32> @test3si(<4 x i32> %a) {90entry:91  %0 = bitcast <4 x i32> %a to <16 x i8>92  %1 = shufflevector <16 x i8> %0, <16 x i8> undef, <16 x i32> <i32 12, i32 13, i32 14, i32 15, i32 12, i32 13, i32 14, i32 15, i32 12, i32 13, i32 14, i32 15, i32 12, i32 13, i32 14, i32 15>93  %2 = bitcast <16 x i8> %1 to <4 x i32>94  ret <4 x i32> %295; CHECK-LABEL: test3si96; CHECK: xxspltw 34, 34, 097; CHECK-BE-LABEL: test3si98; CHECK-BE: xxspltw 34, 34, 399}100 101define <4 x i32> @test0ui(<4 x i32> %a) {102entry:103  %0 = bitcast <4 x i32> %a to <16 x i8>104  %1 = shufflevector <16 x i8> %0, <16 x i8> undef, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>105  %2 = bitcast <16 x i8> %1 to <4 x i32>106  ret <4 x i32> %2107; CHECK-LABEL: test0ui108; CHECK: xxspltw 34, 34, 3109; CHECK-BE-LABEL: test0ui110; CHECK-BE: xxspltw 34, 34, 0111}112 113define <4 x i32> @test1ui(<4 x i32> %a) {114entry:115  %0 = bitcast <4 x i32> %a to <16 x i8>116  %1 = shufflevector <16 x i8> %0, <16 x i8> undef, <16 x i32> <i32 4, i32 5, i32 6, i32 7, i32 4, i32 5, i32 6, i32 7, i32 4, i32 5, i32 6, i32 7, i32 4, i32 5, i32 6, i32 7>117  %2 = bitcast <16 x i8> %1 to <4 x i32>118  ret <4 x i32> %2119; CHECK-LABEL: test1ui120; CHECK: xxspltw 34, 34, 2121; CHECK-BE-LABEL: test1ui122; CHECK-BE: xxspltw 34, 34, 1123}124 125define <4 x i32> @test2ui(<4 x i32> %a) {126entry:127  %0 = bitcast <4 x i32> %a to <16 x i8>128  %1 = shufflevector <16 x i8> %0, <16 x i8> undef, <16 x i32> <i32 8, i32 9, i32 10, i32 11, i32 8, i32 9, i32 10, i32 11, i32 8, i32 9, i32 10, i32 11, i32 8, i32 9, i32 10, i32 11>129  %2 = bitcast <16 x i8> %1 to <4 x i32>130  ret <4 x i32> %2131; CHECK-LABEL: test2ui132; CHECK: xxspltw 34, 34, 1133; CHECK-BE-LABEL: test2ui134; CHECK-BE: xxspltw 34, 34, 2135}136 137define <4 x i32> @test3ui(<4 x i32> %a) {138entry:139  %0 = bitcast <4 x i32> %a to <16 x i8>140  %1 = shufflevector <16 x i8> %0, <16 x i8> undef, <16 x i32> <i32 12, i32 13, i32 14, i32 15, i32 12, i32 13, i32 14, i32 15, i32 12, i32 13, i32 14, i32 15, i32 12, i32 13, i32 14, i32 15>141  %2 = bitcast <16 x i8> %1 to <4 x i32>142  ret <4 x i32> %2143; CHECK-LABEL: test3ui144; CHECK: xxspltw 34, 34, 0145; CHECK-BE-LABEL: test3ui146; CHECK-BE: xxspltw 34, 34, 3147}148