summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2018-09-11 17:57:27 +0000
committerCraig Topper <craig.topper@intel.com>2018-09-11 17:57:27 +0000
commit8238580aae31a222133fa52d3d9f945b64a3e2ec (patch)
treefc807b4718e1fb44975bd3458f083712e49eacbb /llvm/lib
parentcc9efaffadc1ff91d3caee03f0c786d63b6faf0b (diff)
downloadbcm5719-llvm-8238580aae31a222133fa52d3d9f945b64a3e2ec.tar.gz
bcm5719-llvm-8238580aae31a222133fa52d3d9f945b64a3e2ec.zip
[X86] Prefer unpckhpd over movhlps in isel for fake unary cases
In r337348, I changed lowering to prefer X86ISD::UNPCKL/UNPCKH opcodes over MOVLHPS/MOVHLPS for v2f64 {0,0} and {1,1} shuffles when we have SSE2. This enabled the removal of a bunch of weirdly bitcasted isel patterns in r337349. To avoid changing the tests I placed a gross hack in isel to still emit movhlps instructions for fake unary unpckh nodes. A similar hack was not needed for unpckl and movlhps because we do execution domain switching for those. But unpckh and movhlps have swapped operand order. This patch removes the hack. This is a code size increase since unpckhpd requires a 0x66 prefix and movhlps does not. But if that's a big concern we should be using movhlps for all unpckhpd opcodes and let commuteInstruction turnit into unpckhpd when its an advantage. Differential Revision: https://reviews.llvm.org/D49499 llvm-svn: 341973
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/X86/X86InstrSSE.td13
1 files changed, 0 insertions, 13 deletions
diff --git a/llvm/lib/Target/X86/X86InstrSSE.td b/llvm/lib/Target/X86/X86InstrSSE.td
index db5cfff61ab..359089a2c46 100644
--- a/llvm/lib/Target/X86/X86InstrSSE.td
+++ b/llvm/lib/Target/X86/X86InstrSSE.td
@@ -820,19 +820,6 @@ let Constraints = "$src1 = $dst" in {
Sched<[SchedWriteFShuffle.XMM]>, NotMemoryFoldable;
}
-// TODO: This is largely to trick fastisel into ignoring the pattern.
-def UnpckhUnary : PatFrag<(ops node:$src1, node:$src2),
- (X86Unpckh node:$src1, node:$src2), [{
- return N->getOperand(0) == N->getOperand(1);
-}]>;
-
-let Predicates = [UseSSE2] in {
- // TODO: This is a hack pattern to allow lowering to emit unpckh instead of
- // movhlps for sse2 without changing a bunch of tests.
- def : Pat<(v2f64 (UnpckhUnary VR128:$src, VR128:$src)),
- (MOVHLPSrr VR128:$src, VR128:$src)>;
-}
-
//===----------------------------------------------------------------------===//
// SSE 1 & 2 - Conversion Instructions
//===----------------------------------------------------------------------===//
OpenPOWER on IntegriCloud