diff options
Diffstat (limited to 'test/CodeGen/Generic/pr33094.ll')
-rw-r--r-- | test/CodeGen/Generic/pr33094.ll | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/CodeGen/Generic/pr33094.ll b/test/CodeGen/Generic/pr33094.ll new file mode 100644 index 000000000000..afa464f63f66 --- /dev/null +++ b/test/CodeGen/Generic/pr33094.ll @@ -0,0 +1,18 @@ +; 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() { + ret i64 extractvalue (%Tuple select (i1 icmp eq + (%B* bitcast (%A* @A_Inst to %B*), %B* @B_Inst), + %Tuple { i64 33 }, %Tuple { i64 42 }), 0) +} |