brintos

brintos / llvm-project-archived public Read only

0
0
Text · 558 B · f844919 Raw
20 lines · plain
1; RUN: opt -passes='require<profile-summary>,function(codegenprepare)' -S %s -o - | FileCheck %s2target triple = "thumbv7-apple-ios7.0.0"3 4 5%struct = type [1000 x i32]6 7define void @test_dead_gep(ptr %t0) {8; CHECK-LABEL: define void @test_dead_gep9; CHECK-NOT: getelementptr10; CHECK: %t16 = load i32, ptr undef11; CHECK: ret void12 13  %t12 = getelementptr inbounds %struct, ptr %t0, i32 1, i32 50014  %t13 = load i32, ptr %t12, align 415  %t14 = icmp eq i32 %t13, 216  %t15 = select i1 %t14, ptr undef, ptr undef17  %t16 = load i32, ptr %t15, align 418  ret void19}20