mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 12:43:36 +01:00
2dd3cf4898
Summary: Should not constant fold insertelement instruction for scalable vector type. Reviewers: huntergr, sdesmalen, spatel, levedev.ri, apazos, efriedma, willlovett Reviewed By: efriedma, spatel Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70985
20 lines
676 B
LLVM
20 lines
676 B
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
|
; RUN: opt < %s -constprop -S | FileCheck %s
|
|
|
|
|
|
define <4 x i32> @insertelement_fixedlength_constant() {
|
|
; CHECK-LABEL: @insertelement_fixedlength_constant(
|
|
; CHECK-NEXT: ret <4 x i32> <i32 1, i32 undef, i32 undef, i32 undef>
|
|
;
|
|
%i = insertelement <4 x i32> undef, i32 1, i32 0
|
|
ret <4 x i32> %i
|
|
}
|
|
|
|
define <vscale x 4 x i32> @insertelement_scalable_constant() {
|
|
; CHECK-LABEL: @insertelement_scalable_constant(
|
|
; CHECK-NEXT: ret <vscale x 4 x i32> insertelement (<vscale x 4 x i32> undef, i32 1, i32 0)
|
|
;
|
|
%i = insertelement <vscale x 4 x i32> undef, i32 1, i32 0
|
|
ret <vscale x 4 x i32> %i
|
|
}
|