-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[X86] SimplifyDemandedVectorEltsForTargetNode - add X86ISD::MOVDDUP handling #140237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…andling Reduce YMM MOVDDUP node to XMM if the upper elements are not demanded Noticed while working on llvm#140234
@llvm/pr-subscribers-backend-x86 Author: Simon Pilgrim (RKSimon) ChangesReduce YMM MOVDDUP node to XMM if the upper elements are not demanded Noticed while working on #140234 Full diff: https://github.com/llvm/llvm-project/pull/140237.diff 2 Files Affected:
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 9be3b39ce16fa..bde4f70b2147f 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -44013,6 +44013,8 @@ bool X86TargetLowering::SimplifyDemandedVectorEltsForTargetNode(
case X86ISD::VZEXT_MOVL:
// Variable blend.
case X86ISD::BLENDV:
+ // Target unary shuffles:
+ case X86ISD::MOVDDUP:
// Target unary shuffles by immediate:
case X86ISD::PSHUFD:
case X86ISD::PSHUFLW:
diff --git a/llvm/test/CodeGen/X86/vector-shuffle-256-v4.ll b/llvm/test/CodeGen/X86/vector-shuffle-256-v4.ll
index cf546dc2671f2..d848a8b879215 100644
--- a/llvm/test/CodeGen/X86/vector-shuffle-256-v4.ll
+++ b/llvm/test/CodeGen/X86/vector-shuffle-256-v4.ll
@@ -861,8 +861,7 @@ define <4 x double> @shuffle_v4f64_2345_0567_select(<4 x double> %vec1, <4 x dou
define <4 x double> @shuffle_v4f64_1436_split_load(ptr %px, ptr %py) {
; AVX1-LABEL: shuffle_v4f64_1436_split_load:
; AVX1: # %bb.0:
-; AVX1-NEXT: vmovapd (%rsi), %xmm0
-; AVX1-NEXT: vmovddup {{.*#+}} ymm0 = ymm0[0,0,2,2]
+; AVX1-NEXT: vmovddup {{.*#+}} xmm0 = mem[0,0]
; AVX1-NEXT: vmovupd (%rdi), %ymm1
; AVX1-NEXT: vinsertf128 $1, 16(%rsi), %ymm0, %ymm0
; AVX1-NEXT: vshufpd {{.*#+}} ymm0 = ymm1[1],ymm0[1],ymm1[3],ymm0[2]
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/144/builds/25322 Here is the relevant piece of the build log for the reference
|
Reduce YMM MOVDDUP node to XMM if the upper elements are not demanded
Noticed while working on #140234