]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/CodeGen/X86/v4i32load-crash.ll
Vendor import of llvm release_34 branch r197841 (effectively, 3.4 RC3):
[FreeBSD/FreeBSD.git] / test / CodeGen / X86 / v4i32load-crash.ll
1 ; RUN: llc --mcpu=x86-64 --mattr=ssse3 < %s
2
3 ;PR18045:
4 ;Issue of selection for 'v4i32 load'.
5 ;This instruction is not legal for X86 CPUs with sse < 'sse4.1'.
6 ;This node was generated by X86ISelLowering.cpp, EltsFromConsecutiveLoads
7 ;static function after legilize stage.
8
9 @e = external global [4 x i32], align 4
10 @f = external global [4 x i32], align 4
11
12 ; Function Attrs: nounwind
13 define void @fn3(i32 %el) {
14 entry:
15   %0 = load i32* getelementptr inbounds ([4 x i32]* @e, i32 0, i32 0)
16   %1 = load i32* getelementptr inbounds ([4 x i32]* @e, i32 0, i32 1)
17   %2 = load i32* getelementptr inbounds ([4 x i32]* @e, i32 0, i32 2)
18   %3 = load i32* getelementptr inbounds ([4 x i32]* @e, i32 0, i32 3)
19   %4 = insertelement <4 x i32> undef, i32 %0, i32 0
20   %5 = insertelement <4 x i32> %4, i32 %1, i32 1
21   %6 = insertelement <4 x i32> %5, i32 %2, i32 2
22   %7 = insertelement <4 x i32> %6, i32 %3, i32 3
23   %8 = add <4 x i32> %6, %7
24   store <4 x i32> %8, <4 x i32>* bitcast ([4 x i32]* @f to <4 x i32>*)
25   ret void
26 }
27