xref: /aosp_15_r20/external/llvm/test/Transforms/ConstantMerge/2002-09-23-CPR-Update.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: opt < %s -constmerge > /dev/null
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker@foo.upgrd.1 = internal constant { i32 } { i32 7 }              ; <{ i32 }*> [#uses=1]
4*9880d681SAndroid Build Coastguard Worker@bar = internal constant { i32 } { i32 7 }              ; <{ i32 }*> [#uses=1]
5*9880d681SAndroid Build Coastguard Worker
6*9880d681SAndroid Build Coastguard Workerdeclare i32 @test(i32*)
7*9880d681SAndroid Build Coastguard Worker
8*9880d681SAndroid Build Coastguard Workerdefine void @foo() {
9*9880d681SAndroid Build Coastguard Worker        call i32 @test( i32* getelementptr ({ i32 }, { i32 }* @foo.upgrd.1, i64 0, i32 0) )              ; <i32>:1 [#uses=0]
10*9880d681SAndroid Build Coastguard Worker        call i32 @test( i32* getelementptr ({ i32 }, { i32 }* @bar, i64 0, i32 0) )              ; <i32>:2 [#uses=0]
11*9880d681SAndroid Build Coastguard Worker        ret void
12*9880d681SAndroid Build Coastguard Worker}
13*9880d681SAndroid Build Coastguard Worker
14