1 ; RUN: opt < %s -instcombine -S | FileCheck %s
3 ; Don't assume that external global variables have their preferred
4 ; alignment. They may only have the ABI minimum alignment.
6 ; CHECK: %s = shl i64 %a, 3
7 ; CHECK: %r = or i64 %s, ptrtoint (i32* @A to i64)
8 ; CHECK: %q = add i64 %r, 1
11 target datalayout = "-i32:8:32"
13 @A = external global i32
14 @B = external global i32
16 define i64 @foo(i64 %a) {
17 %t = ptrtoint i32* @A to i64