Files
clang-p2996/llvm/test/Transforms/CodeGenPrepare/ARM/dead-gep.ll
Matt Arsenault d9e51e7552 CodeGenPrepare: Convert most tests to opaque pointers
NVPTX/dont-introduce-addrspacecast.ll required manually removing a check for
a bitcast.

AArch64/combine-address-mode.ll required rerunning update_test_checks

Mips required some manual updates due to a CHECK-NEXT coming after a
deleted bitcast.

ARM/sink-addrmode.ll needed one small manual fix.

Excludes one X86 function which needs more attention.
2022-11-28 09:21:59 -05:00

20 lines
514 B
LLVM

; RUN: opt -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
}