diff options
author | Craig Topper <craig.topper@intel.com> | 2018-11-17 02:18:12 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@intel.com> | 2018-11-17 02:18:12 +0000 |
commit | b05ea28f1f19dcd5b964c3a9a826d6eb2213ed42 (patch) | |
tree | 608e6529352ead8714686f98cfb7085b35566dfb /llvm | |
parent | 75709329774ba0596bcd99abe4037dacfe28a053 (diff) | |
download | bcm5719-llvm-b05ea28f1f19dcd5b964c3a9a826d6eb2213ed42.tar.gz bcm5719-llvm-b05ea28f1f19dcd5b964c3a9a826d6eb2213ed42.zip |
[X86] Use getUnpackl/getUnpackh instead of hardcoding a shuffle mask.
llvm-svn: 347127
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/lib/Target/X86/X86ISelLowering.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index 5d47d5fb7a6..7bf395ace0c 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -23369,10 +23369,9 @@ static SDValue LowerMUL(SDValue Op, const X86Subtarget &Subtarget, // We're going to mask off the low byte of each result element of the // pmullw, so it doesn't matter what's in the high byte of each 16-bit // element. - const int LoShufMask[] = {0, -1, 1, -1, 2, -1, 3, -1, - 4, -1, 5, -1, 6, -1, 7, -1}; - SDValue ALo = DAG.getVectorShuffle(VT, dl, A, A, LoShufMask); - SDValue BLo = DAG.getVectorShuffle(VT, dl, B, B, LoShufMask); + SDValue Undef = DAG.getUNDEF(VT); + SDValue ALo = getUnpackl(DAG, dl, VT, A, Undef); + SDValue BLo = getUnpackl(DAG, dl, VT, B, Undef); ALo = DAG.getBitcast(ExVT, ALo); BLo = DAG.getBitcast(ExVT, BLo); @@ -23380,10 +23379,8 @@ static SDValue LowerMUL(SDValue Op, const X86Subtarget &Subtarget, // We're going to mask off the low byte of each result element of the // pmullw, so it doesn't matter what's in the high byte of each 16-bit // element. - const int HiShufMask[] = { 8, -1, 9, -1, 10, -1, 11, -1, - 12, -1, 13, -1, 14, -1, 15, -1}; - SDValue AHi = DAG.getVectorShuffle(VT, dl, A, A, HiShufMask); - SDValue BHi = DAG.getVectorShuffle(VT, dl, B, B, HiShufMask); + SDValue AHi = getUnpackh(DAG, dl, VT, A, Undef); + SDValue BHi = getUnpackh(DAG, dl, VT, B, Undef); AHi = DAG.getBitcast(ExVT, AHi); BHi = DAG.getBitcast(ExVT, BHi); |