2017-11-02 20:19:36 +08:00
|
|
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
2018-01-10 00:26:06 +08:00
|
|
|
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512f,+avx512bw,+avx512vl,+avx512dq,+fast-variable-shuffle -O2 | FileCheck %s --check-prefix=AVX512
|
|
|
|
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512f,+avx512bw,+avx512vl,+fast-variable-shuffle -O2 | FileCheck %s --check-prefix=AVX512NOTDQ
|
2017-11-02 20:19:36 +08:00
|
|
|
|
|
|
|
define void @load_v8i1_broadcast_4_v2i1(<8 x i1>* %a0,<2 x double> %a1,<2 x double> %a2,<2 x double>* %a3) {
|
|
|
|
; AVX512-LABEL: load_v8i1_broadcast_4_v2i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 4(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: vpmovm2q %k0, %xmm2
|
|
|
|
; AVX512-NEXT: vpbroadcastq %xmm2, %xmm2
|
|
|
|
; AVX512-NEXT: vpmovq2m %xmm2, %k1
|
|
|
|
; AVX512-NEXT: vmovapd %xmm0, %xmm1 {%k1}
|
|
|
|
; AVX512-NEXT: vmovapd %xmm1, (%rsi)
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v8i1_broadcast_4_v2i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movzbl 4(%rdi), %eax
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %eax, %k1
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpcmpeqd %xmm2, %xmm2, %xmm2
|
|
|
|
; AVX512NOTDQ-NEXT: vmovdqa64 %xmm2, %xmm2 {%k1} {z}
|
|
|
|
; AVX512NOTDQ-NEXT: vpbroadcastq %xmm2, %xmm2
|
|
|
|
; AVX512NOTDQ-NEXT: vptestmq %xmm2, %xmm2, %k1
|
|
|
|
; AVX512NOTDQ-NEXT: vmovapd %xmm0, %xmm1 {%k1}
|
|
|
|
; AVX512NOTDQ-NEXT: vmovapd %xmm1, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <8 x i1>, <8 x i1>* %a0
|
|
|
|
%d1 = shufflevector <8 x i1> %d0,<8 x i1> undef,<2 x i32><i32 4,i32 4>
|
|
|
|
%d2 = select <2 x i1> %d1, <2 x double> %a1, <2 x double> %a2
|
|
|
|
store <2 x double> %d2, <2 x double>* %a3
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v8i1_broadcast_7_v2i1(<8 x i1>* %a0,<2 x double> %a1,<2 x double> %a2,<2 x double>* %a3) {
|
|
|
|
; AVX512-LABEL: load_v8i1_broadcast_7_v2i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 6(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: vpmovm2q %k0, %xmm2
|
|
|
|
; AVX512-NEXT: vpshufd {{.*#+}} xmm2 = xmm2[2,3,2,3]
|
|
|
|
; AVX512-NEXT: vpmovq2m %xmm2, %k1
|
|
|
|
; AVX512-NEXT: vmovapd %xmm0, %xmm1 {%k1}
|
|
|
|
; AVX512-NEXT: vmovapd %xmm1, (%rsi)
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v8i1_broadcast_7_v2i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movzbl 6(%rdi), %eax
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %eax, %k1
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpcmpeqd %xmm2, %xmm2, %xmm2
|
|
|
|
; AVX512NOTDQ-NEXT: vmovdqa64 %xmm2, %xmm2 {%k1} {z}
|
|
|
|
; AVX512NOTDQ-NEXT: vpshufd {{.*#+}} xmm2 = xmm2[2,3,2,3]
|
|
|
|
; AVX512NOTDQ-NEXT: vptestmq %xmm2, %xmm2, %k1
|
|
|
|
; AVX512NOTDQ-NEXT: vmovapd %xmm0, %xmm1 {%k1}
|
|
|
|
; AVX512NOTDQ-NEXT: vmovapd %xmm1, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <8 x i1>, <8 x i1>* %a0
|
|
|
|
%d1 = shufflevector <8 x i1> %d0,<8 x i1> undef,<2 x i32><i32 7,i32 7>
|
|
|
|
%d2 = select <2 x i1> %d1, <2 x double> %a1, <2 x double> %a2
|
|
|
|
store <2 x double> %d2, <2 x double>* %a3
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v16i1_broadcast_8_v2i1(<16 x i1>* %a0,<2 x double> %a1,<2 x double> %a2,<2 x double>* %a3) {
|
|
|
|
; AVX512-LABEL: load_v16i1_broadcast_8_v2i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 8(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: vpmovm2q %k0, %xmm2
|
|
|
|
; AVX512-NEXT: vpbroadcastq %xmm2, %xmm2
|
|
|
|
; AVX512-NEXT: vpmovq2m %xmm2, %k1
|
|
|
|
; AVX512-NEXT: vmovapd %xmm0, %xmm1 {%k1}
|
|
|
|
; AVX512-NEXT: vmovapd %xmm1, (%rsi)
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v16i1_broadcast_8_v2i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movzbl 8(%rdi), %eax
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %eax, %k1
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpcmpeqd %xmm2, %xmm2, %xmm2
|
|
|
|
; AVX512NOTDQ-NEXT: vmovdqa64 %xmm2, %xmm2 {%k1} {z}
|
|
|
|
; AVX512NOTDQ-NEXT: vpbroadcastq %xmm2, %xmm2
|
|
|
|
; AVX512NOTDQ-NEXT: vptestmq %xmm2, %xmm2, %k1
|
|
|
|
; AVX512NOTDQ-NEXT: vmovapd %xmm0, %xmm1 {%k1}
|
|
|
|
; AVX512NOTDQ-NEXT: vmovapd %xmm1, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <16 x i1>, <16 x i1>* %a0
|
|
|
|
%d1 = shufflevector <16 x i1> %d0,<16 x i1> undef,<2 x i32><i32 8,i32 8>
|
|
|
|
%d2 = select <2 x i1> %d1, <2 x double> %a1, <2 x double> %a2
|
|
|
|
store <2 x double> %d2, <2 x double>* %a3
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v16i1_broadcast_8_v4i1(<16 x i1>* %a0,<4 x float> %a1,<4 x float> %a2,<4 x float>* %a3) {
|
|
|
|
; AVX512-LABEL: load_v16i1_broadcast_8_v4i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 8(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: vpmovm2d %k0, %xmm2
|
|
|
|
; AVX512-NEXT: vpbroadcastd %xmm2, %xmm2
|
|
|
|
; AVX512-NEXT: vpmovd2m %xmm2, %k1
|
|
|
|
; AVX512-NEXT: vmovaps %xmm0, %xmm1 {%k1}
|
|
|
|
; AVX512-NEXT: vmovaps %xmm1, (%rsi)
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v16i1_broadcast_8_v4i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movzbl 8(%rdi), %eax
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %eax, %k1
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpcmpeqd %xmm2, %xmm2, %xmm2
|
|
|
|
; AVX512NOTDQ-NEXT: vmovdqa32 %xmm2, %xmm2 {%k1} {z}
|
|
|
|
; AVX512NOTDQ-NEXT: vpbroadcastd %xmm2, %xmm2
|
|
|
|
; AVX512NOTDQ-NEXT: vptestmd %xmm2, %xmm2, %k1
|
|
|
|
; AVX512NOTDQ-NEXT: vmovaps %xmm0, %xmm1 {%k1}
|
|
|
|
; AVX512NOTDQ-NEXT: vmovaps %xmm1, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <16 x i1>, <16 x i1>* %a0
|
|
|
|
%d1 = shufflevector <16 x i1> %d0,<16 x i1> undef,<4 x i32><i32 8,i32 8,i32 8,i32 8>
|
|
|
|
%d2 = select <4 x i1> %d1, <4 x float> %a1, <4 x float> %a2
|
|
|
|
store <4 x float> %d2, <4 x float>* %a3
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v16i1_broadcast_15_v2i1(<16 x i1>* %a0,<2 x double> %a1,<2 x double> %a2,<2 x double>* %a3) {
|
|
|
|
; AVX512-LABEL: load_v16i1_broadcast_15_v2i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 14(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: vpmovm2q %k0, %xmm2
|
|
|
|
; AVX512-NEXT: vpshufd {{.*#+}} xmm2 = xmm2[2,3,2,3]
|
|
|
|
; AVX512-NEXT: vpmovq2m %xmm2, %k1
|
|
|
|
; AVX512-NEXT: vmovapd %xmm0, %xmm1 {%k1}
|
|
|
|
; AVX512-NEXT: vmovapd %xmm1, (%rsi)
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v16i1_broadcast_15_v2i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movzbl 14(%rdi), %eax
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %eax, %k1
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpcmpeqd %xmm2, %xmm2, %xmm2
|
|
|
|
; AVX512NOTDQ-NEXT: vmovdqa64 %xmm2, %xmm2 {%k1} {z}
|
|
|
|
; AVX512NOTDQ-NEXT: vpshufd {{.*#+}} xmm2 = xmm2[2,3,2,3]
|
|
|
|
; AVX512NOTDQ-NEXT: vptestmq %xmm2, %xmm2, %k1
|
|
|
|
; AVX512NOTDQ-NEXT: vmovapd %xmm0, %xmm1 {%k1}
|
|
|
|
; AVX512NOTDQ-NEXT: vmovapd %xmm1, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <16 x i1>, <16 x i1>* %a0
|
|
|
|
%d1 = shufflevector <16 x i1> %d0,<16 x i1> undef,<2 x i32><i32 15,i32 15>
|
|
|
|
%d2 = select <2 x i1> %d1, <2 x double> %a1, <2 x double> %a2
|
|
|
|
store <2 x double> %d2, <2 x double>* %a3
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v16i1_broadcast_15_v4i1(<16 x i1>* %a0,<4 x float> %a1,<4 x float> %a2,<4 x float>* %a3) {
|
|
|
|
; AVX512-LABEL: load_v16i1_broadcast_15_v4i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 12(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: vpmovm2d %k0, %xmm2
|
|
|
|
; AVX512-NEXT: vpshufd {{.*#+}} xmm2 = xmm2[3,3,3,3]
|
|
|
|
; AVX512-NEXT: vpmovd2m %xmm2, %k1
|
|
|
|
; AVX512-NEXT: vmovaps %xmm0, %xmm1 {%k1}
|
|
|
|
; AVX512-NEXT: vmovaps %xmm1, (%rsi)
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v16i1_broadcast_15_v4i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movzbl 12(%rdi), %eax
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %eax, %k1
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpcmpeqd %xmm2, %xmm2, %xmm2
|
|
|
|
; AVX512NOTDQ-NEXT: vmovdqa32 %xmm2, %xmm2 {%k1} {z}
|
|
|
|
; AVX512NOTDQ-NEXT: vpshufd {{.*#+}} xmm2 = xmm2[3,3,3,3]
|
|
|
|
; AVX512NOTDQ-NEXT: vptestmd %xmm2, %xmm2, %k1
|
|
|
|
; AVX512NOTDQ-NEXT: vmovaps %xmm0, %xmm1 {%k1}
|
|
|
|
; AVX512NOTDQ-NEXT: vmovaps %xmm1, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <16 x i1>, <16 x i1>* %a0
|
|
|
|
%d1 = shufflevector <16 x i1> %d0,<16 x i1> undef,<4 x i32><i32 15,i32 15,i32 15,i32 15>
|
|
|
|
%d2 = select <4 x i1> %d1, <4 x float> %a1, <4 x float> %a2
|
|
|
|
store <4 x float> %d2, <4 x float>* %a3
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v32i1_broadcast_16_v2i1(<32 x i1>* %a0,<2 x double> %a1,<2 x double> %a2,<2 x double>* %a3) {
|
|
|
|
; AVX512-LABEL: load_v32i1_broadcast_16_v2i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 16(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: vpmovm2q %k0, %xmm2
|
|
|
|
; AVX512-NEXT: vpbroadcastq %xmm2, %xmm2
|
|
|
|
; AVX512-NEXT: vpmovq2m %xmm2, %k1
|
|
|
|
; AVX512-NEXT: vmovapd %xmm0, %xmm1 {%k1}
|
|
|
|
; AVX512-NEXT: vmovapd %xmm1, (%rsi)
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v32i1_broadcast_16_v2i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movzbl 16(%rdi), %eax
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %eax, %k1
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpcmpeqd %xmm2, %xmm2, %xmm2
|
|
|
|
; AVX512NOTDQ-NEXT: vmovdqa64 %xmm2, %xmm2 {%k1} {z}
|
|
|
|
; AVX512NOTDQ-NEXT: vpbroadcastq %xmm2, %xmm2
|
|
|
|
; AVX512NOTDQ-NEXT: vptestmq %xmm2, %xmm2, %k1
|
|
|
|
; AVX512NOTDQ-NEXT: vmovapd %xmm0, %xmm1 {%k1}
|
|
|
|
; AVX512NOTDQ-NEXT: vmovapd %xmm1, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <32 x i1>, <32 x i1>* %a0
|
|
|
|
%d1 = shufflevector <32 x i1> %d0,<32 x i1> undef,<2 x i32><i32 16,i32 16>
|
|
|
|
%d2 = select <2 x i1> %d1, <2 x double> %a1, <2 x double> %a2
|
|
|
|
store <2 x double> %d2, <2 x double>* %a3
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v32i1_broadcast_16_v4i1(<32 x i1>* %a0,<4 x float> %a1,<4 x float> %a2,<4 x float>* %a3) {
|
|
|
|
; AVX512-LABEL: load_v32i1_broadcast_16_v4i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 16(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: vpmovm2d %k0, %xmm2
|
|
|
|
; AVX512-NEXT: vpbroadcastd %xmm2, %xmm2
|
|
|
|
; AVX512-NEXT: vpmovd2m %xmm2, %k1
|
|
|
|
; AVX512-NEXT: vmovaps %xmm0, %xmm1 {%k1}
|
|
|
|
; AVX512-NEXT: vmovaps %xmm1, (%rsi)
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v32i1_broadcast_16_v4i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movzbl 16(%rdi), %eax
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %eax, %k1
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpcmpeqd %xmm2, %xmm2, %xmm2
|
|
|
|
; AVX512NOTDQ-NEXT: vmovdqa32 %xmm2, %xmm2 {%k1} {z}
|
|
|
|
; AVX512NOTDQ-NEXT: vpbroadcastd %xmm2, %xmm2
|
|
|
|
; AVX512NOTDQ-NEXT: vptestmd %xmm2, %xmm2, %k1
|
|
|
|
; AVX512NOTDQ-NEXT: vmovaps %xmm0, %xmm1 {%k1}
|
|
|
|
; AVX512NOTDQ-NEXT: vmovaps %xmm1, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <32 x i1>, <32 x i1>* %a0
|
|
|
|
%d1 = shufflevector <32 x i1> %d0,<32 x i1> undef,<4 x i32><i32 16,i32 16,i32 16,i32 16>
|
|
|
|
%d2 = select <4 x i1> %d1, <4 x float> %a1, <4 x float> %a2
|
|
|
|
store <4 x float> %d2, <4 x float>* %a3
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v32i1_broadcast_16_v8i1(<32 x i1>* %a0,<8 x float> %a1,<8 x float> %a2,<8 x float>* %a3) {
|
|
|
|
; AVX512-LABEL: load_v32i1_broadcast_16_v8i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 16(%rdi), %k0
|
2017-12-22 02:44:06 +08:00
|
|
|
; AVX512-NEXT: vpmovm2d %k0, %ymm2
|
|
|
|
; AVX512-NEXT: vpbroadcastd %xmm2, %ymm2
|
|
|
|
; AVX512-NEXT: vpmovd2m %ymm2, %k1
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: vmovaps %ymm0, %ymm1 {%k1}
|
|
|
|
; AVX512-NEXT: vmovaps %ymm1, (%rsi)
|
|
|
|
; AVX512-NEXT: vzeroupper
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v32i1_broadcast_16_v8i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movzbl 16(%rdi), %eax
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %eax, %k1
|
2017-12-22 02:44:06 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpcmpeqd %ymm2, %ymm2, %ymm2
|
|
|
|
; AVX512NOTDQ-NEXT: vmovdqa32 %ymm2, %ymm2 {%k1} {z}
|
|
|
|
; AVX512NOTDQ-NEXT: vpbroadcastd %xmm2, %ymm2
|
|
|
|
; AVX512NOTDQ-NEXT: vptestmd %ymm2, %ymm2, %k1
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vmovaps %ymm0, %ymm1 {%k1}
|
|
|
|
; AVX512NOTDQ-NEXT: vmovaps %ymm1, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: vzeroupper
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <32 x i1>, <32 x i1>* %a0
|
|
|
|
%d1 = shufflevector <32 x i1> %d0,<32 x i1> undef,<8 x i32><i32 16,i32 16,i32 16,i32 16,i32 16,i32 16,i32 16,i32 16>
|
|
|
|
%d2 = select <8 x i1> %d1, <8 x float> %a1, <8 x float> %a2
|
|
|
|
store <8 x float> %d2, <8 x float>* %a3
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v32i1_broadcast_31_v2i1(<32 x i1>* %a0,<2 x double> %a1,<2 x double> %a2,<2 x double>* %a3) {
|
|
|
|
; AVX512-LABEL: load_v32i1_broadcast_31_v2i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 30(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: vpmovm2q %k0, %xmm2
|
|
|
|
; AVX512-NEXT: vpshufd {{.*#+}} xmm2 = xmm2[2,3,2,3]
|
|
|
|
; AVX512-NEXT: vpmovq2m %xmm2, %k1
|
|
|
|
; AVX512-NEXT: vmovapd %xmm0, %xmm1 {%k1}
|
|
|
|
; AVX512-NEXT: vmovapd %xmm1, (%rsi)
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v32i1_broadcast_31_v2i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movzbl 30(%rdi), %eax
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %eax, %k1
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpcmpeqd %xmm2, %xmm2, %xmm2
|
|
|
|
; AVX512NOTDQ-NEXT: vmovdqa64 %xmm2, %xmm2 {%k1} {z}
|
|
|
|
; AVX512NOTDQ-NEXT: vpshufd {{.*#+}} xmm2 = xmm2[2,3,2,3]
|
|
|
|
; AVX512NOTDQ-NEXT: vptestmq %xmm2, %xmm2, %k1
|
|
|
|
; AVX512NOTDQ-NEXT: vmovapd %xmm0, %xmm1 {%k1}
|
|
|
|
; AVX512NOTDQ-NEXT: vmovapd %xmm1, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <32 x i1>, <32 x i1>* %a0
|
|
|
|
%d1 = shufflevector <32 x i1> %d0,<32 x i1> undef,<2 x i32><i32 31,i32 31>
|
|
|
|
%d2 = select <2 x i1> %d1, <2 x double> %a1, <2 x double> %a2
|
|
|
|
store <2 x double> %d2, <2 x double>* %a3
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v32i1_broadcast_31_v4i1(<32 x i1>* %a0,<4 x float> %a1,<4 x float> %a2,<4 x float>* %a3) {
|
|
|
|
; AVX512-LABEL: load_v32i1_broadcast_31_v4i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 28(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: vpmovm2d %k0, %xmm2
|
|
|
|
; AVX512-NEXT: vpshufd {{.*#+}} xmm2 = xmm2[3,3,3,3]
|
|
|
|
; AVX512-NEXT: vpmovd2m %xmm2, %k1
|
|
|
|
; AVX512-NEXT: vmovaps %xmm0, %xmm1 {%k1}
|
|
|
|
; AVX512-NEXT: vmovaps %xmm1, (%rsi)
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v32i1_broadcast_31_v4i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movzbl 28(%rdi), %eax
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %eax, %k1
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpcmpeqd %xmm2, %xmm2, %xmm2
|
|
|
|
; AVX512NOTDQ-NEXT: vmovdqa32 %xmm2, %xmm2 {%k1} {z}
|
|
|
|
; AVX512NOTDQ-NEXT: vpshufd {{.*#+}} xmm2 = xmm2[3,3,3,3]
|
|
|
|
; AVX512NOTDQ-NEXT: vptestmd %xmm2, %xmm2, %k1
|
|
|
|
; AVX512NOTDQ-NEXT: vmovaps %xmm0, %xmm1 {%k1}
|
|
|
|
; AVX512NOTDQ-NEXT: vmovaps %xmm1, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <32 x i1>, <32 x i1>* %a0
|
|
|
|
%d1 = shufflevector <32 x i1> %d0,<32 x i1> undef,<4 x i32><i32 31,i32 31,i32 31,i32 31>
|
|
|
|
%d2 = select <4 x i1> %d1, <4 x float> %a1, <4 x float> %a2
|
|
|
|
store <4 x float> %d2, <4 x float>* %a3
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v32i1_broadcast_31_v8i1(<32 x i1>* %a0,<8 x float> %a1,<8 x float> %a2,<8 x float>* %a3) {
|
|
|
|
; AVX512-LABEL: load_v32i1_broadcast_31_v8i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 24(%rdi), %k0
|
2017-12-22 02:44:06 +08:00
|
|
|
; AVX512-NEXT: vpmovm2d %k0, %ymm2
|
2018-01-10 00:26:06 +08:00
|
|
|
; AVX512-NEXT: vpbroadcastd {{.*#+}} ymm3 = [7,7,7,7,7,7,7,7]
|
|
|
|
; AVX512-NEXT: vpermd %ymm2, %ymm3, %ymm2
|
2017-12-22 02:44:06 +08:00
|
|
|
; AVX512-NEXT: vpmovd2m %ymm2, %k1
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: vmovaps %ymm0, %ymm1 {%k1}
|
|
|
|
; AVX512-NEXT: vmovaps %ymm1, (%rsi)
|
|
|
|
; AVX512-NEXT: vzeroupper
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v32i1_broadcast_31_v8i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movzbl 24(%rdi), %eax
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %eax, %k1
|
2017-12-22 02:44:06 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpcmpeqd %ymm2, %ymm2, %ymm2
|
|
|
|
; AVX512NOTDQ-NEXT: vmovdqa32 %ymm2, %ymm2 {%k1} {z}
|
2018-01-10 00:26:06 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpbroadcastd {{.*#+}} ymm3 = [7,7,7,7,7,7,7,7]
|
|
|
|
; AVX512NOTDQ-NEXT: vpermd %ymm2, %ymm3, %ymm2
|
2017-12-22 02:44:06 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vptestmd %ymm2, %ymm2, %k1
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vmovaps %ymm0, %ymm1 {%k1}
|
|
|
|
; AVX512NOTDQ-NEXT: vmovaps %ymm1, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: vzeroupper
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <32 x i1>, <32 x i1>* %a0
|
|
|
|
%d1 = shufflevector <32 x i1> %d0,<32 x i1> undef,<8 x i32><i32 31,i32 31,i32 31,i32 31,i32 31,i32 31,i32 31,i32 31>
|
|
|
|
%d2 = select <8 x i1> %d1, <8 x float> %a1, <8 x float> %a2
|
|
|
|
store <8 x float> %d2, <8 x float>* %a3
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v64i1_broadcast_32_v2i1(<64 x i1>* %a0,<2 x double> %a1,<2 x double> %a2,<2 x double>* %a3) {
|
|
|
|
; AVX512-LABEL: load_v64i1_broadcast_32_v2i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 32(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: vpmovm2q %k0, %xmm2
|
|
|
|
; AVX512-NEXT: vpbroadcastq %xmm2, %xmm2
|
|
|
|
; AVX512-NEXT: vpmovq2m %xmm2, %k1
|
|
|
|
; AVX512-NEXT: vmovapd %xmm0, %xmm1 {%k1}
|
|
|
|
; AVX512-NEXT: vmovapd %xmm1, (%rsi)
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v64i1_broadcast_32_v2i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movzbl 32(%rdi), %eax
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %eax, %k1
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpcmpeqd %xmm2, %xmm2, %xmm2
|
|
|
|
; AVX512NOTDQ-NEXT: vmovdqa64 %xmm2, %xmm2 {%k1} {z}
|
|
|
|
; AVX512NOTDQ-NEXT: vpbroadcastq %xmm2, %xmm2
|
|
|
|
; AVX512NOTDQ-NEXT: vptestmq %xmm2, %xmm2, %k1
|
|
|
|
; AVX512NOTDQ-NEXT: vmovapd %xmm0, %xmm1 {%k1}
|
|
|
|
; AVX512NOTDQ-NEXT: vmovapd %xmm1, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <64 x i1>, <64 x i1>* %a0
|
|
|
|
%d1 = shufflevector <64 x i1> %d0,<64 x i1> undef,<2 x i32><i32 32,i32 32>
|
|
|
|
%d2 = select <2 x i1> %d1, <2 x double> %a1, <2 x double> %a2
|
|
|
|
store <2 x double> %d2, <2 x double>* %a3
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v64i1_broadcast_32_v4i1(<64 x i1>* %a0,<4 x float> %a1,<4 x float> %a2,<4 x float>* %a3) {
|
|
|
|
; AVX512-LABEL: load_v64i1_broadcast_32_v4i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 32(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: vpmovm2d %k0, %xmm2
|
|
|
|
; AVX512-NEXT: vpbroadcastd %xmm2, %xmm2
|
|
|
|
; AVX512-NEXT: vpmovd2m %xmm2, %k1
|
|
|
|
; AVX512-NEXT: vmovaps %xmm0, %xmm1 {%k1}
|
|
|
|
; AVX512-NEXT: vmovaps %xmm1, (%rsi)
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v64i1_broadcast_32_v4i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movzbl 32(%rdi), %eax
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %eax, %k1
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpcmpeqd %xmm2, %xmm2, %xmm2
|
|
|
|
; AVX512NOTDQ-NEXT: vmovdqa32 %xmm2, %xmm2 {%k1} {z}
|
|
|
|
; AVX512NOTDQ-NEXT: vpbroadcastd %xmm2, %xmm2
|
|
|
|
; AVX512NOTDQ-NEXT: vptestmd %xmm2, %xmm2, %k1
|
|
|
|
; AVX512NOTDQ-NEXT: vmovaps %xmm0, %xmm1 {%k1}
|
|
|
|
; AVX512NOTDQ-NEXT: vmovaps %xmm1, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <64 x i1>, <64 x i1>* %a0
|
|
|
|
%d1 = shufflevector <64 x i1> %d0,<64 x i1> undef,<4 x i32><i32 32,i32 32,i32 32,i32 32>
|
|
|
|
%d2 = select <4 x i1> %d1, <4 x float> %a1, <4 x float> %a2
|
|
|
|
store <4 x float> %d2, <4 x float>* %a3
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v64i1_broadcast_32_v8i1(<64 x i1>* %a0,<8 x float> %a1,<8 x float> %a2,<8 x float>* %a3) {
|
|
|
|
; AVX512-LABEL: load_v64i1_broadcast_32_v8i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 32(%rdi), %k0
|
2017-12-22 02:44:06 +08:00
|
|
|
; AVX512-NEXT: vpmovm2d %k0, %ymm2
|
|
|
|
; AVX512-NEXT: vpbroadcastd %xmm2, %ymm2
|
|
|
|
; AVX512-NEXT: vpmovd2m %ymm2, %k1
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: vmovaps %ymm0, %ymm1 {%k1}
|
|
|
|
; AVX512-NEXT: vmovaps %ymm1, (%rsi)
|
|
|
|
; AVX512-NEXT: vzeroupper
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v64i1_broadcast_32_v8i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movzbl 32(%rdi), %eax
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %eax, %k1
|
2017-12-22 02:44:06 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpcmpeqd %ymm2, %ymm2, %ymm2
|
|
|
|
; AVX512NOTDQ-NEXT: vmovdqa32 %ymm2, %ymm2 {%k1} {z}
|
|
|
|
; AVX512NOTDQ-NEXT: vpbroadcastd %xmm2, %ymm2
|
|
|
|
; AVX512NOTDQ-NEXT: vptestmd %ymm2, %ymm2, %k1
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vmovaps %ymm0, %ymm1 {%k1}
|
|
|
|
; AVX512NOTDQ-NEXT: vmovaps %ymm1, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: vzeroupper
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <64 x i1>, <64 x i1>* %a0
|
|
|
|
%d1 = shufflevector <64 x i1> %d0,<64 x i1> undef,<8 x i32><i32 32,i32 32,i32 32,i32 32,i32 32,i32 32,i32 32,i32 32>
|
|
|
|
%d2 = select <8 x i1> %d1, <8 x float> %a1, <8 x float> %a2
|
|
|
|
store <8 x float> %d2, <8 x float>* %a3
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v64i1_broadcast_32_v16i1(<64 x i1>* %a0,<16 x float> %a1,<16 x float> %a2,<16 x float>* %a3) {
|
|
|
|
; AVX512-LABEL: load_v64i1_broadcast_32_v16i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovw 32(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: vpmovm2d %k0, %zmm2
|
|
|
|
; AVX512-NEXT: vpbroadcastd %xmm2, %zmm2
|
|
|
|
; AVX512-NEXT: vpmovd2m %zmm2, %k1
|
|
|
|
; AVX512-NEXT: vmovaps %zmm0, %zmm1 {%k1}
|
|
|
|
; AVX512-NEXT: vmovaps %zmm1, (%rsi)
|
|
|
|
; AVX512-NEXT: vzeroupper
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v64i1_broadcast_32_v16i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: kmovw 32(%rdi), %k1
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
|
|
|
|
; AVX512NOTDQ-NEXT: vpbroadcastd %xmm2, %zmm2
|
|
|
|
; AVX512NOTDQ-NEXT: vptestmd %zmm2, %zmm2, %k1
|
|
|
|
; AVX512NOTDQ-NEXT: vmovaps %zmm0, %zmm1 {%k1}
|
|
|
|
; AVX512NOTDQ-NEXT: vmovaps %zmm1, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: vzeroupper
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <64 x i1>, <64 x i1>* %a0
|
|
|
|
%d1 = shufflevector <64 x i1> %d0,<64 x i1> undef,<16 x i32><i32 32,i32 32,i32 32,i32 32,i32 32,i32 32,i32 32,i32 32,i32 32,i32 32,i32 32,i32 32,i32 32,i32 32,i32 32,i32 32>
|
|
|
|
%d2 = select <16 x i1> %d1, <16 x float> %a1, <16 x float> %a2
|
|
|
|
store <16 x float> %d2, <16 x float>* %a3
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v64i1_broadcast_63_v2i1(<64 x i1>* %a0,<2 x double> %a1,<2 x double> %a2,<2 x double>* %a3) {
|
|
|
|
; AVX512-LABEL: load_v64i1_broadcast_63_v2i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 62(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: vpmovm2q %k0, %xmm2
|
|
|
|
; AVX512-NEXT: vpshufd {{.*#+}} xmm2 = xmm2[2,3,2,3]
|
|
|
|
; AVX512-NEXT: vpmovq2m %xmm2, %k1
|
|
|
|
; AVX512-NEXT: vmovapd %xmm0, %xmm1 {%k1}
|
|
|
|
; AVX512-NEXT: vmovapd %xmm1, (%rsi)
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v64i1_broadcast_63_v2i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movzbl 62(%rdi), %eax
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %eax, %k1
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpcmpeqd %xmm2, %xmm2, %xmm2
|
|
|
|
; AVX512NOTDQ-NEXT: vmovdqa64 %xmm2, %xmm2 {%k1} {z}
|
|
|
|
; AVX512NOTDQ-NEXT: vpshufd {{.*#+}} xmm2 = xmm2[2,3,2,3]
|
|
|
|
; AVX512NOTDQ-NEXT: vptestmq %xmm2, %xmm2, %k1
|
|
|
|
; AVX512NOTDQ-NEXT: vmovapd %xmm0, %xmm1 {%k1}
|
|
|
|
; AVX512NOTDQ-NEXT: vmovapd %xmm1, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <64 x i1>, <64 x i1>* %a0
|
|
|
|
%d1 = shufflevector <64 x i1> %d0,<64 x i1> undef,<2 x i32><i32 63,i32 63>
|
|
|
|
%d2 = select <2 x i1> %d1, <2 x double> %a1, <2 x double> %a2
|
|
|
|
store <2 x double> %d2, <2 x double>* %a3
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v64i1_broadcast_63_v4i1(<64 x i1>* %a0,<4 x float> %a1,<4 x float> %a2,<4 x float>* %a3) {
|
|
|
|
; AVX512-LABEL: load_v64i1_broadcast_63_v4i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 60(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: vpmovm2d %k0, %xmm2
|
|
|
|
; AVX512-NEXT: vpshufd {{.*#+}} xmm2 = xmm2[3,3,3,3]
|
|
|
|
; AVX512-NEXT: vpmovd2m %xmm2, %k1
|
|
|
|
; AVX512-NEXT: vmovaps %xmm0, %xmm1 {%k1}
|
|
|
|
; AVX512-NEXT: vmovaps %xmm1, (%rsi)
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v64i1_broadcast_63_v4i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movzbl 60(%rdi), %eax
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %eax, %k1
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpcmpeqd %xmm2, %xmm2, %xmm2
|
|
|
|
; AVX512NOTDQ-NEXT: vmovdqa32 %xmm2, %xmm2 {%k1} {z}
|
|
|
|
; AVX512NOTDQ-NEXT: vpshufd {{.*#+}} xmm2 = xmm2[3,3,3,3]
|
|
|
|
; AVX512NOTDQ-NEXT: vptestmd %xmm2, %xmm2, %k1
|
|
|
|
; AVX512NOTDQ-NEXT: vmovaps %xmm0, %xmm1 {%k1}
|
|
|
|
; AVX512NOTDQ-NEXT: vmovaps %xmm1, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <64 x i1>, <64 x i1>* %a0
|
|
|
|
%d1 = shufflevector <64 x i1> %d0,<64 x i1> undef,<4 x i32><i32 63,i32 63,i32 63,i32 63>
|
|
|
|
%d2 = select <4 x i1> %d1, <4 x float> %a1, <4 x float> %a2
|
|
|
|
store <4 x float> %d2, <4 x float>* %a3
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v64i1_broadcast_63_v8i1(<64 x i1>* %a0,<8 x float> %a1,<8 x float> %a2,<8 x float>* %a3) {
|
|
|
|
; AVX512-LABEL: load_v64i1_broadcast_63_v8i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 56(%rdi), %k0
|
2017-12-22 02:44:06 +08:00
|
|
|
; AVX512-NEXT: vpmovm2d %k0, %ymm2
|
2018-01-10 00:26:06 +08:00
|
|
|
; AVX512-NEXT: vpbroadcastd {{.*#+}} ymm3 = [7,7,7,7,7,7,7,7]
|
|
|
|
; AVX512-NEXT: vpermd %ymm2, %ymm3, %ymm2
|
2017-12-22 02:44:06 +08:00
|
|
|
; AVX512-NEXT: vpmovd2m %ymm2, %k1
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: vmovaps %ymm0, %ymm1 {%k1}
|
|
|
|
; AVX512-NEXT: vmovaps %ymm1, (%rsi)
|
|
|
|
; AVX512-NEXT: vzeroupper
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v64i1_broadcast_63_v8i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movzbl 56(%rdi), %eax
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %eax, %k1
|
2017-12-22 02:44:06 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpcmpeqd %ymm2, %ymm2, %ymm2
|
|
|
|
; AVX512NOTDQ-NEXT: vmovdqa32 %ymm2, %ymm2 {%k1} {z}
|
2018-01-10 00:26:06 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpbroadcastd {{.*#+}} ymm3 = [7,7,7,7,7,7,7,7]
|
|
|
|
; AVX512NOTDQ-NEXT: vpermd %ymm2, %ymm3, %ymm2
|
2017-12-22 02:44:06 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vptestmd %ymm2, %ymm2, %k1
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vmovaps %ymm0, %ymm1 {%k1}
|
|
|
|
; AVX512NOTDQ-NEXT: vmovaps %ymm1, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: vzeroupper
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <64 x i1>, <64 x i1>* %a0
|
|
|
|
%d1 = shufflevector <64 x i1> %d0,<64 x i1> undef,<8 x i32><i32 63,i32 63,i32 63,i32 63,i32 63,i32 63,i32 63,i32 63>
|
|
|
|
%d2 = select <8 x i1> %d1, <8 x float> %a1, <8 x float> %a2
|
|
|
|
store <8 x float> %d2, <8 x float>* %a3
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v64i1_broadcast_63_v16i1(<64 x i1>* %a0,<16 x float> %a1,<16 x float> %a2,<16 x float>* %a3) {
|
|
|
|
; AVX512-LABEL: load_v64i1_broadcast_63_v16i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovw 48(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: vpmovm2d %k0, %zmm2
|
|
|
|
; AVX512-NEXT: vpbroadcastd {{.*#+}} zmm3 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
|
|
|
|
; AVX512-NEXT: vpermd %zmm2, %zmm3, %zmm2
|
|
|
|
; AVX512-NEXT: vpmovd2m %zmm2, %k1
|
|
|
|
; AVX512-NEXT: vmovaps %zmm0, %zmm1 {%k1}
|
|
|
|
; AVX512-NEXT: vmovaps %zmm1, (%rsi)
|
|
|
|
; AVX512-NEXT: vzeroupper
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v64i1_broadcast_63_v16i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: kmovw 48(%rdi), %k1
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
|
|
|
|
; AVX512NOTDQ-NEXT: vpbroadcastd {{.*#+}} zmm3 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
|
|
|
|
; AVX512NOTDQ-NEXT: vpermd %zmm2, %zmm3, %zmm2
|
|
|
|
; AVX512NOTDQ-NEXT: vptestmd %zmm2, %zmm2, %k1
|
|
|
|
; AVX512NOTDQ-NEXT: vmovaps %zmm0, %zmm1 {%k1}
|
|
|
|
; AVX512NOTDQ-NEXT: vmovaps %zmm1, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: vzeroupper
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <64 x i1>, <64 x i1>* %a0
|
|
|
|
%d1 = shufflevector <64 x i1> %d0,<64 x i1> undef,<16 x i32><i32 63,i32 63,i32 63,i32 63,i32 63,i32 63,i32 63,i32 63,i32 63,i32 63,i32 63,i32 63,i32 63,i32 63,i32 63,i32 63>
|
|
|
|
%d2 = select <16 x i1> %d1, <16 x float> %a1, <16 x float> %a2
|
|
|
|
store <16 x float> %d2, <16 x float>* %a3
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v2i1_broadcast_1_v1i1_store(<2 x i1>* %a0,<1 x i1>* %a1) {
|
|
|
|
; AVX512-LABEL: load_v2i1_broadcast_1_v1i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 1(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: kmovb %k0, (%rsi)
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v2i1_broadcast_1_v1i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movb 1(%rdi), %al
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movb %al, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <2 x i1>, <2 x i1>* %a0
|
|
|
|
%d1 = shufflevector <2 x i1> %d0,<2 x i1> undef,<1 x i32><i32 1>
|
|
|
|
store <1 x i1> %d1, <1 x i1>* %a1
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v3i1_broadcast_1_v1i1_store(<3 x i1>* %a0,<1 x i1>* %a1) {
|
|
|
|
; AVX512-LABEL: load_v3i1_broadcast_1_v1i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 1(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: kmovb %k0, (%rsi)
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v3i1_broadcast_1_v1i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movb 1(%rdi), %al
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movb %al, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <3 x i1>, <3 x i1>* %a0
|
|
|
|
%d1 = shufflevector <3 x i1> %d0,<3 x i1> undef,<1 x i32><i32 1>
|
|
|
|
store <1 x i1> %d1, <1 x i1>* %a1
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v3i1_broadcast_2_v1i1_store(<3 x i1>* %a0,<1 x i1>* %a1) {
|
|
|
|
; AVX512-LABEL: load_v3i1_broadcast_2_v1i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 2(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: kmovb %k0, (%rsi)
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v3i1_broadcast_2_v1i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movb 2(%rdi), %al
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movb %al, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <3 x i1>, <3 x i1>* %a0
|
|
|
|
%d1 = shufflevector <3 x i1> %d0,<3 x i1> undef,<1 x i32><i32 2>
|
|
|
|
store <1 x i1> %d1, <1 x i1>* %a1
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v4i1_broadcast_2_v1i1_store(<4 x i1>* %a0,<1 x i1>* %a1) {
|
|
|
|
; AVX512-LABEL: load_v4i1_broadcast_2_v1i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 2(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: kmovb %k0, (%rsi)
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v4i1_broadcast_2_v1i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movb 2(%rdi), %al
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movb %al, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <4 x i1>, <4 x i1>* %a0
|
|
|
|
%d1 = shufflevector <4 x i1> %d0,<4 x i1> undef,<1 x i32><i32 2>
|
|
|
|
store <1 x i1> %d1, <1 x i1>* %a1
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v4i1_broadcast_3_v1i1_store(<4 x i1>* %a0,<1 x i1>* %a1) {
|
|
|
|
; AVX512-LABEL: load_v4i1_broadcast_3_v1i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 3(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: kmovb %k0, (%rsi)
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v4i1_broadcast_3_v1i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movb 3(%rdi), %al
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movb %al, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <4 x i1>, <4 x i1>* %a0
|
|
|
|
%d1 = shufflevector <4 x i1> %d0,<4 x i1> undef,<1 x i32><i32 3>
|
|
|
|
store <1 x i1> %d1, <1 x i1>* %a1
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v8i1_broadcast_4_v1i1_store(<8 x i1>* %a0,<1 x i1>* %a1) {
|
|
|
|
; AVX512-LABEL: load_v8i1_broadcast_4_v1i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 4(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: kmovb %k0, (%rsi)
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v8i1_broadcast_4_v1i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movb 4(%rdi), %al
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movb %al, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <8 x i1>, <8 x i1>* %a0
|
|
|
|
%d1 = shufflevector <8 x i1> %d0,<8 x i1> undef,<1 x i32><i32 4>
|
|
|
|
store <1 x i1> %d1, <1 x i1>* %a1
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v8i1_broadcast_4_v2i1_store(<8 x i1>* %a0,<2 x i1>* %a1) {
|
|
|
|
; AVX512-LABEL: load_v8i1_broadcast_4_v2i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 4(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: vpmovm2q %k0, %xmm0
|
|
|
|
; AVX512-NEXT: vpbroadcastq %xmm0, %xmm0
|
|
|
|
; AVX512-NEXT: vpmovq2m %xmm0, %k0
|
|
|
|
; AVX512-NEXT: kmovb %k0, (%rsi)
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v8i1_broadcast_4_v2i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movzbl 4(%rdi), %eax
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %eax, %k1
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpcmpeqd %xmm0, %xmm0, %xmm0
|
|
|
|
; AVX512NOTDQ-NEXT: vmovdqa64 %xmm0, %xmm0 {%k1} {z}
|
|
|
|
; AVX512NOTDQ-NEXT: vpbroadcastq %xmm0, %xmm0
|
|
|
|
; AVX512NOTDQ-NEXT: vptestmq %xmm0, %xmm0, %k0
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %k0, %eax
|
|
|
|
; AVX512NOTDQ-NEXT: movb %al, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <8 x i1>, <8 x i1>* %a0
|
|
|
|
%d1 = shufflevector <8 x i1> %d0,<8 x i1> undef,<2 x i32><i32 4,i32 4>
|
|
|
|
store <2 x i1> %d1, <2 x i1>* %a1
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v8i1_broadcast_7_v1i1_store(<8 x i1>* %a0,<1 x i1>* %a1) {
|
|
|
|
; AVX512-LABEL: load_v8i1_broadcast_7_v1i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 7(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: kmovb %k0, (%rsi)
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v8i1_broadcast_7_v1i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movb 7(%rdi), %al
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movb %al, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <8 x i1>, <8 x i1>* %a0
|
|
|
|
%d1 = shufflevector <8 x i1> %d0,<8 x i1> undef,<1 x i32><i32 7>
|
|
|
|
store <1 x i1> %d1, <1 x i1>* %a1
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v8i1_broadcast_7_v2i1_store(<8 x i1>* %a0,<2 x i1>* %a1) {
|
|
|
|
; AVX512-LABEL: load_v8i1_broadcast_7_v2i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 6(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: vpmovm2q %k0, %xmm0
|
|
|
|
; AVX512-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[2,3,2,3]
|
|
|
|
; AVX512-NEXT: vpmovq2m %xmm0, %k0
|
|
|
|
; AVX512-NEXT: kmovb %k0, (%rsi)
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v8i1_broadcast_7_v2i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movzbl 6(%rdi), %eax
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %eax, %k1
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpcmpeqd %xmm0, %xmm0, %xmm0
|
|
|
|
; AVX512NOTDQ-NEXT: vmovdqa64 %xmm0, %xmm0 {%k1} {z}
|
|
|
|
; AVX512NOTDQ-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[2,3,2,3]
|
|
|
|
; AVX512NOTDQ-NEXT: vptestmq %xmm0, %xmm0, %k0
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %k0, %eax
|
|
|
|
; AVX512NOTDQ-NEXT: movb %al, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <8 x i1>, <8 x i1>* %a0
|
|
|
|
%d1 = shufflevector <8 x i1> %d0,<8 x i1> undef,<2 x i32><i32 7,i32 7>
|
|
|
|
store <2 x i1> %d1, <2 x i1>* %a1
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v16i1_broadcast_8_v1i1_store(<16 x i1>* %a0,<1 x i1>* %a1) {
|
|
|
|
; AVX512-LABEL: load_v16i1_broadcast_8_v1i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 8(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: kmovb %k0, (%rsi)
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v16i1_broadcast_8_v1i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movb 8(%rdi), %al
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movb %al, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <16 x i1>, <16 x i1>* %a0
|
|
|
|
%d1 = shufflevector <16 x i1> %d0,<16 x i1> undef,<1 x i32><i32 8>
|
|
|
|
store <1 x i1> %d1, <1 x i1>* %a1
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v16i1_broadcast_8_v2i1_store(<16 x i1>* %a0,<2 x i1>* %a1) {
|
|
|
|
; AVX512-LABEL: load_v16i1_broadcast_8_v2i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 8(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: vpmovm2q %k0, %xmm0
|
|
|
|
; AVX512-NEXT: vpbroadcastq %xmm0, %xmm0
|
|
|
|
; AVX512-NEXT: vpmovq2m %xmm0, %k0
|
|
|
|
; AVX512-NEXT: kmovb %k0, (%rsi)
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v16i1_broadcast_8_v2i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movzbl 8(%rdi), %eax
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %eax, %k1
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpcmpeqd %xmm0, %xmm0, %xmm0
|
|
|
|
; AVX512NOTDQ-NEXT: vmovdqa64 %xmm0, %xmm0 {%k1} {z}
|
|
|
|
; AVX512NOTDQ-NEXT: vpbroadcastq %xmm0, %xmm0
|
|
|
|
; AVX512NOTDQ-NEXT: vptestmq %xmm0, %xmm0, %k0
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %k0, %eax
|
|
|
|
; AVX512NOTDQ-NEXT: movb %al, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <16 x i1>, <16 x i1>* %a0
|
|
|
|
%d1 = shufflevector <16 x i1> %d0,<16 x i1> undef,<2 x i32><i32 8,i32 8>
|
|
|
|
store <2 x i1> %d1, <2 x i1>* %a1
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v16i1_broadcast_8_v4i1_store(<16 x i1>* %a0,<4 x i1>* %a1) {
|
|
|
|
; AVX512-LABEL: load_v16i1_broadcast_8_v4i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 8(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: vpmovm2d %k0, %xmm0
|
|
|
|
; AVX512-NEXT: vpbroadcastd %xmm0, %xmm0
|
|
|
|
; AVX512-NEXT: vpmovd2m %xmm0, %k0
|
|
|
|
; AVX512-NEXT: kmovb %k0, (%rsi)
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v16i1_broadcast_8_v4i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movzbl 8(%rdi), %eax
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %eax, %k1
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpcmpeqd %xmm0, %xmm0, %xmm0
|
|
|
|
; AVX512NOTDQ-NEXT: vmovdqa32 %xmm0, %xmm0 {%k1} {z}
|
|
|
|
; AVX512NOTDQ-NEXT: vpbroadcastd %xmm0, %xmm0
|
|
|
|
; AVX512NOTDQ-NEXT: vptestmd %xmm0, %xmm0, %k0
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %k0, %eax
|
|
|
|
; AVX512NOTDQ-NEXT: movb %al, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <16 x i1>, <16 x i1>* %a0
|
|
|
|
%d1 = shufflevector <16 x i1> %d0,<16 x i1> undef,<4 x i32><i32 8,i32 8,i32 8,i32 8>
|
|
|
|
store <4 x i1> %d1, <4 x i1>* %a1
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v16i1_broadcast_15_v1i1_store(<16 x i1>* %a0,<1 x i1>* %a1) {
|
|
|
|
; AVX512-LABEL: load_v16i1_broadcast_15_v1i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 15(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: kmovb %k0, (%rsi)
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v16i1_broadcast_15_v1i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movb 15(%rdi), %al
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movb %al, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <16 x i1>, <16 x i1>* %a0
|
|
|
|
%d1 = shufflevector <16 x i1> %d0,<16 x i1> undef,<1 x i32><i32 15>
|
|
|
|
store <1 x i1> %d1, <1 x i1>* %a1
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v16i1_broadcast_15_v2i1_store(<16 x i1>* %a0,<2 x i1>* %a1) {
|
|
|
|
; AVX512-LABEL: load_v16i1_broadcast_15_v2i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 14(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: vpmovm2q %k0, %xmm0
|
|
|
|
; AVX512-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[2,3,2,3]
|
|
|
|
; AVX512-NEXT: vpmovq2m %xmm0, %k0
|
|
|
|
; AVX512-NEXT: kmovb %k0, (%rsi)
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v16i1_broadcast_15_v2i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movzbl 14(%rdi), %eax
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %eax, %k1
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpcmpeqd %xmm0, %xmm0, %xmm0
|
|
|
|
; AVX512NOTDQ-NEXT: vmovdqa64 %xmm0, %xmm0 {%k1} {z}
|
|
|
|
; AVX512NOTDQ-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[2,3,2,3]
|
|
|
|
; AVX512NOTDQ-NEXT: vptestmq %xmm0, %xmm0, %k0
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %k0, %eax
|
|
|
|
; AVX512NOTDQ-NEXT: movb %al, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <16 x i1>, <16 x i1>* %a0
|
|
|
|
%d1 = shufflevector <16 x i1> %d0,<16 x i1> undef,<2 x i32><i32 15,i32 15>
|
|
|
|
store <2 x i1> %d1, <2 x i1>* %a1
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v16i1_broadcast_15_v4i1_store(<16 x i1>* %a0,<4 x i1>* %a1) {
|
|
|
|
; AVX512-LABEL: load_v16i1_broadcast_15_v4i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 12(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: vpmovm2d %k0, %xmm0
|
|
|
|
; AVX512-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[3,3,3,3]
|
|
|
|
; AVX512-NEXT: vpmovd2m %xmm0, %k0
|
|
|
|
; AVX512-NEXT: kmovb %k0, (%rsi)
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v16i1_broadcast_15_v4i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movzbl 12(%rdi), %eax
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %eax, %k1
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpcmpeqd %xmm0, %xmm0, %xmm0
|
|
|
|
; AVX512NOTDQ-NEXT: vmovdqa32 %xmm0, %xmm0 {%k1} {z}
|
|
|
|
; AVX512NOTDQ-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[3,3,3,3]
|
|
|
|
; AVX512NOTDQ-NEXT: vptestmd %xmm0, %xmm0, %k0
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %k0, %eax
|
|
|
|
; AVX512NOTDQ-NEXT: movb %al, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <16 x i1>, <16 x i1>* %a0
|
|
|
|
%d1 = shufflevector <16 x i1> %d0,<16 x i1> undef,<4 x i32><i32 15,i32 15,i32 15,i32 15>
|
|
|
|
store <4 x i1> %d1, <4 x i1>* %a1
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v32i1_broadcast_16_v1i1_store(<32 x i1>* %a0,<1 x i1>* %a1) {
|
|
|
|
; AVX512-LABEL: load_v32i1_broadcast_16_v1i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 16(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: kmovb %k0, (%rsi)
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v32i1_broadcast_16_v1i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movb 16(%rdi), %al
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movb %al, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <32 x i1>, <32 x i1>* %a0
|
|
|
|
%d1 = shufflevector <32 x i1> %d0,<32 x i1> undef,<1 x i32><i32 16>
|
|
|
|
store <1 x i1> %d1, <1 x i1>* %a1
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v32i1_broadcast_16_v2i1_store(<32 x i1>* %a0,<2 x i1>* %a1) {
|
|
|
|
; AVX512-LABEL: load_v32i1_broadcast_16_v2i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 16(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: vpmovm2q %k0, %xmm0
|
|
|
|
; AVX512-NEXT: vpbroadcastq %xmm0, %xmm0
|
|
|
|
; AVX512-NEXT: vpmovq2m %xmm0, %k0
|
|
|
|
; AVX512-NEXT: kmovb %k0, (%rsi)
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v32i1_broadcast_16_v2i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movzbl 16(%rdi), %eax
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %eax, %k1
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpcmpeqd %xmm0, %xmm0, %xmm0
|
|
|
|
; AVX512NOTDQ-NEXT: vmovdqa64 %xmm0, %xmm0 {%k1} {z}
|
|
|
|
; AVX512NOTDQ-NEXT: vpbroadcastq %xmm0, %xmm0
|
|
|
|
; AVX512NOTDQ-NEXT: vptestmq %xmm0, %xmm0, %k0
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %k0, %eax
|
|
|
|
; AVX512NOTDQ-NEXT: movb %al, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <32 x i1>, <32 x i1>* %a0
|
|
|
|
%d1 = shufflevector <32 x i1> %d0,<32 x i1> undef,<2 x i32><i32 16,i32 16>
|
|
|
|
store <2 x i1> %d1, <2 x i1>* %a1
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v32i1_broadcast_16_v4i1_store(<32 x i1>* %a0,<4 x i1>* %a1) {
|
|
|
|
; AVX512-LABEL: load_v32i1_broadcast_16_v4i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 16(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: vpmovm2d %k0, %xmm0
|
|
|
|
; AVX512-NEXT: vpbroadcastd %xmm0, %xmm0
|
|
|
|
; AVX512-NEXT: vpmovd2m %xmm0, %k0
|
|
|
|
; AVX512-NEXT: kmovb %k0, (%rsi)
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v32i1_broadcast_16_v4i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movzbl 16(%rdi), %eax
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %eax, %k1
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpcmpeqd %xmm0, %xmm0, %xmm0
|
|
|
|
; AVX512NOTDQ-NEXT: vmovdqa32 %xmm0, %xmm0 {%k1} {z}
|
|
|
|
; AVX512NOTDQ-NEXT: vpbroadcastd %xmm0, %xmm0
|
|
|
|
; AVX512NOTDQ-NEXT: vptestmd %xmm0, %xmm0, %k0
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %k0, %eax
|
|
|
|
; AVX512NOTDQ-NEXT: movb %al, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <32 x i1>, <32 x i1>* %a0
|
|
|
|
%d1 = shufflevector <32 x i1> %d0,<32 x i1> undef,<4 x i32><i32 16,i32 16,i32 16,i32 16>
|
|
|
|
store <4 x i1> %d1, <4 x i1>* %a1
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v32i1_broadcast_16_v8i1_store(<32 x i1>* %a0,<8 x i1>* %a1) {
|
|
|
|
; AVX512-LABEL: load_v32i1_broadcast_16_v8i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 16(%rdi), %k0
|
2017-12-22 02:44:06 +08:00
|
|
|
; AVX512-NEXT: vpmovm2d %k0, %ymm0
|
|
|
|
; AVX512-NEXT: vpbroadcastd %xmm0, %ymm0
|
|
|
|
; AVX512-NEXT: vpmovd2m %ymm0, %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: kmovb %k0, (%rsi)
|
|
|
|
; AVX512-NEXT: vzeroupper
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v32i1_broadcast_16_v8i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movzbl 16(%rdi), %eax
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %eax, %k1
|
2017-12-22 02:44:06 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpcmpeqd %ymm0, %ymm0, %ymm0
|
|
|
|
; AVX512NOTDQ-NEXT: vmovdqa32 %ymm0, %ymm0 {%k1} {z}
|
|
|
|
; AVX512NOTDQ-NEXT: vpbroadcastd %xmm0, %ymm0
|
|
|
|
; AVX512NOTDQ-NEXT: vptestmd %ymm0, %ymm0, %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: kmovd %k0, %eax
|
|
|
|
; AVX512NOTDQ-NEXT: movb %al, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: vzeroupper
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <32 x i1>, <32 x i1>* %a0
|
|
|
|
%d1 = shufflevector <32 x i1> %d0,<32 x i1> undef,<8 x i32><i32 16,i32 16,i32 16,i32 16,i32 16,i32 16,i32 16,i32 16>
|
|
|
|
store <8 x i1> %d1, <8 x i1>* %a1
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v32i1_broadcast_31_v1i1_store(<32 x i1>* %a0,<1 x i1>* %a1) {
|
|
|
|
; AVX512-LABEL: load_v32i1_broadcast_31_v1i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 31(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: kmovb %k0, (%rsi)
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v32i1_broadcast_31_v1i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movb 31(%rdi), %al
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movb %al, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <32 x i1>, <32 x i1>* %a0
|
|
|
|
%d1 = shufflevector <32 x i1> %d0,<32 x i1> undef,<1 x i32><i32 31>
|
|
|
|
store <1 x i1> %d1, <1 x i1>* %a1
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v32i1_broadcast_31_v2i1_store(<32 x i1>* %a0,<2 x i1>* %a1) {
|
|
|
|
; AVX512-LABEL: load_v32i1_broadcast_31_v2i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 30(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: vpmovm2q %k0, %xmm0
|
|
|
|
; AVX512-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[2,3,2,3]
|
|
|
|
; AVX512-NEXT: vpmovq2m %xmm0, %k0
|
|
|
|
; AVX512-NEXT: kmovb %k0, (%rsi)
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v32i1_broadcast_31_v2i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movzbl 30(%rdi), %eax
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %eax, %k1
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpcmpeqd %xmm0, %xmm0, %xmm0
|
|
|
|
; AVX512NOTDQ-NEXT: vmovdqa64 %xmm0, %xmm0 {%k1} {z}
|
|
|
|
; AVX512NOTDQ-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[2,3,2,3]
|
|
|
|
; AVX512NOTDQ-NEXT: vptestmq %xmm0, %xmm0, %k0
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %k0, %eax
|
|
|
|
; AVX512NOTDQ-NEXT: movb %al, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <32 x i1>, <32 x i1>* %a0
|
|
|
|
%d1 = shufflevector <32 x i1> %d0,<32 x i1> undef,<2 x i32><i32 31,i32 31>
|
|
|
|
store <2 x i1> %d1, <2 x i1>* %a1
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v32i1_broadcast_31_v4i1_store(<32 x i1>* %a0,<4 x i1>* %a1) {
|
|
|
|
; AVX512-LABEL: load_v32i1_broadcast_31_v4i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 28(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: vpmovm2d %k0, %xmm0
|
|
|
|
; AVX512-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[3,3,3,3]
|
|
|
|
; AVX512-NEXT: vpmovd2m %xmm0, %k0
|
|
|
|
; AVX512-NEXT: kmovb %k0, (%rsi)
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v32i1_broadcast_31_v4i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movzbl 28(%rdi), %eax
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %eax, %k1
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpcmpeqd %xmm0, %xmm0, %xmm0
|
|
|
|
; AVX512NOTDQ-NEXT: vmovdqa32 %xmm0, %xmm0 {%k1} {z}
|
|
|
|
; AVX512NOTDQ-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[3,3,3,3]
|
|
|
|
; AVX512NOTDQ-NEXT: vptestmd %xmm0, %xmm0, %k0
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %k0, %eax
|
|
|
|
; AVX512NOTDQ-NEXT: movb %al, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <32 x i1>, <32 x i1>* %a0
|
|
|
|
%d1 = shufflevector <32 x i1> %d0,<32 x i1> undef,<4 x i32><i32 31,i32 31,i32 31,i32 31>
|
|
|
|
store <4 x i1> %d1, <4 x i1>* %a1
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v32i1_broadcast_31_v8i1_store(<32 x i1>* %a0,<8 x i1>* %a1) {
|
|
|
|
; AVX512-LABEL: load_v32i1_broadcast_31_v8i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 24(%rdi), %k0
|
2017-12-22 02:44:06 +08:00
|
|
|
; AVX512-NEXT: vpmovm2d %k0, %ymm0
|
2018-01-10 00:26:06 +08:00
|
|
|
; AVX512-NEXT: vpbroadcastd {{.*#+}} ymm1 = [7,7,7,7,7,7,7,7]
|
|
|
|
; AVX512-NEXT: vpermd %ymm0, %ymm1, %ymm0
|
2017-12-22 02:44:06 +08:00
|
|
|
; AVX512-NEXT: vpmovd2m %ymm0, %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: kmovb %k0, (%rsi)
|
|
|
|
; AVX512-NEXT: vzeroupper
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v32i1_broadcast_31_v8i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movzbl 24(%rdi), %eax
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %eax, %k1
|
2017-12-22 02:44:06 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpcmpeqd %ymm0, %ymm0, %ymm0
|
|
|
|
; AVX512NOTDQ-NEXT: vmovdqa32 %ymm0, %ymm0 {%k1} {z}
|
2018-01-10 00:26:06 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [7,7,7,7,7,7,7,7]
|
|
|
|
; AVX512NOTDQ-NEXT: vpermd %ymm0, %ymm1, %ymm0
|
2017-12-22 02:44:06 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vptestmd %ymm0, %ymm0, %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: kmovd %k0, %eax
|
|
|
|
; AVX512NOTDQ-NEXT: movb %al, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: vzeroupper
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <32 x i1>, <32 x i1>* %a0
|
|
|
|
%d1 = shufflevector <32 x i1> %d0,<32 x i1> undef,<8 x i32><i32 31,i32 31,i32 31,i32 31,i32 31,i32 31,i32 31,i32 31>
|
|
|
|
store <8 x i1> %d1, <8 x i1>* %a1
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v64i1_broadcast_32_v1i1_store(<64 x i1>* %a0,<1 x i1>* %a1) {
|
|
|
|
; AVX512-LABEL: load_v64i1_broadcast_32_v1i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 32(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: kmovb %k0, (%rsi)
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v64i1_broadcast_32_v1i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movb 32(%rdi), %al
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movb %al, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <64 x i1>, <64 x i1>* %a0
|
|
|
|
%d1 = shufflevector <64 x i1> %d0,<64 x i1> undef,<1 x i32><i32 32>
|
|
|
|
store <1 x i1> %d1, <1 x i1>* %a1
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v64i1_broadcast_32_v2i1_store(<64 x i1>* %a0,<2 x i1>* %a1) {
|
|
|
|
; AVX512-LABEL: load_v64i1_broadcast_32_v2i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 32(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: vpmovm2q %k0, %xmm0
|
|
|
|
; AVX512-NEXT: vpbroadcastq %xmm0, %xmm0
|
|
|
|
; AVX512-NEXT: vpmovq2m %xmm0, %k0
|
|
|
|
; AVX512-NEXT: kmovb %k0, (%rsi)
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v64i1_broadcast_32_v2i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movzbl 32(%rdi), %eax
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %eax, %k1
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpcmpeqd %xmm0, %xmm0, %xmm0
|
|
|
|
; AVX512NOTDQ-NEXT: vmovdqa64 %xmm0, %xmm0 {%k1} {z}
|
|
|
|
; AVX512NOTDQ-NEXT: vpbroadcastq %xmm0, %xmm0
|
|
|
|
; AVX512NOTDQ-NEXT: vptestmq %xmm0, %xmm0, %k0
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %k0, %eax
|
|
|
|
; AVX512NOTDQ-NEXT: movb %al, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <64 x i1>, <64 x i1>* %a0
|
|
|
|
%d1 = shufflevector <64 x i1> %d0,<64 x i1> undef,<2 x i32><i32 32,i32 32>
|
|
|
|
store <2 x i1> %d1, <2 x i1>* %a1
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v64i1_broadcast_32_v4i1_store(<64 x i1>* %a0,<4 x i1>* %a1) {
|
|
|
|
; AVX512-LABEL: load_v64i1_broadcast_32_v4i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 32(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: vpmovm2d %k0, %xmm0
|
|
|
|
; AVX512-NEXT: vpbroadcastd %xmm0, %xmm0
|
|
|
|
; AVX512-NEXT: vpmovd2m %xmm0, %k0
|
|
|
|
; AVX512-NEXT: kmovb %k0, (%rsi)
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v64i1_broadcast_32_v4i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movzbl 32(%rdi), %eax
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %eax, %k1
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpcmpeqd %xmm0, %xmm0, %xmm0
|
|
|
|
; AVX512NOTDQ-NEXT: vmovdqa32 %xmm0, %xmm0 {%k1} {z}
|
|
|
|
; AVX512NOTDQ-NEXT: vpbroadcastd %xmm0, %xmm0
|
|
|
|
; AVX512NOTDQ-NEXT: vptestmd %xmm0, %xmm0, %k0
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %k0, %eax
|
|
|
|
; AVX512NOTDQ-NEXT: movb %al, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <64 x i1>, <64 x i1>* %a0
|
|
|
|
%d1 = shufflevector <64 x i1> %d0,<64 x i1> undef,<4 x i32><i32 32,i32 32,i32 32,i32 32>
|
|
|
|
store <4 x i1> %d1, <4 x i1>* %a1
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v64i1_broadcast_32_v8i1_store(<64 x i1>* %a0,<8 x i1>* %a1) {
|
|
|
|
; AVX512-LABEL: load_v64i1_broadcast_32_v8i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 32(%rdi), %k0
|
2017-12-22 02:44:06 +08:00
|
|
|
; AVX512-NEXT: vpmovm2d %k0, %ymm0
|
|
|
|
; AVX512-NEXT: vpbroadcastd %xmm0, %ymm0
|
|
|
|
; AVX512-NEXT: vpmovd2m %ymm0, %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: kmovb %k0, (%rsi)
|
|
|
|
; AVX512-NEXT: vzeroupper
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v64i1_broadcast_32_v8i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movzbl 32(%rdi), %eax
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %eax, %k1
|
2017-12-22 02:44:06 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpcmpeqd %ymm0, %ymm0, %ymm0
|
|
|
|
; AVX512NOTDQ-NEXT: vmovdqa32 %ymm0, %ymm0 {%k1} {z}
|
|
|
|
; AVX512NOTDQ-NEXT: vpbroadcastd %xmm0, %ymm0
|
|
|
|
; AVX512NOTDQ-NEXT: vptestmd %ymm0, %ymm0, %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: kmovd %k0, %eax
|
|
|
|
; AVX512NOTDQ-NEXT: movb %al, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: vzeroupper
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <64 x i1>, <64 x i1>* %a0
|
|
|
|
%d1 = shufflevector <64 x i1> %d0,<64 x i1> undef,<8 x i32><i32 32,i32 32,i32 32,i32 32,i32 32,i32 32,i32 32,i32 32>
|
|
|
|
store <8 x i1> %d1, <8 x i1>* %a1
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v64i1_broadcast_32_v16i1_store(<64 x i1>* %a0,<16 x i1>* %a1) {
|
|
|
|
; AVX512-LABEL: load_v64i1_broadcast_32_v16i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovw 32(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: vpmovm2d %k0, %zmm0
|
|
|
|
; AVX512-NEXT: vpbroadcastd %xmm0, %zmm0
|
|
|
|
; AVX512-NEXT: vpmovd2m %zmm0, %k0
|
|
|
|
; AVX512-NEXT: kmovw %k0, (%rsi)
|
|
|
|
; AVX512-NEXT: vzeroupper
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v64i1_broadcast_32_v16i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: kmovw 32(%rdi), %k1
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
|
|
|
|
; AVX512NOTDQ-NEXT: vpbroadcastd %xmm0, %zmm0
|
|
|
|
; AVX512NOTDQ-NEXT: vptestmd %zmm0, %zmm0, %k0
|
|
|
|
; AVX512NOTDQ-NEXT: kmovw %k0, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: vzeroupper
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <64 x i1>, <64 x i1>* %a0
|
|
|
|
%d1 = shufflevector <64 x i1> %d0,<64 x i1> undef,<16 x i32><i32 32,i32 32,i32 32,i32 32,i32 32,i32 32,i32 32,i32 32,i32 32,i32 32,i32 32,i32 32,i32 32,i32 32,i32 32,i32 32>
|
|
|
|
store <16 x i1> %d1, <16 x i1>* %a1
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v64i1_broadcast_63_v1i1_store(<64 x i1>* %a0,<1 x i1>* %a1) {
|
|
|
|
; AVX512-LABEL: load_v64i1_broadcast_63_v1i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 63(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: kmovb %k0, (%rsi)
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v64i1_broadcast_63_v1i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movb 63(%rdi), %al
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movb %al, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <64 x i1>, <64 x i1>* %a0
|
|
|
|
%d1 = shufflevector <64 x i1> %d0,<64 x i1> undef,<1 x i32><i32 63>
|
|
|
|
store <1 x i1> %d1, <1 x i1>* %a1
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v64i1_broadcast_63_v2i1_store(<64 x i1>* %a0,<2 x i1>* %a1) {
|
|
|
|
; AVX512-LABEL: load_v64i1_broadcast_63_v2i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 62(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: vpmovm2q %k0, %xmm0
|
|
|
|
; AVX512-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[2,3,2,3]
|
|
|
|
; AVX512-NEXT: vpmovq2m %xmm0, %k0
|
|
|
|
; AVX512-NEXT: kmovb %k0, (%rsi)
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v64i1_broadcast_63_v2i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movzbl 62(%rdi), %eax
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %eax, %k1
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpcmpeqd %xmm0, %xmm0, %xmm0
|
|
|
|
; AVX512NOTDQ-NEXT: vmovdqa64 %xmm0, %xmm0 {%k1} {z}
|
|
|
|
; AVX512NOTDQ-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[2,3,2,3]
|
|
|
|
; AVX512NOTDQ-NEXT: vptestmq %xmm0, %xmm0, %k0
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %k0, %eax
|
|
|
|
; AVX512NOTDQ-NEXT: movb %al, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <64 x i1>, <64 x i1>* %a0
|
|
|
|
%d1 = shufflevector <64 x i1> %d0,<64 x i1> undef,<2 x i32><i32 63,i32 63>
|
|
|
|
store <2 x i1> %d1, <2 x i1>* %a1
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v64i1_broadcast_63_v4i1_store(<64 x i1>* %a0,<4 x i1>* %a1) {
|
|
|
|
; AVX512-LABEL: load_v64i1_broadcast_63_v4i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 60(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: vpmovm2d %k0, %xmm0
|
|
|
|
; AVX512-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[3,3,3,3]
|
|
|
|
; AVX512-NEXT: vpmovd2m %xmm0, %k0
|
|
|
|
; AVX512-NEXT: kmovb %k0, (%rsi)
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v64i1_broadcast_63_v4i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movzbl 60(%rdi), %eax
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %eax, %k1
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpcmpeqd %xmm0, %xmm0, %xmm0
|
|
|
|
; AVX512NOTDQ-NEXT: vmovdqa32 %xmm0, %xmm0 {%k1} {z}
|
|
|
|
; AVX512NOTDQ-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[3,3,3,3]
|
|
|
|
; AVX512NOTDQ-NEXT: vptestmd %xmm0, %xmm0, %k0
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %k0, %eax
|
|
|
|
; AVX512NOTDQ-NEXT: movb %al, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <64 x i1>, <64 x i1>* %a0
|
|
|
|
%d1 = shufflevector <64 x i1> %d0,<64 x i1> undef,<4 x i32><i32 63,i32 63,i32 63,i32 63>
|
|
|
|
store <4 x i1> %d1, <4 x i1>* %a1
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v64i1_broadcast_63_v8i1_store(<64 x i1>* %a0,<8 x i1>* %a1) {
|
|
|
|
; AVX512-LABEL: load_v64i1_broadcast_63_v8i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovb 56(%rdi), %k0
|
2017-12-22 02:44:06 +08:00
|
|
|
; AVX512-NEXT: vpmovm2d %k0, %ymm0
|
2018-01-10 00:26:06 +08:00
|
|
|
; AVX512-NEXT: vpbroadcastd {{.*#+}} ymm1 = [7,7,7,7,7,7,7,7]
|
|
|
|
; AVX512-NEXT: vpermd %ymm0, %ymm1, %ymm0
|
2017-12-22 02:44:06 +08:00
|
|
|
; AVX512-NEXT: vpmovd2m %ymm0, %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: kmovb %k0, (%rsi)
|
|
|
|
; AVX512-NEXT: vzeroupper
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v64i1_broadcast_63_v8i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: movzbl 56(%rdi), %eax
|
|
|
|
; AVX512NOTDQ-NEXT: kmovd %eax, %k1
|
2017-12-22 02:44:06 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpcmpeqd %ymm0, %ymm0, %ymm0
|
|
|
|
; AVX512NOTDQ-NEXT: vmovdqa32 %ymm0, %ymm0 {%k1} {z}
|
2018-01-10 00:26:06 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [7,7,7,7,7,7,7,7]
|
|
|
|
; AVX512NOTDQ-NEXT: vpermd %ymm0, %ymm1, %ymm0
|
2017-12-22 02:44:06 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vptestmd %ymm0, %ymm0, %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: kmovd %k0, %eax
|
|
|
|
; AVX512NOTDQ-NEXT: movb %al, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: vzeroupper
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <64 x i1>, <64 x i1>* %a0
|
|
|
|
%d1 = shufflevector <64 x i1> %d0,<64 x i1> undef,<8 x i32><i32 63,i32 63,i32 63,i32 63,i32 63,i32 63,i32 63,i32 63>
|
|
|
|
store <8 x i1> %d1, <8 x i1>* %a1
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @load_v64i1_broadcast_63_v16i1_store(<64 x i1>* %a0,<16 x i1>* %a1) {
|
|
|
|
; AVX512-LABEL: load_v64i1_broadcast_63_v16i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512-NEXT: kmovw 48(%rdi), %k0
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512-NEXT: vpmovm2d %k0, %zmm0
|
|
|
|
; AVX512-NEXT: vpbroadcastd {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
|
|
|
|
; AVX512-NEXT: vpermd %zmm0, %zmm1, %zmm0
|
|
|
|
; AVX512-NEXT: vpmovd2m %zmm0, %k0
|
|
|
|
; AVX512-NEXT: kmovw %k0, (%rsi)
|
|
|
|
; AVX512-NEXT: vzeroupper
|
|
|
|
; AVX512-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX512NOTDQ-LABEL: load_v64i1_broadcast_63_v16i1_store:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX512NOTDQ: # %bb.0:
|
[x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.
I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.
For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.
Differential Revision: https://reviews.llvm.org/D54073
llvm-svn: 346595
2018-11-11 04:05:31 +08:00
|
|
|
; AVX512NOTDQ-NEXT: kmovw 48(%rdi), %k1
|
2017-11-02 20:19:36 +08:00
|
|
|
; AVX512NOTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
|
|
|
|
; AVX512NOTDQ-NEXT: vpbroadcastd {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
|
|
|
|
; AVX512NOTDQ-NEXT: vpermd %zmm0, %zmm1, %zmm0
|
|
|
|
; AVX512NOTDQ-NEXT: vptestmd %zmm0, %zmm0, %k0
|
|
|
|
; AVX512NOTDQ-NEXT: kmovw %k0, (%rsi)
|
|
|
|
; AVX512NOTDQ-NEXT: vzeroupper
|
|
|
|
; AVX512NOTDQ-NEXT: retq
|
|
|
|
%d0 = load <64 x i1>, <64 x i1>* %a0
|
|
|
|
%d1 = shufflevector <64 x i1> %d0,<64 x i1> undef,<16 x i32><i32 63,i32 63,i32 63,i32 63,i32 63,i32 63,i32 63,i32 63,i32 63,i32 63,i32 63,i32 63,i32 63,i32 63,i32 63,i32 63>
|
|
|
|
store <16 x i1> %d1, <16 x i1>* %a1
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|