Home | History | Annotate | Download | only in InstCombine
      1 ; RUN: opt < %s -instcombine -S | FileCheck %s
      2 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
      3 target triple = "x86_64-unknown-linux-gnu"
      4 
      5 ; Function Attrs: nounwind uwtable
      6 define i32 @foo1(i32* align 32 %a) #0 {
      7 entry:
      8   %0 = load i32, i32* %a, align 4
      9   ret i32 %0
     10 
     11 ; CHECK-LABEL: @foo1
     12 ; CHECK-DAG: load i32, i32* %a, align 32
     13 ; CHECK: ret i32
     14 }
     15 
     16 define i32 @foo2(i32* align 32 %a) #0 {
     17 entry:
     18   %v = call i32* @func1(i32* %a)
     19   %0 = load i32, i32* %v, align 4
     20   ret i32 %0
     21 
     22 ; CHECK-LABEL: @foo2
     23 ; CHECK-DAG: load i32, i32* %v, align 32
     24 ; CHECK: ret i32
     25 }
     26 
     27 declare i32* @func1(i32* returned) nounwind
     28 
     29