Files
clang-p2996/llvm/test/Transforms/CodeGenPrepare/ARM/dead-gep.ll
Nick Anderson f1ec0d12bb Port CodeGenPrepare to new pass manager (and BasicBlockSectionsProfil… (#77182)
Port CodeGenPrepare to new pass manager and dependency
BasicBlockSectionsProfileReader
Fixes: #75380

Co-authored-by: Krishna-13-cyber <84722531+Krishna-13-cyber@users.noreply.github.com>
2024-01-09 13:32:59 +07:00

20 lines
558 B
LLVM

; RUN: opt -passes='require<profile-summary>,function(codegenprepare)' -S %s -o - | FileCheck %s
target triple = "thumbv7-apple-ios7.0.0"
%struct = type [1000 x i32]
define void @test_dead_gep(ptr %t0) {
; CHECK-LABEL: define void @test_dead_gep
; CHECK-NOT: getelementptr
; CHECK: %t16 = load i32, ptr undef
; CHECK: ret void
%t12 = getelementptr inbounds %struct, ptr %t0, i32 1, i32 500
%t13 = load i32, ptr %t12, align 4
%t14 = icmp eq i32 %t13, 2
%t15 = select i1 %t14, ptr undef, ptr undef
%t16 = load i32, ptr %t15, align 4
ret void
}