bolt/deps/llvm-18.1.8/llvm/test/CodeGen/Generic/pr33094.ll

20 lines
423 B
LLVM
Raw Normal View History

2025-02-14 19:21:04 +01:00
; RUN: llc < %s
; PR33094
; Make sure that a constant extractvalue doesn't cause a crash in
; SelectionDAGBuilder::visitExtractValue.
%A = type {}
%B = type {}
%Tuple = type { i64 }
@A_Inst = global %A zeroinitializer
@B_Inst = global %B zeroinitializer
define i64 @foo() {
%s = select i1 icmp eq (ptr @A_Inst, ptr @B_Inst),
%Tuple { i64 33 }, %Tuple { i64 42 }
%e = extractvalue %Tuple %s, 0
ret i64 %e
}