@@ -580,11 +580,11 @@ define i32 @test20_as1(ptr addrspace(1) %P, i32 %A, i32 %B) {
580580}
581581
582582
583- define i32 @test21 () {
583+ define i32 @test21 (ptr %pbob1 ) {
584584; CHECK-LABEL: @test21(
585- ; CHECK-NEXT: ret i32 undef
585+ ; CHECK-NEXT: [[RVAL:%.*]] = load i32, ptr [[PBOB1:%.*]], align 4
586+ ; CHECK-NEXT: ret i32 [[RVAL]]
586587;
587- %pbob1 = alloca %intstruct
588588 %pbob2 = getelementptr %intstruct , ptr %pbob1
589589 %rval = load i32 , ptr %pbob2
590590 ret i32 %rval
@@ -652,13 +652,16 @@ define i1 @test26(ptr %arr) {
652652 %struct.siginfo_t = type { i32 , i32 , i32 , { { i32 , i32 , [0 x i8 ], %struct.sigval_t , i32 }, [88 x i8 ] } }
653653 %struct.sigval_t = type { ptr }
654654
655- define i32 @test27 (ptr %to , ptr %from ) {
655+ define i32 @test27 (ptr %to , ptr %from , ptr %from_addr ) {
656656; CHECK-LABEL: @test27(
657657; CHECK-NEXT: entry:
658+ ; CHECK-NEXT: [[T344:%.*]] = load ptr, ptr [[FROM_ADDR:%.*]], align 8
659+ ; CHECK-NEXT: [[T348:%.*]] = getelementptr i8, ptr [[T344]], i64 24
660+ ; CHECK-NEXT: [[T351:%.*]] = load i32, ptr [[T348]], align 8
661+ ; CHECK-NEXT: [[T360:%.*]] = call i32 asm sideeffect "...", "=r,ir,*m,i,0,~{dirflag},~{fpsr},~{flags}"(i32 [[T351]], ptr elementtype([[STRUCT___LARGE_STRUCT:%.*]]) null, i32 -14, i32 0) #[[ATTR0:[0-9]+]]
658662; CHECK-NEXT: unreachable
659663;
660664entry:
661- %from_addr = alloca ptr
662665 %t344 = load ptr , ptr %from_addr , align 8
663666 %t345 = getelementptr %struct.siginfo_t , ptr %t344 , i32 0 , i32 3
664667 %t346 = getelementptr { { i32 , i32 , [0 x i8 ], %struct.sigval_t , i32 }, [88 x i8 ] }, ptr %t345 , i32 0 , i32 0
@@ -1335,13 +1338,14 @@ define ptr @D98588(ptr %c1, i64 %offset) {
13351338
13361339declare noalias ptr @malloc (i64 ) nounwind allockind("alloc,uninitialized" ) allocsize(0 )
13371340
1338- define i32 @test_gep_bitcast_malloc (ptr %a ) {
1341+ define i32 @test_gep_bitcast_malloc (ptr %a , ptr %call ) {
13391342; CHECK-LABEL: @test_gep_bitcast_malloc(
13401343; CHECK-NEXT: entry:
1341- ; CHECK-NEXT: ret i32 undef
1344+ ; CHECK-NEXT: [[G3:%.*]] = getelementptr inbounds i8, ptr [[CALL:%.*]], i64 12
1345+ ; CHECK-NEXT: [[A_C:%.*]] = load i32, ptr [[G3]], align 4
1346+ ; CHECK-NEXT: ret i32 [[A_C]]
13421347;
13431348entry:
1344- %call = call noalias ptr @malloc (i64 16 ) #2
13451349 %g3 = getelementptr %struct.A , ptr %call , i32 0 , i32 2
13461350 %a_c = load i32 , ptr %g3 , align 4
13471351 ret i32 %a_c
0 commit comments