From 9b64bf54b97157bfe46987ce5638fcb78cca76b4 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Tue, 20 Feb 2018 03:58:11 +0000 Subject: [X86] Make a helper function for commuting AVX512 VPCMP immediates since we do it in two places. llvm-svn: 325546 --- llvm/lib/Target/X86/X86InstrInfo.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'llvm/lib/Target/X86/X86InstrInfo.h') diff --git a/llvm/lib/Target/X86/X86InstrInfo.h b/llvm/lib/Target/X86/X86InstrInfo.h index b1b5a4a421d..5a2e00152e8 100644 --- a/llvm/lib/Target/X86/X86InstrInfo.h +++ b/llvm/lib/Target/X86/X86InstrInfo.h @@ -83,6 +83,10 @@ CondCode getCondFromCMovOpc(unsigned Opc); /// GetOppositeBranchCondition - Return the inverse of the specified cond, /// e.g. turning COND_E to COND_NE. CondCode GetOppositeBranchCondition(CondCode CC); + +/// \brief Get the VPCMP immediate if the opcodes are swapped. +unsigned getSwappedVPCMPImm(unsigned Imm); + } // namespace X86 /// isGlobalStubReference - Return true if the specified TargetFlag operand is -- cgit v1.2.3