Home | History | Annotate | Download | only in InstCombine
      1 ; RUN: opt < %s -instcombine -S | grep ", align 16" | count 14
      2 target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128"
      3 
      4 @x = external global <2 x i64>, align 16
      5 @xx = external global [13 x <2 x i64>], align 16
      6 
      7 define <2 x i64> @static_hem() {
      8 	%t = getelementptr <2 x i64>* @x, i32 7
      9 	%tmp1 = load <2 x i64>* %t, align 1
     10 	ret <2 x i64> %tmp1
     11 }
     12 
     13 define <2 x i64> @hem(i32 %i) {
     14 	%t = getelementptr <2 x i64>* @x, i32 %i
     15 	%tmp1 = load <2 x i64>* %t, align 1
     16 	ret <2 x i64> %tmp1
     17 }
     18 
     19 define <2 x i64> @hem_2d(i32 %i, i32 %j) {
     20 	%t = getelementptr [13 x <2 x i64>]* @xx, i32 %i, i32 %j
     21 	%tmp1 = load <2 x i64>* %t, align 1
     22 	ret <2 x i64> %tmp1
     23 }
     24 
     25 define <2 x i64> @foo() {
     26 	%tmp1 = load <2 x i64>* @x, align 1
     27 	ret <2 x i64> %tmp1
     28 }
     29 
     30 define <2 x i64> @bar() {
     31 	%t = alloca <2 x i64>
     32         call void @kip(<2 x i64>* %t)
     33 	%tmp1 = load <2 x i64>* %t, align 1
     34 	ret <2 x i64> %tmp1
     35 }
     36 
     37 define void @static_hem_store(<2 x i64> %y) {
     38 	%t = getelementptr <2 x i64>* @x, i32 7
     39 	store <2 x i64> %y, <2 x i64>* %t, align 1
     40         ret void
     41 }
     42 
     43 define void @hem_store(i32 %i, <2 x i64> %y) {
     44 	%t = getelementptr <2 x i64>* @x, i32 %i
     45 	store <2 x i64> %y, <2 x i64>* %t, align 1
     46         ret void
     47 }
     48 
     49 define void @hem_2d_store(i32 %i, i32 %j, <2 x i64> %y) {
     50 	%t = getelementptr [13 x <2 x i64>]* @xx, i32 %i, i32 %j
     51 	store <2 x i64> %y, <2 x i64>* %t, align 1
     52         ret void
     53 }
     54 
     55 define void @foo_store(<2 x i64> %y) {
     56 	store <2 x i64> %y, <2 x i64>* @x, align 1
     57         ret void
     58 }
     59 
     60 define void @bar_store(<2 x i64> %y) {
     61 	%t = alloca <2 x i64>
     62         call void @kip(<2 x i64>* %t)
     63 	store <2 x i64> %y, <2 x i64>* %t, align 1
     64         ret void
     65 }
     66 
     67 declare void @kip(<2 x i64>* %t)
     68