OSDN Git Service

[X86] Prevent lowerVectorShuffleByMerging128BitLanes from creating cycles
authorCraig Topper <craig.topper@intel.com>
Mon, 20 Aug 2018 21:08:35 +0000 (21:08 +0000)
committerCraig Topper <craig.topper@intel.com>
Mon, 20 Aug 2018 21:08:35 +0000 (21:08 +0000)
commit3b19475ae2bc49fa3fe340706d23dd9a72de04f9
tree0fad25b97aecc69507beb5dfceaffdd677f96fba
parent006bf052a174a86ca12a611ccc38bdb8cab07161
[X86] Prevent lowerVectorShuffleByMerging128BitLanes from creating cycles

Due to some splat handling code in getVectorShuffle, its possible for NewV1/NewV2 to have their mask modified from what is requested. This can lead to cycles being created in the DAG.

This patch examines the returned mask and makes sure its different. Long term we may need to look closer at that splat code in getVectorShuffle, or add more splat awareness to getVectorShuffle.

Fixes PR38639

Differential Revision: https://reviews.llvm.org/D50981

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340214 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/pr38639.ll [new file with mode: 0644]