1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -S -instsimplify < %s | FileCheck %s
define <4 x i32> @test1(<4 x i32> %A) {
; CHECK-LABEL: @test1(
; CHECK-NEXT: ret <4 x i32> undef
;
%I = insertelement <4 x i32> %A, i32 5, i64 4294967296
ret <4 x i32> %I
}
define <4 x i32> @test2(<4 x i32> %A) {
; CHECK-LABEL: @test2(
; CHECK-NEXT: ret <4 x i32> undef
;
%I = insertelement <4 x i32> %A, i32 5, i64 4
ret <4 x i32> %I
}
define <4 x i32> @test3(<4 x i32> %A) {
; CHECK-LABEL: @test3(
; CHECK-NEXT: [[I:%.*]] = insertelement <4 x i32> [[A:%.*]], i32 5, i64 1
; CHECK-NEXT: ret <4 x i32> [[I]]
;
%I = insertelement <4 x i32> %A, i32 5, i64 1
ret <4 x i32> %I
}
define <4 x i32> @test4(<4 x i32> %A) {
; CHECK-LABEL: @test4(
; CHECK-NEXT: ret <4 x i32> undef
;
%I = insertelement <4 x i32> %A, i32 5, i128 100
ret <4 x i32> %I
}
define <4 x i32> @test5(<4 x i32> %A) {
; CHECK-LABEL: @test5(
; CHECK-NEXT: ret <4 x i32> undef
;
%I = insertelement <4 x i32> %A, i32 5, i64 undef
ret <4 x i32> %I
}
define <4 x i32> @PR1286(<4 x i32> %A) {
; CHECK-LABEL: @PR1286(
; CHECK-NEXT: ret <4 x i32> [[A:%.*]]
;
%B = insertelement <4 x i32> %A, i32 undef, i32 1
ret <4 x i32> %B
}
|