1 ; RUN: llc < %s -march=x86 -verify-coalescing | FileCheck %s
3 define i32* @test1(i32* %P, i32 %X) {
11 %gep.upgrd.1 = zext i32 %Y to i64
12 %P2 = getelementptr i32* %P, i64 %gep.upgrd.1
16 define i32* @test2(i32* %P, i32 %X) {
24 %gep.upgrd.2 = zext i32 %Y to i64
25 %P2 = getelementptr i32* %P, i64 %gep.upgrd.2
29 define i32* @test3(i32* %P, i32 %X) {
37 %P2 = getelementptr i32* %P, i32 %Y
41 define fastcc i32 @test4(i32* %d) {
48 %tmp512 = lshr i32 %tmp4, 24
52 define i64 @test5(i16 %i, i32* %arr) {
53 ; Ensure that we don't fold away shifts which have multiple uses, as they are
54 ; just re-introduced for the second use.
62 %i.zext = zext i16 %i to i32
63 %index = lshr i32 %i.zext, 11
64 %index.zext = zext i32 %index to i64
65 %val.ptr = getelementptr inbounds i32* %arr, i64 %index.zext
66 %val = load i32* %val.ptr
67 %val.zext = zext i32 %val to i64
68 %sum = add i64 %val.zext, %index.zext