mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 02:52:53 +02:00
[ConstantFold][NFC] Move scalable vector unit tests under vscale.ll
This commit is contained in:
parent
3f01fba31d
commit
97695b832a
@ -1,12 +0,0 @@
|
|||||||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
|
||||||
; RUN: opt < %s -constprop -S -verify | FileCheck %s
|
|
||||||
|
|
||||||
define <vscale x 4 x float> @bitcast_scalable_constant() {
|
|
||||||
; CHECK-LABEL: @bitcast_scalable_constant(
|
|
||||||
; CHECK-NEXT: ret <vscale x 4 x float> bitcast (<vscale x 4 x i32> shufflevector (<vscale x 4 x i32> insertelement (<vscale x 4 x i32> undef, i32 1, i32 0), <vscale x 4 x i32> undef, <vscale x 4 x i32> zeroinitializer) to <vscale x 4 x float>)
|
|
||||||
;
|
|
||||||
%i1 = insertelement <vscale x 4 x i32> undef, i32 1, i32 0
|
|
||||||
%i2 = shufflevector <vscale x 4 x i32> %i1, <vscale x 4 x i32> undef, <vscale x 4 x i32> zeroinitializer
|
|
||||||
%i3 = bitcast <vscale x 4 x i32> %i2 to <vscale x 4 x float>
|
|
||||||
ret <vscale x 4 x float> %i3
|
|
||||||
}
|
|
@ -1,19 +0,0 @@
|
|||||||
; 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
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
|
||||||
; RUN: opt < %s -constprop -S | FileCheck %s
|
|
||||||
|
|
||||||
define <vscale x 4 x i32> @shufflevector_scalable_constant() {
|
|
||||||
; CHECK-LABEL: @shufflevector_scalable_constant(
|
|
||||||
; CHECK-NEXT: ret <vscale x 4 x i32> shufflevector (<vscale x 4 x i32> insertelement (<vscale x 4 x i32> undef, i32 1, i32 0), <vscale x 4 x i32> undef, <vscale x 4 x i32> zeroinitializer)
|
|
||||||
;
|
|
||||||
%i = insertelement <vscale x 4 x i32> undef, i32 1, i32 0
|
|
||||||
%i2 = shufflevector <vscale x 4 x i32> %i, <vscale x 4 x i32> undef, <vscale x 4 x i32> zeroinitializer
|
|
||||||
ret <vscale x 4 x i32> %i2
|
|
||||||
}
|
|
@ -1,5 +1,5 @@
|
|||||||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
||||||
; RUN: opt < %s -constprop -S | FileCheck %s
|
; RUN: opt < %s -constprop -S -verify | FileCheck %s
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; Unary Operations
|
;; Unary Operations
|
||||||
@ -165,6 +165,40 @@ define <vscale x 4 x i32> @xor() {
|
|||||||
ret <vscale x 4 x i32> %r
|
ret <vscale x 4 x i32> %r
|
||||||
}
|
}
|
||||||
|
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;; Vector Operations
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
|
define <vscale x 4 x i32> @insertelement() {
|
||||||
|
; CHECK-LABEL: @insertelement(
|
||||||
|
; 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
|
||||||
|
}
|
||||||
|
|
||||||
|
define <vscale x 4 x i32> @shufflevector() {
|
||||||
|
; CHECK-LABEL: @shufflevector(
|
||||||
|
; CHECK-NEXT: ret <vscale x 4 x i32> shufflevector (<vscale x 4 x i32> insertelement (<vscale x 4 x i32> undef, i32 1, i32 0), <vscale x 4 x i32> undef, <vscale x 4 x i32> zeroinitializer)
|
||||||
|
;
|
||||||
|
%i = insertelement <vscale x 4 x i32> undef, i32 1, i32 0
|
||||||
|
%i2 = shufflevector <vscale x 4 x i32> %i, <vscale x 4 x i32> undef, <vscale x 4 x i32> zeroinitializer
|
||||||
|
ret <vscale x 4 x i32> %i2
|
||||||
|
}
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;; Conversion Operations
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
|
define <vscale x 4 x float> @bitcast() {
|
||||||
|
; CHECK-LABEL: @bitcast(
|
||||||
|
; CHECK-NEXT: ret <vscale x 4 x float> bitcast (<vscale x 4 x i32> shufflevector (<vscale x 4 x i32> insertelement (<vscale x 4 x i32> undef, i32 1, i32 0), <vscale x 4 x i32> undef, <vscale x 4 x i32> zeroinitializer) to <vscale x 4 x float>)
|
||||||
|
;
|
||||||
|
%i1 = insertelement <vscale x 4 x i32> undef, i32 1, i32 0
|
||||||
|
%i2 = shufflevector <vscale x 4 x i32> %i1, <vscale x 4 x i32> undef, <vscale x 4 x i32> zeroinitializer
|
||||||
|
%i3 = bitcast <vscale x 4 x i32> %i2 to <vscale x 4 x float>
|
||||||
|
ret <vscale x 4 x float> %i3
|
||||||
|
}
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; Other Operations
|
;; Other Operations
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
Loading…
Reference in New Issue
Block a user