diff options
author | Craig Topper <craig.topper@gmail.com> | 2012-01-23 08:18:28 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2012-01-23 08:18:28 +0000 |
commit | 7925e2555d4a2305784365176dba72a64fc3975c (patch) | |
tree | e3470c56725b6bf1ccdc53edae6f75327f1c9a03 /lib/Target/X86/X86ISelLowering.cpp | |
parent | 7908480e4caf2f7ecb0b62c900039d49e7d51ebb (diff) |
Custom lower PCMPEQ/PCMPGT intrinsics to target specific nodes and remove the intrinsic patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148687 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86ISelLowering.cpp')
-rw-r--r-- | lib/Target/X86/X86ISelLowering.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index 6956a12d86..2655ce9610 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -9318,6 +9318,26 @@ X86TargetLowering::LowerINTRINSIC_WO_CHAIN(SDValue Op, SelectionDAG &DAG) const case Intrinsic::x86_avx2_psrav_d_256: return DAG.getNode(ISD::SRA, dl, Op.getValueType(), Op.getOperand(1), Op.getOperand(2)); + case Intrinsic::x86_sse2_pcmpeq_b: + case Intrinsic::x86_sse2_pcmpeq_w: + case Intrinsic::x86_sse2_pcmpeq_d: + case Intrinsic::x86_sse41_pcmpeqq: + case Intrinsic::x86_avx2_pcmpeq_b: + case Intrinsic::x86_avx2_pcmpeq_w: + case Intrinsic::x86_avx2_pcmpeq_d: + case Intrinsic::x86_avx2_pcmpeq_q: + return DAG.getNode(X86ISD::PCMPEQ, dl, Op.getValueType(), + Op.getOperand(1), Op.getOperand(2)); + case Intrinsic::x86_sse2_pcmpgt_b: + case Intrinsic::x86_sse2_pcmpgt_w: + case Intrinsic::x86_sse2_pcmpgt_d: + case Intrinsic::x86_sse42_pcmpgtq: + case Intrinsic::x86_avx2_pcmpgt_b: + case Intrinsic::x86_avx2_pcmpgt_w: + case Intrinsic::x86_avx2_pcmpgt_d: + case Intrinsic::x86_avx2_pcmpgt_q: + return DAG.getNode(X86ISD::PCMPGT, dl, Op.getValueType(), + Op.getOperand(1), Op.getOperand(2)); // ptest and testp intrinsics. The intrinsic these come from are designed to // return an integer value, not just an instruction so lower it to the ptest |