The script mangled both virtual-functions-base-pointer-call.ll and virtual-functions-derived-pointer-call.ll pretty badly, deleting the run line and most of the block comment. Replaced the bitcast with and addrspacecast in 2002-07-17-CastRef.ll, based on the apparent intent of the test. For 2003-07-01-SelfReference.ll, the script produced "call ptr () @getfunc" which surprisingly parses as valid.
19 lines
452 B
LLVM
19 lines
452 B
LLVM
; RUN: opt -S -passes=globaldce < %s | FileCheck %s
|
|
|
|
@L = internal unnamed_addr constant [3 x ptr] [ptr blockaddress(@test1, %L1), ptr blockaddress(@test1, %L2), ptr null], align 16
|
|
|
|
; CHECK: @L = internal unnamed_addr constant
|
|
|
|
define void @test1(i32 %idx) {
|
|
entry:
|
|
br label %L1
|
|
|
|
L1:
|
|
%arrayidx = getelementptr inbounds [3 x ptr], ptr @L, i32 0, i32 %idx
|
|
%l = load ptr, ptr %arrayidx
|
|
indirectbr ptr %l, [label %L1, label %L2]
|
|
|
|
L2:
|
|
ret void
|
|
}
|