Home | History | Annotate | Download | only in X86
      1 ; RUN: opt < %s -basicaa -slp-vectorizer -dce -S -mtriple=x86_64-apple-macosx10.8.0 -mcpu=corei7-avx | FileCheck %s
      2 
      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-S128"
      4 target triple = "x86_64-apple-macosx10.9.0"
      5 
      6 ; int foo(int * restrict A, char * restrict B) {
      7 ;     A[0] = B[0];
      8 ;     A[1] = B[1];
      9 ;     A[2] = B[2];
     10 ;     A[3] = B[3];
     11 ; }
     12 ;CHECK-LABEL: @foo(
     13 ;CHECK: load <4 x i8>
     14 ;CHECK: sext
     15 ;CHECK: store <4 x i32>
     16 define i32 @foo(i32* noalias nocapture %A, i8* noalias nocapture %B) {
     17 entry:
     18   %0 = load i8, i8* %B, align 1
     19   %conv = sext i8 %0 to i32
     20   store i32 %conv, i32* %A, align 4
     21   %arrayidx2 = getelementptr inbounds i8, i8* %B, i64 1
     22   %1 = load i8, i8* %arrayidx2, align 1
     23   %conv3 = sext i8 %1 to i32
     24   %arrayidx4 = getelementptr inbounds i32, i32* %A, i64 1
     25   store i32 %conv3, i32* %arrayidx4, align 4
     26   %arrayidx5 = getelementptr inbounds i8, i8* %B, i64 2
     27   %2 = load i8, i8* %arrayidx5, align 1
     28   %conv6 = sext i8 %2 to i32
     29   %arrayidx7 = getelementptr inbounds i32, i32* %A, i64 2
     30   store i32 %conv6, i32* %arrayidx7, align 4
     31   %arrayidx8 = getelementptr inbounds i8, i8* %B, i64 3
     32   %3 = load i8, i8* %arrayidx8, align 1
     33   %conv9 = sext i8 %3 to i32
     34   %arrayidx10 = getelementptr inbounds i32, i32* %A, i64 3
     35   store i32 %conv9, i32* %arrayidx10, align 4
     36   ret i32 undef
     37 }
     38 
     39