llvm.org GIT mirror llvm / 2a2263e
Fix PR14204 - Add missing pattern on X86ISD::VZEXT from VR256 to VR256 when AVX2 is enabled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166947 91177308-0d34-0410-b5e6-96231b3b80d8 Michael Liao 7 years ago
2 changed file(s) with 30 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
58495849 def : Pat<(v4i64 (X86vzext (v8i16 VR128:$src))), (VPMOVZXWQYrr VR128:$src)>;
58505850
58515851 def : Pat<(v4i64 (X86vzext (v4i32 VR128:$src))), (VPMOVZXDQYrr VR128:$src)>;
5852
5853 def : Pat<(v16i16 (X86vzext (v32i8 VR256:$src))),
5854 (VPMOVZXBWYrr (EXTRACT_SUBREG VR256:$src, sub_xmm))>;
5855 def : Pat<(v8i32 (X86vzext (v32i8 VR256:$src))),
5856 (VPMOVZXBDYrr (EXTRACT_SUBREG VR256:$src, sub_xmm))>;
5857 def : Pat<(v4i64 (X86vzext (v32i8 VR256:$src))),
5858 (VPMOVZXBQYrr (EXTRACT_SUBREG VR256:$src, sub_xmm))>;
5859
5860 def : Pat<(v8i32 (X86vzext (v16i16 VR256:$src))),
5861 (VPMOVZXWDYrr (EXTRACT_SUBREG VR256:$src, sub_xmm))>;
5862 def : Pat<(v4i64 (X86vzext (v16i16 VR256:$src))),
5863 (VPMOVZXWQYrr (EXTRACT_SUBREG VR256:$src, sub_xmm))>;
5864
5865 def : Pat<(v4i64 (X86vzext (v8i32 VR256:$src))),
5866 (VPMOVZXDQYrr (EXTRACT_SUBREG VR256:$src, sub_xmm))>;
58525867 }
58535868
58545869 let Predicates = [HasAVX] in {
0 ; RUN: llc < %s -mtriple=x86_64-linux-pc -mcpu=core-avx2 | FileCheck %s
1
2 ; FIXME: vpmovsxwd should be generated instead of vpmovzxwd followed by
3 ; SLL/SRA.
4
5 define <8 x i32> @foo(<8 x i1> %bar) nounwind readnone {
6 entry:
7 %s = sext <8 x i1> %bar to <8 x i32>
8 ret <8 x i32> %s
9 ; CHECK: foo
10 ; CHECK: vpmovzxwd
11 ; CHECK: vpslld
12 ; CHECK: vpsrad
13 ; CHECK: ret
14 }