[X86] Remove the multiply by 8 that goes into the shift constant for X86ISD::VSHLDQ and X86ISD::VSRLDQ. This simplifies the pattern matching in isel and allows these nodes to become the patterns embedded in the instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229431 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Craig Topper
2015-02-16 20:52:07 +00:00
parent e124dc723b
commit 4031c08c87
5 changed files with 52 additions and 58 deletions
+6 -6
View File
@@ -538,10 +538,10 @@ void llvm::UpgradeIntrinsicCall(CallInst *CI, Function *NewFn) {
if (Shift < 16) {
SmallVector<Constant*, 32> Idxs;
for (unsigned l = 0; l < 32; l += 16)
for (unsigned l = 0; l != 32; l += 16)
for (unsigned i = 0; i != 16; ++i) {
unsigned Idx = i + Shift;
if (Idx >= 16) Idx += 16; // end of lane, switch operand.
unsigned Idx = 32 + i - Shift;
if (Idx < 32) Idx -= 16; // end of lane, switch operand.
Idxs.push_back(Builder.getInt32(Idx + l));
}
@@ -561,10 +561,10 @@ void llvm::UpgradeIntrinsicCall(CallInst *CI, Function *NewFn) {
if (Shift < 16) {
SmallVector<Constant*, 32> Idxs;
for (unsigned l = 0; l < 32; l += 16)
for (unsigned l = 0; l != 32; l += 16)
for (unsigned i = 0; i != 16; ++i) {
unsigned Idx = 32 + i - Shift;
if (Idx < 32) Idx -= 16; // end of lane, switch operand.
unsigned Idx = i + Shift;
if (Idx >= 16) Idx += 16; // end of lane, switch operand.
Idxs.push_back(Builder.getInt32(Idx + l));
}