Files
clang-p2996/llvm/test/Transforms/InstSimplify/insertvalue.ll
Bjorn Pettersson b280ee1dd7 [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC
Another step moving away from the deprecated syntax of specifying
pass pipeline in opt.

Differential Revision: https://reviews.llvm.org/D119080
2022-02-07 14:26:58 +01:00

20 lines
542 B
LLVM

; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -passes=instsimplify -S | FileCheck %s
define {i32, i32} @poison({i32, i32} %x) {
; CHECK-LABEL: @poison(
; CHECK-NEXT: ret { i32, i32 } [[X:%.*]]
;
%v = insertvalue {i32, i32} %x, i32 poison, 0
ret {i32, i32} %v
}
define {i32, i32} @poison2({i32, i32} %x) {
; CHECK-LABEL: @poison2(
; CHECK-NEXT: ret { i32, i32 } [[X:%.*]]
;
%elem = extractvalue {i32, i32} %x, 0
%v = insertvalue {i32, i32} poison, i32 %elem, 0
ret {i32, i32} %v
}