llvm.org GIT mirror llvm / 690b417
Merge r100936 from mainline to fix PR6760. git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_27@101137 91177308-0d34-0410-b5e6-96231b3b80d8 Tanya Lattner 10 years ago
2 changed file(s) with 29 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
954954 continue; // Otherwise, storing through it, or storing into GV... fine.
955955 }
956956
957 if (isa(Inst)) {
957 // Must index into the array and into the struct.
958 if (isa(Inst) && Inst->getNumOperands() >= 3) {
958959 if (!ValueIsOnlyUsedLocallyOrStoredToOneGlobal(Inst, GV, PHIs))
959960 return false;
960961 continue;
88 @_ZL6vTwist = global %struct.btSimdScalar zeroinitializer ; <%struct.btSimdScalar*> [#uses=1]
99 @llvm.global_ctors = appending global [1 x %0] [%0 { i32 65535, void ()* @_GLOBAL__I__ZN21btConeTwistConstraintC2Ev }] ; <[12 x %0]*> [#uses=0]
1010
11 define internal void @_GLOBAL__I__ZN21btConeTwistConstraintC2Ev() nounwind section "__TEXT,__StaticInit,regular,pure_instructions" {
11 define internal void @_GLOBAL__I__ZN21btConeTwistConstraintC2Ev() nounwind section "__TEXT,__StaticInit,regular,pure_instructions" {
1212 entry:
1313 store float 1.0, float* getelementptr inbounds (%struct.btSimdScalar* @_ZL6vTwist, i32 0, i32 0, i32 0, i32 3), align 4
1414 ret void
1515 }
16
17
18 ; PR6760
19 %T = type { [5 x i32] }
20
21 @switch_inf = internal global %T* null
22
23 define void @test(i8* %arch_file, i32 %route_type) {
24 entry:
25 %A = sext i32 1 to i64
26 %B = mul i64 %A, 20
27 %C = call noalias i8* @malloc(i64 %B) nounwind
28 %D = bitcast i8* %C to %T*
29 store %T* %D, %T** @switch_inf, align 8
30 unreachable
31
32 bb.nph.i:
33 %scevgep.i539 = getelementptr i8* %C, i64 4
34 unreachable
35
36 xx:
37 %E = load %T** @switch_inf, align 8
38 unreachable
39 }
40
41 declare noalias i8* @malloc(i64) nounwind