OSDN Git Service

[SelectionDAG] Make DAGTypeLegalizer::PromoteSetCCOperands handle SETEQ/SETNE correct...
authorCraig Topper <craig.topper@intel.com>
Sat, 27 Jan 2018 08:41:03 +0000 (08:41 +0000)
committerCraig Topper <craig.topper@intel.com>
Sat, 27 Jan 2018 08:41:03 +0000 (08:41 +0000)
commit4a62f243f3283600b8bedbf9a121cc0c230532c1
tree06d903181e032db179e1ae4d69760f0987ac3486
parent1ac46286b4b26ba27dd34cb635a0a612b64fe0af
[SelectionDAG] Make DAGTypeLegalizer::PromoteSetCCOperands handle SETEQ/SETNE correctly for vector types.

The code was using getValueSizeInBits and combining with the result of a call to DAG.ComputeNumSignBits. But for vector types getValueSizeInBits returns the width of the full vector while ComputeNumSignBits is going to give a number no larger than the width of a single element. So we should be using getScalarValueSizeInBits to get the element width.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@323583 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
test/CodeGen/X86/x86-interleaved-access.ll