1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -passes=instcombine
4 @_ZN11xercesc_2_5L11gDigitCharsE = external constant [32 x i16], align 2
5 @_ZN11xercesc_2_5L10gBaseCharsE = external constant [354 x i16], align 2
6 @_ZN11xercesc_2_5L17gIdeographicCharsE = external constant [7 x i16], align 2
7 @_ZN11xercesc_2_5L15gCombiningCharsE = external constant [163 x i16], align 2
9 define i32 @_ZN11xercesc_2_515XMLRangeFactory11buildRangesEv(i32 %x) {
10 %constexpr = ptrtoint ptr @_ZN11xercesc_2_5L11gDigitCharsE to i32
11 %constexpr1 = mul i32 %constexpr, -1
12 %constexpr2 = getelementptr inbounds [32 x i16], ptr @_ZN11xercesc_2_5L11gDigitCharsE, i32 0, i32 30
13 %constexpr3 = ptrtoint ptr %constexpr2 to i32
14 %constexpr4 = add i32 %constexpr1, %constexpr3
15 %constexpr5 = ashr i32 %constexpr4, 1
16 %constexpr6 = ptrtoint ptr @_ZN11xercesc_2_5L17gIdeographicCharsE to i32
17 %constexpr7 = mul i32 %constexpr6, -1
18 %constexpr8 = getelementptr inbounds [7 x i16], ptr @_ZN11xercesc_2_5L17gIdeographicCharsE, i32 0, i32 4
19 %constexpr9 = ptrtoint ptr %constexpr8 to i32
20 %constexpr10 = add i32 %constexpr7, %constexpr9
21 %constexpr11 = ashr i32 %constexpr10, 1
22 %constexpr12 = add i32 %constexpr5, %constexpr11
23 %constexpr13 = add i32 %constexpr12, 8
24 %a = add i32 %x, %constexpr13