1864dda5fSJuneyoung Lee; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2*b280ee1dSBjorn Pettersson; RUN: opt < %s -passes=instsimplify -S | FileCheck %s
3864dda5fSJuneyoung Lee
4864dda5fSJuneyoung Leedefine {i32, i32} @poison({i32, i32} %x) {
5864dda5fSJuneyoung Lee; CHECK-LABEL: @poison(
6864dda5fSJuneyoung Lee; CHECK-NEXT:    ret { i32, i32 } [[X:%.*]]
7864dda5fSJuneyoung Lee;
8864dda5fSJuneyoung Lee  %v = insertvalue {i32, i32} %x, i32 poison, 0
9864dda5fSJuneyoung Lee  ret {i32, i32} %v
10864dda5fSJuneyoung Lee}
11864dda5fSJuneyoung Lee
12864dda5fSJuneyoung Leedefine {i32, i32} @poison2({i32, i32} %x) {
13864dda5fSJuneyoung Lee; CHECK-LABEL: @poison2(
14864dda5fSJuneyoung Lee; CHECK-NEXT:    ret { i32, i32 } [[X:%.*]]
15864dda5fSJuneyoung Lee;
16864dda5fSJuneyoung Lee  %elem = extractvalue {i32, i32} %x, 0
17864dda5fSJuneyoung Lee  %v = insertvalue {i32, i32} poison, i32 %elem, 0
18864dda5fSJuneyoung Lee  ret {i32, i32} %v
19864dda5fSJuneyoung Lee}
20