Home | History | Annotate | Download | only in X86
      1 ; RUN: llc < %s -march=x86-64 -O0
      2 ; PR8211
      3 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-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
      4 target triple = "x86_64-unknown-linux-gnu"
      5 
      6 module asm "\09.ident\09\22GCC: (GNU) 4.5.2 20100914 (prerelease) LLVM: 114628\22"
      7 
      8 %"int[]" = type [4 x i32]
      9 %0 = type { %"int[]" }
     10 %float = type float
     11 %"float[]" = type [4 x float]
     12 %int = type i32
     13 %"long unsigned int" = type i64
     14 
     15 define void @swizzle(i8* %a, %0* %b, %0* %c) nounwind {
     16 entry:
     17   %a_addr = alloca i8*
     18   %b_addr = alloca %0*
     19   %c_addr = alloca %0*
     20   %"alloca point" = bitcast i32 0 to i32
     21   store i8* %a, i8** %a_addr
     22   store %0* %b, %0** %b_addr
     23   store %0* %c, %0** %c_addr
     24   %0 = load i8*, i8** %a_addr, align 64
     25   %1 = load %0*, %0** %b_addr, align 64
     26   %2 = load %0*, %0** %c_addr, align 64
     27   %"ssa point" = bitcast i32 0 to i32
     28   br label %"2"
     29 
     30 "2":                                              ; preds = %entry
     31   %3 = bitcast i8* %0 to <2 x i32>*
     32   %4 = getelementptr inbounds %0, %0* %1, i32 0, i32 0
     33   %5 = bitcast %"int[]"* %4 to <4 x float>*
     34   %6 = load <4 x float>, <4 x float>* %5, align 16
     35   %7 = bitcast <2 x i32>* %3 to <2 x float>*
     36   %8 = bitcast <2 x float>* %7 to double*
     37   %9 = load double, double* %8
     38   %10 = insertelement <2 x double> undef, double %9, i32 0
     39   %11 = insertelement <2 x double> %10, double undef, i32 1
     40   %12 = bitcast <2 x double> %11 to <4 x float>
     41   %13 = shufflevector <4 x float> %6, <4 x float> %12, <4 x i32> <i32 4, i32 5, i32 2, i32 3>
     42   %14 = getelementptr inbounds %0, %0* %1, i32 0, i32 0
     43   %15 = bitcast %"int[]"* %14 to <4 x float>*
     44   store <4 x float> %13, <4 x float>* %15, align 16
     45   %16 = bitcast i8* %0 to <2 x i32>*
     46   %17 = bitcast <2 x i32>* %16 to i8*
     47   %18 = getelementptr i8, i8* %17, i64 8
     48   %19 = bitcast i8* %18 to <2 x i32>*
     49   %20 = getelementptr inbounds %0, %0* %2, i32 0, i32 0
     50   %21 = bitcast %"int[]"* %20 to <4 x float>*
     51   %22 = load <4 x float>, <4 x float>* %21, align 16
     52   %23 = bitcast <2 x i32>* %19 to <2 x float>*
     53   %24 = bitcast <2 x float>* %23 to double*
     54   %25 = load double, double* %24
     55   %26 = insertelement <2 x double> undef, double %25, i32 0
     56   %27 = insertelement <2 x double> %26, double undef, i32 1
     57   %28 = bitcast <2 x double> %27 to <4 x float>
     58   %29 = shufflevector <4 x float> %22, <4 x float> %28, <4 x i32> <i32 4, i32 5, i32 2, i32 3>
     59   %30 = getelementptr inbounds %0, %0* %2, i32 0, i32 0
     60   %31 = bitcast %"int[]"* %30 to <4 x float>*
     61   store <4 x float> %29, <4 x float>* %31, align 16
     62   br label %return
     63 
     64 return:                                           ; preds = %"2"
     65   ret void
     66 }
     67