As RKSimon suggested in pr35820, in the case that Src is smaller in
bit-size than Indices, need to widen Src to avoid type mismatch.
Fixes pr35820
Paths
| Differential D41865
X86: Fix LowerBUILD_VECTORAsVariablePermute for case Src is smaller than Indices ClosedPublic Authored by zvi on Jan 9 2018, 7:53 AM.
Details
Summary As RKSimon suggested in pr35820, in the case that Src is smaller in Fixes pr35820
Diff Detail
Event TimelineComment Actions Please can you add a similar test for a bigger source vector, something like: <4 x i32> @foo(<8 x i32> %v, <2 x i32> %indices) ? Comment Actions Sure, but looking at your example the return type should have the same number of elements as the indices vector, right? Comment Actions
Yup, sorry for the typo. Are you intending to support cases like this? Comment Actions
Will need to think about how/if it can be done. AVX512 masking could make it easier.
This revision is now accepted and ready to land.Jan 10 2018, 10:19 AM Closed by commit rL322272: X86: Fix LowerBUILD_VECTORAsVariablePermute for case Src is smaller than Indices (authored by zvi). · Explain WhyJan 11 2018, 4:28 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 129432 llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
llvm/trunk/test/CodeGen/X86/var-permute-256.ll
|