diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2021-09-27 10:39:28 +0100 |
---|---|---|
committer | Tom Stellard <tstellar@redhat.com> | 2022-01-20 13:31:59 -0800 |
commit | 75e33f71c2dae584b13a7d1186ae0a038ba98838 (patch) | |
tree | 95fd26dbed5c08510c686c53f6f3a55baeedd554 /llvm/test/CodeGen/X86/horizontal-shuffle-2.ll | |
parent | 6349865a8f3751a651f9451eac0405e01ee03a11 (diff) | |
download | llvm-release/13.x.tar.gz |
[X86] combineVectorHADDSUB - remove the broken HOP(x,x) merging code (PR51974)llvmorg-13.0.1-rc3llvmorg-13.0.1release/13.x
This intention of this code turns out to be superfluous as we can handle this with shuffle combining, and it has a critical flaw in that it doesn't check for dependencies.
Fixes PR51974
(cherry picked from commit 468ff703e114599ce8fb7457bd3c7ef0b219e952)
Diffstat (limited to 'llvm/test/CodeGen/X86/horizontal-shuffle-2.ll')
-rw-r--r-- | llvm/test/CodeGen/X86/horizontal-shuffle-2.ll | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/horizontal-shuffle-2.ll b/llvm/test/CodeGen/X86/horizontal-shuffle-2.ll index 78c30e431574..9c5d7d4dd31b 100644 --- a/llvm/test/CodeGen/X86/horizontal-shuffle-2.ll +++ b/llvm/test/CodeGen/X86/horizontal-shuffle-2.ll @@ -171,6 +171,25 @@ define <4 x float> @test_unpacklo_hadd_v4f32_unary(<4 x float> %0) { ret <4 x float> %3 } +define <8 x i16> @PR51974(<8 x i16> %a0) { +; SSE-LABEL: PR51974: +; SSE: ## %bb.0: +; SSE-NEXT: movdqa %xmm0, %xmm1 +; SSE-NEXT: phaddw %xmm0, %xmm1 +; SSE-NEXT: phaddw %xmm0, %xmm1 +; SSE-NEXT: movdqa %xmm1, %xmm0 +; SSE-NEXT: ret{{[l|q]}} +; +; AVX-LABEL: PR51974: +; AVX: ## %bb.0: +; AVX-NEXT: vphaddw %xmm0, %xmm0, %xmm1 +; AVX-NEXT: vphaddw %xmm0, %xmm1, %xmm0 +; AVX-NEXT: ret{{[l|q]}} + %r0 = call <8 x i16> @llvm.x86.ssse3.phadd.w.128(<8 x i16> %a0, <8 x i16> %a0) + %r1 = call <8 x i16> @llvm.x86.ssse3.phadd.w.128(<8 x i16> %r0, <8 x i16> %a0) + ret <8 x i16> %r1 +} + declare <4 x float> @llvm.x86.sse3.hadd.ps(<4 x float>, <4 x float>) declare <4 x float> @llvm.x86.sse3.hsub.ps(<4 x float>, <4 x float>) declare <2 x double> @llvm.x86.sse3.hadd.pd(<2 x double>, <2 x double>) |