mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Canonicalize splats as build_vectors (PR22283)
This is a follow-on patch to: http://reviews.llvm.org/D7093 That patch canonicalized constant splats as build_vectors, and this patch removes the constant check so we can canonicalize all splats as build_vectors. This fixes the 2nd test case in PR22283: http://llvm.org/bugs/show_bug.cgi?id=22283 The unfortunate code duplication between SelectionDAG and DAGCombiner is discussed in the earlier patch review. At least this patch is just removing code... This improves an existing x86 AVX test and changes codegen in an ARM test. Differential Revision: http://reviews.llvm.org/D7389 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229511 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -347,17 +347,17 @@ define <2 x float> @check_spr_splat2(<2 x float> %p, i16 %q) {
|
||||
|
||||
define <4 x float> @check_spr_splat4(<4 x float> %p, i16 %q) {
|
||||
;CHECK-LABEL: check_spr_splat4:
|
||||
;CHECK: vdup.32 q
|
||||
;CHECK: vld1.16
|
||||
%conv = sitofp i16 %q to float
|
||||
%splat.splatinsert = insertelement <4 x float> undef, float %conv, i32 0
|
||||
%splat.splat = shufflevector <4 x float> %splat.splatinsert, <4 x float> undef, <4 x i32> zeroinitializer
|
||||
%sub = fsub <4 x float> %splat.splat, %p
|
||||
ret <4 x float> %sub
|
||||
}
|
||||
|
||||
; Same codegen as above test; scalar is splatted using vld1, so shuffle index is irrelevant.
|
||||
define <4 x float> @check_spr_splat4_lane1(<4 x float> %p, i16 %q) {
|
||||
;CHECK-LABEL: check_spr_splat4_lane1:
|
||||
;CHECK: vdup.32 q{{.*}}, d{{.*}}[1]
|
||||
;CHECK: vld1.16
|
||||
%conv = sitofp i16 %q to float
|
||||
%splat.splatinsert = insertelement <4 x float> undef, float %conv, i32 1
|
||||
%splat.splat = shufflevector <4 x float> %splat.splatinsert, <4 x float> undef, <4 x i32> <i32 1, i32 1, i32 1, i32 1>
|
||||
|
Reference in New Issue
Block a user