Files
clang-p2996/llvm/test/CodeGen/Generic/pr33094.ll
Nikita Popov bbfb13a5ff [ConstExpr] Remove select constant expression
This removes the select constant expression, as part of
https://discourse.llvm.org/t/rfc-remove-most-constant-expressions/63179.
Uses of this expressions have already been removed in advance,
so this just removes related infrastructure and updates tests.

Differential Revision: https://reviews.llvm.org/D145382
2023-03-16 10:32:08 +01:00

20 lines
423 B
LLVM

; 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
}