From: Craig Topper Date: Sun, 17 Jun 2018 18:00:16 +0000 (+0000) Subject: [X86] Add all the FMA instructions direclty to the load folding table instead of... X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9fe45d846e0ce248cd3c785ffe9d99d479e06274;p=platform%2Fupstream%2Fllvm.git [X86] Add all the FMA instructions direclty to the load folding table instead of proxying through X86InstrFMA3Info. These increases the size of the static tables, but is closer to what we would get if used the autogenerated table directly. This reduces the remaining large deltas between what's in the manual table and what's in the autogenerated table. llvm-svn: 334915 --- diff --git a/llvm/lib/Target/X86/X86InstrFMA3Info.h b/llvm/lib/Target/X86/X86InstrFMA3Info.h index e356816..8846632 100644 --- a/llvm/lib/Target/X86/X86InstrFMA3Info.h +++ b/llvm/lib/Target/X86/X86InstrFMA3Info.h @@ -241,76 +241,6 @@ public: /// Iterator that is used to walk on FMA register opcodes having memory /// form equivalents. - class rm_iterator { - private: - /// Iterator associated with the OpcodeToGroup map. It must always be - /// initialized with an entry from OpcodeToGroup for which I->first - /// points to a register FMA opcode and I->second points to a group of - /// FMA opcodes having memory form equivalent of I->first. - DenseMap::const_iterator I; - - public: - /// Constructor. Creates rm_iterator. The parameter \p I must be an - /// iterator to OpcodeToGroup map entry having I->first pointing to - /// register form FMA opcode and I->second pointing to a group of FMA - /// opcodes holding memory form equivalent for I->fist. - rm_iterator(DenseMap::const_iterator I) - : I(I) {} - - /// Returns the register form FMA opcode. - unsigned getRegOpcode() const { return I->first; }; - - /// Returns the memory form equivalent opcode for FMA register opcode - /// referenced by I->first. - unsigned getMemOpcode() const { - unsigned Opcode = I->first; - const X86InstrFMA3Group *Group = I->second; - return Group->getMemOpcode(Opcode); - } - - /// Returns a reference to a group of FMA opcodes. - const X86InstrFMA3Group *getGroup() const { return I->second; } - - bool operator==(const rm_iterator &OtherIt) const { return I == OtherIt.I; } - bool operator!=(const rm_iterator &OtherIt) const { return I != OtherIt.I; } - - /// Increment. Advances the 'I' iterator to the next OpcodeToGroup entry - /// having I->first pointing to register form FMA and I->second pointing - /// to a group of FMA opcodes holding memory form equivalen for I->first. - rm_iterator &operator++() { - auto E = getX86InstrFMA3Info()->OpcodeToGroup.end(); - for (++I; I != E; ++I) { - unsigned RegOpcode = I->first; - const X86InstrFMA3Group *Group = I->second; - if (Group->getMemOpcode(RegOpcode) != 0) - break; - } - return *this; - } - }; - - /// Returns rm_iterator pointing to the first entry of OpcodeToGroup map - /// with a register FMA opcode having memory form opcode equivalent. - static rm_iterator rm_begin() { - initGroupsOnce(); - const X86InstrFMA3Info *FMA3Info = getX86InstrFMA3Info(); - auto I = FMA3Info->OpcodeToGroup.begin(); - auto E = FMA3Info->OpcodeToGroup.end(); - while (I != E) { - unsigned Opcode = I->first; - const X86InstrFMA3Group *G = I->second; - if (G->getMemOpcode(Opcode) != 0) - break; - I++; - } - return rm_iterator(I); - } - - /// Returns the last rm_iterator. - static rm_iterator rm_end() { - initGroupsOnce(); - return rm_iterator(getX86InstrFMA3Info()->OpcodeToGroup.end()); - } }; } // end namespace llvm diff --git a/llvm/lib/Target/X86/X86InstrInfo.cpp b/llvm/lib/Target/X86/X86InstrInfo.cpp index f95249b..fed66fb 100644 --- a/llvm/lib/Target/X86/X86InstrInfo.cpp +++ b/llvm/lib/Target/X86/X86InstrInfo.cpp @@ -3256,6 +3256,284 @@ X86InstrInfo::X86InstrInfo(X86Subtarget &STI) { X86::VFMSUBADDPS4Yrr, X86::VFMSUBADDPS4Yrm, TB_ALIGN_NONE }, { X86::VFMSUBADDPD4Yrr, X86::VFMSUBADDPD4Yrm, TB_ALIGN_NONE }, + // FMA3 foldable instructions + { X86::VFMADD132PDYr, X86::VFMADD132PDYm, 0 }, + { X86::VFMADD132PDZ128r, X86::VFMADD132PDZ128m, 0 }, + { X86::VFMADD132PDZ256r, X86::VFMADD132PDZ256m, 0 }, + { X86::VFMADD132PDZr, X86::VFMADD132PDZm, 0 }, + { X86::VFMADD132PDr, X86::VFMADD132PDm, 0 }, + { X86::VFMADD132PSYr, X86::VFMADD132PSYm, 0 }, + { X86::VFMADD132PSZ128r, X86::VFMADD132PSZ128m, 0 }, + { X86::VFMADD132PSZ256r, X86::VFMADD132PSZ256m, 0 }, + { X86::VFMADD132PSZr, X86::VFMADD132PSZm, 0 }, + { X86::VFMADD132PSr, X86::VFMADD132PSm, 0 }, + { X86::VFMADD132SDZr, X86::VFMADD132SDZm, 0 }, + { X86::VFMADD132SDZr_Int, X86::VFMADD132SDZm_Int, TB_NO_REVERSE }, + { X86::VFMADD132SDr, X86::VFMADD132SDm, 0 }, + { X86::VFMADD132SDr_Int, X86::VFMADD132SDm_Int, TB_NO_REVERSE }, + { X86::VFMADD132SSZr, X86::VFMADD132SSZm, 0 }, + { X86::VFMADD132SSZr_Int, X86::VFMADD132SSZm_Int, TB_NO_REVERSE }, + { X86::VFMADD132SSr, X86::VFMADD132SSm, 0 }, + { X86::VFMADD132SSr_Int, X86::VFMADD132SSm_Int, TB_NO_REVERSE }, + { X86::VFMADD213PDYr, X86::VFMADD213PDYm, 0 }, + { X86::VFMADD213PDZ128r, X86::VFMADD213PDZ128m, 0 }, + { X86::VFMADD213PDZ256r, X86::VFMADD213PDZ256m, 0 }, + { X86::VFMADD213PDZr, X86::VFMADD213PDZm, 0 }, + { X86::VFMADD213PDr, X86::VFMADD213PDm, 0 }, + { X86::VFMADD213PSYr, X86::VFMADD213PSYm, 0 }, + { X86::VFMADD213PSZ128r, X86::VFMADD213PSZ128m, 0 }, + { X86::VFMADD213PSZ256r, X86::VFMADD213PSZ256m, 0 }, + { X86::VFMADD213PSZr, X86::VFMADD213PSZm, 0 }, + { X86::VFMADD213PSr, X86::VFMADD213PSm, 0 }, + { X86::VFMADD213SDZr, X86::VFMADD213SDZm, 0 }, + { X86::VFMADD213SDZr_Int, X86::VFMADD213SDZm_Int, TB_NO_REVERSE }, + { X86::VFMADD213SDr, X86::VFMADD213SDm, 0 }, + { X86::VFMADD213SDr_Int, X86::VFMADD213SDm_Int, TB_NO_REVERSE }, + { X86::VFMADD213SSZr, X86::VFMADD213SSZm, 0 }, + { X86::VFMADD213SSZr_Int, X86::VFMADD213SSZm_Int, TB_NO_REVERSE }, + { X86::VFMADD213SSr, X86::VFMADD213SSm, 0 }, + { X86::VFMADD213SSr_Int, X86::VFMADD213SSm_Int, TB_NO_REVERSE }, + { X86::VFMADD231PDYr, X86::VFMADD231PDYm, 0 }, + { X86::VFMADD231PDZ128r, X86::VFMADD231PDZ128m, 0 }, + { X86::VFMADD231PDZ256r, X86::VFMADD231PDZ256m, 0 }, + { X86::VFMADD231PDZr, X86::VFMADD231PDZm, 0 }, + { X86::VFMADD231PDr, X86::VFMADD231PDm, 0 }, + { X86::VFMADD231PSYr, X86::VFMADD231PSYm, 0 }, + { X86::VFMADD231PSZ128r, X86::VFMADD231PSZ128m, 0 }, + { X86::VFMADD231PSZ256r, X86::VFMADD231PSZ256m, 0 }, + { X86::VFMADD231PSZr, X86::VFMADD231PSZm, 0 }, + { X86::VFMADD231PSr, X86::VFMADD231PSm, 0 }, + { X86::VFMADD231SDZr, X86::VFMADD231SDZm, 0 }, + { X86::VFMADD231SDZr_Int, X86::VFMADD231SDZm_Int, TB_NO_REVERSE }, + { X86::VFMADD231SDr, X86::VFMADD231SDm, 0 }, + { X86::VFMADD231SDr_Int, X86::VFMADD231SDm_Int, TB_NO_REVERSE }, + { X86::VFMADD231SSZr, X86::VFMADD231SSZm, 0 }, + { X86::VFMADD231SSZr_Int, X86::VFMADD231SSZm_Int, TB_NO_REVERSE }, + { X86::VFMADD231SSr, X86::VFMADD231SSm, 0 }, + { X86::VFMADD231SSr_Int, X86::VFMADD231SSm_Int, TB_NO_REVERSE }, + { X86::VFMADDSUB132PDYr, X86::VFMADDSUB132PDYm, 0 }, + { X86::VFMADDSUB132PDZ128r, X86::VFMADDSUB132PDZ128m, 0 }, + { X86::VFMADDSUB132PDZ256r, X86::VFMADDSUB132PDZ256m, 0 }, + { X86::VFMADDSUB132PDZr, X86::VFMADDSUB132PDZm, 0 }, + { X86::VFMADDSUB132PDr, X86::VFMADDSUB132PDm, 0 }, + { X86::VFMADDSUB132PSYr, X86::VFMADDSUB132PSYm, 0 }, + { X86::VFMADDSUB132PSZ128r, X86::VFMADDSUB132PSZ128m, 0 }, + { X86::VFMADDSUB132PSZ256r, X86::VFMADDSUB132PSZ256m, 0 }, + { X86::VFMADDSUB132PSZr, X86::VFMADDSUB132PSZm, 0 }, + { X86::VFMADDSUB132PSr, X86::VFMADDSUB132PSm, 0 }, + { X86::VFMADDSUB213PDYr, X86::VFMADDSUB213PDYm, 0 }, + { X86::VFMADDSUB213PDZ128r, X86::VFMADDSUB213PDZ128m, 0 }, + { X86::VFMADDSUB213PDZ256r, X86::VFMADDSUB213PDZ256m, 0 }, + { X86::VFMADDSUB213PDZr, X86::VFMADDSUB213PDZm, 0 }, + { X86::VFMADDSUB213PDr, X86::VFMADDSUB213PDm, 0 }, + { X86::VFMADDSUB213PSYr, X86::VFMADDSUB213PSYm, 0 }, + { X86::VFMADDSUB213PSZ128r, X86::VFMADDSUB213PSZ128m, 0 }, + { X86::VFMADDSUB213PSZ256r, X86::VFMADDSUB213PSZ256m, 0 }, + { X86::VFMADDSUB213PSZr, X86::VFMADDSUB213PSZm, 0 }, + { X86::VFMADDSUB213PSr, X86::VFMADDSUB213PSm, 0 }, + { X86::VFMADDSUB231PDYr, X86::VFMADDSUB231PDYm, 0 }, + { X86::VFMADDSUB231PDZ128r, X86::VFMADDSUB231PDZ128m, 0 }, + { X86::VFMADDSUB231PDZ256r, X86::VFMADDSUB231PDZ256m, 0 }, + { X86::VFMADDSUB231PDZr, X86::VFMADDSUB231PDZm, 0 }, + { X86::VFMADDSUB231PDr, X86::VFMADDSUB231PDm, 0 }, + { X86::VFMADDSUB231PSYr, X86::VFMADDSUB231PSYm, 0 }, + { X86::VFMADDSUB231PSZ128r, X86::VFMADDSUB231PSZ128m, 0 }, + { X86::VFMADDSUB231PSZ256r, X86::VFMADDSUB231PSZ256m, 0 }, + { X86::VFMADDSUB231PSZr, X86::VFMADDSUB231PSZm, 0 }, + { X86::VFMADDSUB231PSr, X86::VFMADDSUB231PSm, 0 }, + { X86::VFMSUB132PDYr, X86::VFMSUB132PDYm, 0 }, + { X86::VFMSUB132PDZ128r, X86::VFMSUB132PDZ128m, 0 }, + { X86::VFMSUB132PDZ256r, X86::VFMSUB132PDZ256m, 0 }, + { X86::VFMSUB132PDZr, X86::VFMSUB132PDZm, 0 }, + { X86::VFMSUB132PDr, X86::VFMSUB132PDm, 0 }, + { X86::VFMSUB132PSYr, X86::VFMSUB132PSYm, 0 }, + { X86::VFMSUB132PSZ128r, X86::VFMSUB132PSZ128m, 0 }, + { X86::VFMSUB132PSZ256r, X86::VFMSUB132PSZ256m, 0 }, + { X86::VFMSUB132PSZr, X86::VFMSUB132PSZm, 0 }, + { X86::VFMSUB132PSr, X86::VFMSUB132PSm, 0 }, + { X86::VFMSUB132SDZr, X86::VFMSUB132SDZm, 0 }, + { X86::VFMSUB132SDZr_Int, X86::VFMSUB132SDZm_Int, TB_NO_REVERSE }, + { X86::VFMSUB132SDr, X86::VFMSUB132SDm, 0 }, + { X86::VFMSUB132SDr_Int, X86::VFMSUB132SDm_Int, TB_NO_REVERSE }, + { X86::VFMSUB132SSZr, X86::VFMSUB132SSZm, 0 }, + { X86::VFMSUB132SSZr_Int, X86::VFMSUB132SSZm_Int, TB_NO_REVERSE }, + { X86::VFMSUB132SSr, X86::VFMSUB132SSm, 0 }, + { X86::VFMSUB132SSr_Int, X86::VFMSUB132SSm_Int, TB_NO_REVERSE }, + { X86::VFMSUB213PDYr, X86::VFMSUB213PDYm, 0 }, + { X86::VFMSUB213PDZ128r, X86::VFMSUB213PDZ128m, 0 }, + { X86::VFMSUB213PDZ256r, X86::VFMSUB213PDZ256m, 0 }, + { X86::VFMSUB213PDZr, X86::VFMSUB213PDZm, 0 }, + { X86::VFMSUB213PDr, X86::VFMSUB213PDm, 0 }, + { X86::VFMSUB213PSYr, X86::VFMSUB213PSYm, 0 }, + { X86::VFMSUB213PSZ128r, X86::VFMSUB213PSZ128m, 0 }, + { X86::VFMSUB213PSZ256r, X86::VFMSUB213PSZ256m, 0 }, + { X86::VFMSUB213PSZr, X86::VFMSUB213PSZm, 0 }, + { X86::VFMSUB213PSr, X86::VFMSUB213PSm, 0 }, + { X86::VFMSUB213SDZr, X86::VFMSUB213SDZm, 0 }, + { X86::VFMSUB213SDZr_Int, X86::VFMSUB213SDZm_Int, TB_NO_REVERSE }, + { X86::VFMSUB213SDr, X86::VFMSUB213SDm, 0 }, + { X86::VFMSUB213SDr_Int, X86::VFMSUB213SDm_Int, TB_NO_REVERSE }, + { X86::VFMSUB213SSZr, X86::VFMSUB213SSZm, 0 }, + { X86::VFMSUB213SSZr_Int, X86::VFMSUB213SSZm_Int, TB_NO_REVERSE }, + { X86::VFMSUB213SSr, X86::VFMSUB213SSm, 0 }, + { X86::VFMSUB213SSr_Int, X86::VFMSUB213SSm_Int, TB_NO_REVERSE }, + { X86::VFMSUB231PDYr, X86::VFMSUB231PDYm, 0 }, + { X86::VFMSUB231PDZ128r, X86::VFMSUB231PDZ128m, 0 }, + { X86::VFMSUB231PDZ256r, X86::VFMSUB231PDZ256m, 0 }, + { X86::VFMSUB231PDZr, X86::VFMSUB231PDZm, 0 }, + { X86::VFMSUB231PDr, X86::VFMSUB231PDm, 0 }, + { X86::VFMSUB231PSYr, X86::VFMSUB231PSYm, 0 }, + { X86::VFMSUB231PSZ128r, X86::VFMSUB231PSZ128m, 0 }, + { X86::VFMSUB231PSZ256r, X86::VFMSUB231PSZ256m, 0 }, + { X86::VFMSUB231PSZr, X86::VFMSUB231PSZm, 0 }, + { X86::VFMSUB231PSr, X86::VFMSUB231PSm, 0 }, + { X86::VFMSUB231SDZr, X86::VFMSUB231SDZm, 0 }, + { X86::VFMSUB231SDZr_Int, X86::VFMSUB231SDZm_Int, TB_NO_REVERSE }, + { X86::VFMSUB231SDr, X86::VFMSUB231SDm, 0 }, + { X86::VFMSUB231SDr_Int, X86::VFMSUB231SDm_Int, TB_NO_REVERSE }, + { X86::VFMSUB231SSZr, X86::VFMSUB231SSZm, 0 }, + { X86::VFMSUB231SSZr_Int, X86::VFMSUB231SSZm_Int, TB_NO_REVERSE }, + { X86::VFMSUB231SSr, X86::VFMSUB231SSm, 0 }, + { X86::VFMSUB231SSr_Int, X86::VFMSUB231SSm_Int, TB_NO_REVERSE }, + { X86::VFMSUBADD132PDYr, X86::VFMSUBADD132PDYm, 0 }, + { X86::VFMSUBADD132PDZ128r, X86::VFMSUBADD132PDZ128m, 0 }, + { X86::VFMSUBADD132PDZ256r, X86::VFMSUBADD132PDZ256m, 0 }, + { X86::VFMSUBADD132PDZr, X86::VFMSUBADD132PDZm, 0 }, + { X86::VFMSUBADD132PDr, X86::VFMSUBADD132PDm, 0 }, + { X86::VFMSUBADD132PSYr, X86::VFMSUBADD132PSYm, 0 }, + { X86::VFMSUBADD132PSZ128r, X86::VFMSUBADD132PSZ128m, 0 }, + { X86::VFMSUBADD132PSZ256r, X86::VFMSUBADD132PSZ256m, 0 }, + { X86::VFMSUBADD132PSZr, X86::VFMSUBADD132PSZm, 0 }, + { X86::VFMSUBADD132PSr, X86::VFMSUBADD132PSm, 0 }, + { X86::VFMSUBADD213PDYr, X86::VFMSUBADD213PDYm, 0 }, + { X86::VFMSUBADD213PDZ128r, X86::VFMSUBADD213PDZ128m, 0 }, + { X86::VFMSUBADD213PDZ256r, X86::VFMSUBADD213PDZ256m, 0 }, + { X86::VFMSUBADD213PDZr, X86::VFMSUBADD213PDZm, 0 }, + { X86::VFMSUBADD213PDr, X86::VFMSUBADD213PDm, 0 }, + { X86::VFMSUBADD213PSYr, X86::VFMSUBADD213PSYm, 0 }, + { X86::VFMSUBADD213PSZ128r, X86::VFMSUBADD213PSZ128m, 0 }, + { X86::VFMSUBADD213PSZ256r, X86::VFMSUBADD213PSZ256m, 0 }, + { X86::VFMSUBADD213PSZr, X86::VFMSUBADD213PSZm, 0 }, + { X86::VFMSUBADD213PSr, X86::VFMSUBADD213PSm, 0 }, + { X86::VFMSUBADD231PDYr, X86::VFMSUBADD231PDYm, 0 }, + { X86::VFMSUBADD231PDZ128r, X86::VFMSUBADD231PDZ128m, 0 }, + { X86::VFMSUBADD231PDZ256r, X86::VFMSUBADD231PDZ256m, 0 }, + { X86::VFMSUBADD231PDZr, X86::VFMSUBADD231PDZm, 0 }, + { X86::VFMSUBADD231PDr, X86::VFMSUBADD231PDm, 0 }, + { X86::VFMSUBADD231PSYr, X86::VFMSUBADD231PSYm, 0 }, + { X86::VFMSUBADD231PSZ128r, X86::VFMSUBADD231PSZ128m, 0 }, + { X86::VFMSUBADD231PSZ256r, X86::VFMSUBADD231PSZ256m, 0 }, + { X86::VFMSUBADD231PSZr, X86::VFMSUBADD231PSZm, 0 }, + { X86::VFMSUBADD231PSr, X86::VFMSUBADD231PSm, 0 }, + { X86::VFNMADD132PDYr, X86::VFNMADD132PDYm, 0 }, + { X86::VFNMADD132PDZ128r, X86::VFNMADD132PDZ128m, 0 }, + { X86::VFNMADD132PDZ256r, X86::VFNMADD132PDZ256m, 0 }, + { X86::VFNMADD132PDZr, X86::VFNMADD132PDZm, 0 }, + { X86::VFNMADD132PDr, X86::VFNMADD132PDm, 0 }, + { X86::VFNMADD132PSYr, X86::VFNMADD132PSYm, 0 }, + { X86::VFNMADD132PSZ128r, X86::VFNMADD132PSZ128m, 0 }, + { X86::VFNMADD132PSZ256r, X86::VFNMADD132PSZ256m, 0 }, + { X86::VFNMADD132PSZr, X86::VFNMADD132PSZm, 0 }, + { X86::VFNMADD132PSr, X86::VFNMADD132PSm, 0 }, + { X86::VFNMADD132SDZr, X86::VFNMADD132SDZm, 0 }, + { X86::VFNMADD132SDZr_Int, X86::VFNMADD132SDZm_Int, TB_NO_REVERSE }, + { X86::VFNMADD132SDr, X86::VFNMADD132SDm, 0 }, + { X86::VFNMADD132SDr_Int, X86::VFNMADD132SDm_Int, TB_NO_REVERSE }, + { X86::VFNMADD132SSZr, X86::VFNMADD132SSZm, 0 }, + { X86::VFNMADD132SSZr_Int, X86::VFNMADD132SSZm_Int, TB_NO_REVERSE }, + { X86::VFNMADD132SSr, X86::VFNMADD132SSm, 0 }, + { X86::VFNMADD132SSr_Int, X86::VFNMADD132SSm_Int, TB_NO_REVERSE }, + { X86::VFNMADD213PDYr, X86::VFNMADD213PDYm, 0 }, + { X86::VFNMADD213PDZ128r, X86::VFNMADD213PDZ128m, 0 }, + { X86::VFNMADD213PDZ256r, X86::VFNMADD213PDZ256m, 0 }, + { X86::VFNMADD213PDZr, X86::VFNMADD213PDZm, 0 }, + { X86::VFNMADD213PDr, X86::VFNMADD213PDm, 0 }, + { X86::VFNMADD213PSYr, X86::VFNMADD213PSYm, 0 }, + { X86::VFNMADD213PSZ128r, X86::VFNMADD213PSZ128m, 0 }, + { X86::VFNMADD213PSZ256r, X86::VFNMADD213PSZ256m, 0 }, + { X86::VFNMADD213PSZr, X86::VFNMADD213PSZm, 0 }, + { X86::VFNMADD213PSr, X86::VFNMADD213PSm, 0 }, + { X86::VFNMADD213SDZr, X86::VFNMADD213SDZm, 0 }, + { X86::VFNMADD213SDZr_Int, X86::VFNMADD213SDZm_Int, TB_NO_REVERSE }, + { X86::VFNMADD213SDr, X86::VFNMADD213SDm, 0 }, + { X86::VFNMADD213SDr_Int, X86::VFNMADD213SDm_Int, TB_NO_REVERSE }, + { X86::VFNMADD213SSZr, X86::VFNMADD213SSZm, 0 }, + { X86::VFNMADD213SSZr_Int, X86::VFNMADD213SSZm_Int, TB_NO_REVERSE }, + { X86::VFNMADD213SSr, X86::VFNMADD213SSm, 0 }, + { X86::VFNMADD213SSr_Int, X86::VFNMADD213SSm_Int, TB_NO_REVERSE }, + { X86::VFNMADD231PDYr, X86::VFNMADD231PDYm, 0 }, + { X86::VFNMADD231PDZ128r, X86::VFNMADD231PDZ128m, 0 }, + { X86::VFNMADD231PDZ256r, X86::VFNMADD231PDZ256m, 0 }, + { X86::VFNMADD231PDZr, X86::VFNMADD231PDZm, 0 }, + { X86::VFNMADD231PDr, X86::VFNMADD231PDm, 0 }, + { X86::VFNMADD231PSYr, X86::VFNMADD231PSYm, 0 }, + { X86::VFNMADD231PSZ128r, X86::VFNMADD231PSZ128m, 0 }, + { X86::VFNMADD231PSZ256r, X86::VFNMADD231PSZ256m, 0 }, + { X86::VFNMADD231PSZr, X86::VFNMADD231PSZm, 0 }, + { X86::VFNMADD231PSr, X86::VFNMADD231PSm, 0 }, + { X86::VFNMADD231SDZr, X86::VFNMADD231SDZm, 0 }, + { X86::VFNMADD231SDZr_Int, X86::VFNMADD231SDZm_Int, TB_NO_REVERSE }, + { X86::VFNMADD231SDr, X86::VFNMADD231SDm, 0 }, + { X86::VFNMADD231SDr_Int, X86::VFNMADD231SDm_Int, TB_NO_REVERSE }, + { X86::VFNMADD231SSZr, X86::VFNMADD231SSZm, 0 }, + { X86::VFNMADD231SSZr_Int, X86::VFNMADD231SSZm_Int, TB_NO_REVERSE }, + { X86::VFNMADD231SSr, X86::VFNMADD231SSm, 0 }, + { X86::VFNMADD231SSr_Int, X86::VFNMADD231SSm_Int, TB_NO_REVERSE }, + { X86::VFNMSUB132PDYr, X86::VFNMSUB132PDYm, 0 }, + { X86::VFNMSUB132PDZ128r, X86::VFNMSUB132PDZ128m, 0 }, + { X86::VFNMSUB132PDZ256r, X86::VFNMSUB132PDZ256m, 0 }, + { X86::VFNMSUB132PDZr, X86::VFNMSUB132PDZm, 0 }, + { X86::VFNMSUB132PDr, X86::VFNMSUB132PDm, 0 }, + { X86::VFNMSUB132PSYr, X86::VFNMSUB132PSYm, 0 }, + { X86::VFNMSUB132PSZ128r, X86::VFNMSUB132PSZ128m, 0 }, + { X86::VFNMSUB132PSZ256r, X86::VFNMSUB132PSZ256m, 0 }, + { X86::VFNMSUB132PSZr, X86::VFNMSUB132PSZm, 0 }, + { X86::VFNMSUB132PSr, X86::VFNMSUB132PSm, 0 }, + { X86::VFNMSUB132SDZr, X86::VFNMSUB132SDZm, 0 }, + { X86::VFNMSUB132SDZr_Int, X86::VFNMSUB132SDZm_Int, TB_NO_REVERSE }, + { X86::VFNMSUB132SDr, X86::VFNMSUB132SDm, 0 }, + { X86::VFNMSUB132SDr_Int, X86::VFNMSUB132SDm_Int, TB_NO_REVERSE }, + { X86::VFNMSUB132SSZr, X86::VFNMSUB132SSZm, 0 }, + { X86::VFNMSUB132SSZr_Int, X86::VFNMSUB132SSZm_Int, TB_NO_REVERSE }, + { X86::VFNMSUB132SSr, X86::VFNMSUB132SSm, 0 }, + { X86::VFNMSUB132SSr_Int, X86::VFNMSUB132SSm_Int, TB_NO_REVERSE }, + { X86::VFNMSUB213PDYr, X86::VFNMSUB213PDYm, 0 }, + { X86::VFNMSUB213PDZ128r, X86::VFNMSUB213PDZ128m, 0 }, + { X86::VFNMSUB213PDZ256r, X86::VFNMSUB213PDZ256m, 0 }, + { X86::VFNMSUB213PDZr, X86::VFNMSUB213PDZm, 0 }, + { X86::VFNMSUB213PDr, X86::VFNMSUB213PDm, 0 }, + { X86::VFNMSUB213PSYr, X86::VFNMSUB213PSYm, 0 }, + { X86::VFNMSUB213PSZ128r, X86::VFNMSUB213PSZ128m, 0 }, + { X86::VFNMSUB213PSZ256r, X86::VFNMSUB213PSZ256m, 0 }, + { X86::VFNMSUB213PSZr, X86::VFNMSUB213PSZm, 0 }, + { X86::VFNMSUB213PSr, X86::VFNMSUB213PSm, 0 }, + { X86::VFNMSUB213SDZr, X86::VFNMSUB213SDZm, 0 }, + { X86::VFNMSUB213SDZr_Int, X86::VFNMSUB213SDZm_Int, TB_NO_REVERSE }, + { X86::VFNMSUB213SDr, X86::VFNMSUB213SDm, 0 }, + { X86::VFNMSUB213SDr_Int, X86::VFNMSUB213SDm_Int, TB_NO_REVERSE }, + { X86::VFNMSUB213SSZr, X86::VFNMSUB213SSZm, 0 }, + { X86::VFNMSUB213SSZr_Int, X86::VFNMSUB213SSZm_Int, TB_NO_REVERSE }, + { X86::VFNMSUB213SSr, X86::VFNMSUB213SSm, 0 }, + { X86::VFNMSUB213SSr_Int, X86::VFNMSUB213SSm_Int, TB_NO_REVERSE }, + { X86::VFNMSUB231PDYr, X86::VFNMSUB231PDYm, 0 }, + { X86::VFNMSUB231PDZ128r, X86::VFNMSUB231PDZ128m, 0 }, + { X86::VFNMSUB231PDZ256r, X86::VFNMSUB231PDZ256m, 0 }, + { X86::VFNMSUB231PDZr, X86::VFNMSUB231PDZm, 0 }, + { X86::VFNMSUB231PDr, X86::VFNMSUB231PDm, 0 }, + { X86::VFNMSUB231PSYr, X86::VFNMSUB231PSYm, 0 }, + { X86::VFNMSUB231PSZ128r, X86::VFNMSUB231PSZ128m, 0 }, + { X86::VFNMSUB231PSZ256r, X86::VFNMSUB231PSZ256m, 0 }, + { X86::VFNMSUB231PSZr, X86::VFNMSUB231PSZm, 0 }, + { X86::VFNMSUB231PSr, X86::VFNMSUB231PSm, 0 }, + { X86::VFNMSUB231SDZr, X86::VFNMSUB231SDZm, 0 }, + { X86::VFNMSUB231SDZr_Int, X86::VFNMSUB231SDZm_Int, TB_NO_REVERSE }, + { X86::VFNMSUB231SDr, X86::VFNMSUB231SDm, 0 }, + { X86::VFNMSUB231SDr_Int, X86::VFNMSUB231SDm_Int, TB_NO_REVERSE }, + { X86::VFNMSUB231SSZr, X86::VFNMSUB231SSZm, 0 }, + { X86::VFNMSUB231SSZr_Int, X86::VFNMSUB231SSZm_Int, TB_NO_REVERSE }, + { X86::VFNMSUB231SSr, X86::VFNMSUB231SSm, 0 }, + { X86::VFNMSUB231SSr_Int, X86::VFNMSUB231SSm_Int, TB_NO_REVERSE }, + // XOP foldable instructions { X86::VPCMOVrrr, X86::VPCMOVrrm, 0 }, { X86::VPCMOVYrrr, X86::VPCMOVYrrm, 0 }, @@ -4303,22 +4581,6 @@ X86InstrInfo::X86InstrInfo(X86Subtarget &STI) // Index 3, folded load Entry.Flags | TB_INDEX_3 | TB_FOLDED_LOAD); } - auto I = X86InstrFMA3Info::rm_begin(); - auto E = X86InstrFMA3Info::rm_end(); - for (; I != E; ++I) { - if (!I.getGroup()->isKMasked()) { - // Intrinsic forms need to pass TB_NO_REVERSE. - if (I.getGroup()->isIntrinsic()) { - AddTableEntry(RegOp2MemOpTable3, MemOp2RegOpTable, - I.getRegOpcode(), I.getMemOpcode(), - TB_ALIGN_NONE | TB_INDEX_3 | TB_FOLDED_LOAD | TB_NO_REVERSE); - } else { - AddTableEntry(RegOp2MemOpTable3, MemOp2RegOpTable, - I.getRegOpcode(), I.getMemOpcode(), - TB_ALIGN_NONE | TB_INDEX_3 | TB_FOLDED_LOAD); - } - } - } static const X86MemoryFoldTableEntry MemoryFoldTable4[] = { // AVX-512 foldable masked instructions @@ -4885,6 +5147,272 @@ X86InstrInfo::X86InstrInfo(X86Subtarget &STI) { X86::VXORPDZ128rrk, X86::VXORPDZ128rmk, 0 }, { X86::VXORPSZ128rrk, X86::VXORPSZ128rmk, 0 }, + // FMA3 maskable instructions. + { X86::VFMADD132PDZ128rk, X86::VFMADD132PDZ128mk, 0 }, + { X86::VFMADD132PDZ128rkz, X86::VFMADD132PDZ128mkz, 0 }, + { X86::VFMADD132PDZ256rk, X86::VFMADD132PDZ256mk, 0 }, + { X86::VFMADD132PDZ256rkz, X86::VFMADD132PDZ256mkz, 0 }, + { X86::VFMADD132PDZrk, X86::VFMADD132PDZmk, 0 }, + { X86::VFMADD132PDZrkz, X86::VFMADD132PDZmkz, 0 }, + { X86::VFMADD132PSZ128rk, X86::VFMADD132PSZ128mk, 0 }, + { X86::VFMADD132PSZ128rkz, X86::VFMADD132PSZ128mkz, 0 }, + { X86::VFMADD132PSZ256rk, X86::VFMADD132PSZ256mk, 0 }, + { X86::VFMADD132PSZ256rkz, X86::VFMADD132PSZ256mkz, 0 }, + { X86::VFMADD132PSZrk, X86::VFMADD132PSZmk, 0 }, + { X86::VFMADD132PSZrkz, X86::VFMADD132PSZmkz, 0 }, + { X86::VFMADD132SDZr_Intk, X86::VFMADD132SDZm_Intk, TB_NO_REVERSE }, + { X86::VFMADD132SDZr_Intkz, X86::VFMADD132SDZm_Intkz, TB_NO_REVERSE }, + { X86::VFMADD132SSZr_Intk, X86::VFMADD132SSZm_Intk, TB_NO_REVERSE }, + { X86::VFMADD132SSZr_Intkz, X86::VFMADD132SSZm_Intkz, TB_NO_REVERSE }, + { X86::VFMADD213PDZ128rk, X86::VFMADD213PDZ128mk, 0 }, + { X86::VFMADD213PDZ128rkz, X86::VFMADD213PDZ128mkz, 0 }, + { X86::VFMADD213PDZ256rk, X86::VFMADD213PDZ256mk, 0 }, + { X86::VFMADD213PDZ256rkz, X86::VFMADD213PDZ256mkz, 0 }, + { X86::VFMADD213PDZrk, X86::VFMADD213PDZmk, 0 }, + { X86::VFMADD213PDZrkz, X86::VFMADD213PDZmkz, 0 }, + { X86::VFMADD213PSZ128rk, X86::VFMADD213PSZ128mk, 0 }, + { X86::VFMADD213PSZ128rkz, X86::VFMADD213PSZ128mkz, 0 }, + { X86::VFMADD213PSZ256rk, X86::VFMADD213PSZ256mk, 0 }, + { X86::VFMADD213PSZ256rkz, X86::VFMADD213PSZ256mkz, 0 }, + { X86::VFMADD213PSZrk, X86::VFMADD213PSZmk, 0 }, + { X86::VFMADD213PSZrkz, X86::VFMADD213PSZmkz, 0 }, + { X86::VFMADD213SDZr_Intk, X86::VFMADD213SDZm_Intk, TB_NO_REVERSE }, + { X86::VFMADD213SDZr_Intkz, X86::VFMADD213SDZm_Intkz, TB_NO_REVERSE }, + { X86::VFMADD213SSZr_Intk, X86::VFMADD213SSZm_Intk, TB_NO_REVERSE }, + { X86::VFMADD213SSZr_Intkz, X86::VFMADD213SSZm_Intkz, TB_NO_REVERSE }, + { X86::VFMADD231PDZ128rk, X86::VFMADD231PDZ128mk, 0 }, + { X86::VFMADD231PDZ128rkz, X86::VFMADD231PDZ128mkz, 0 }, + { X86::VFMADD231PDZ256rk, X86::VFMADD231PDZ256mk, 0 }, + { X86::VFMADD231PDZ256rkz, X86::VFMADD231PDZ256mkz, 0 }, + { X86::VFMADD231PDZrk, X86::VFMADD231PDZmk, 0 }, + { X86::VFMADD231PDZrkz, X86::VFMADD231PDZmkz, 0 }, + { X86::VFMADD231PSZ128rk, X86::VFMADD231PSZ128mk, 0 }, + { X86::VFMADD231PSZ128rkz, X86::VFMADD231PSZ128mkz, 0 }, + { X86::VFMADD231PSZ256rk, X86::VFMADD231PSZ256mk, 0 }, + { X86::VFMADD231PSZ256rkz, X86::VFMADD231PSZ256mkz, 0 }, + { X86::VFMADD231PSZrk, X86::VFMADD231PSZmk, 0 }, + { X86::VFMADD231PSZrkz, X86::VFMADD231PSZmkz, 0 }, + { X86::VFMADD231SDZr_Intk, X86::VFMADD231SDZm_Intk, TB_NO_REVERSE }, + { X86::VFMADD231SDZr_Intkz, X86::VFMADD231SDZm_Intkz, TB_NO_REVERSE }, + { X86::VFMADD231SSZr_Intk, X86::VFMADD231SSZm_Intk, TB_NO_REVERSE }, + { X86::VFMADD231SSZr_Intkz, X86::VFMADD231SSZm_Intkz, TB_NO_REVERSE }, + { X86::VFMADDSUB132PDZ128rk, X86::VFMADDSUB132PDZ128mk, 0 }, + { X86::VFMADDSUB132PDZ128rkz, X86::VFMADDSUB132PDZ128mkz, 0 }, + { X86::VFMADDSUB132PDZ256rk, X86::VFMADDSUB132PDZ256mk, 0 }, + { X86::VFMADDSUB132PDZ256rkz, X86::VFMADDSUB132PDZ256mkz, 0 }, + { X86::VFMADDSUB132PDZrk, X86::VFMADDSUB132PDZmk, 0 }, + { X86::VFMADDSUB132PDZrkz, X86::VFMADDSUB132PDZmkz, 0 }, + { X86::VFMADDSUB132PSZ128rk, X86::VFMADDSUB132PSZ128mk, 0 }, + { X86::VFMADDSUB132PSZ128rkz, X86::VFMADDSUB132PSZ128mkz, 0 }, + { X86::VFMADDSUB132PSZ256rk, X86::VFMADDSUB132PSZ256mk, 0 }, + { X86::VFMADDSUB132PSZ256rkz, X86::VFMADDSUB132PSZ256mkz, 0 }, + { X86::VFMADDSUB132PSZrk, X86::VFMADDSUB132PSZmk, 0 }, + { X86::VFMADDSUB132PSZrkz, X86::VFMADDSUB132PSZmkz, 0 }, + { X86::VFMADDSUB213PDZ128rk, X86::VFMADDSUB213PDZ128mk, 0 }, + { X86::VFMADDSUB213PDZ128rkz, X86::VFMADDSUB213PDZ128mkz, 0 }, + { X86::VFMADDSUB213PDZ256rk, X86::VFMADDSUB213PDZ256mk, 0 }, + { X86::VFMADDSUB213PDZ256rkz, X86::VFMADDSUB213PDZ256mkz, 0 }, + { X86::VFMADDSUB213PDZrk, X86::VFMADDSUB213PDZmk, 0 }, + { X86::VFMADDSUB213PDZrkz, X86::VFMADDSUB213PDZmkz, 0 }, + { X86::VFMADDSUB213PSZ128rk, X86::VFMADDSUB213PSZ128mk, 0 }, + { X86::VFMADDSUB213PSZ128rkz, X86::VFMADDSUB213PSZ128mkz, 0 }, + { X86::VFMADDSUB213PSZ256rk, X86::VFMADDSUB213PSZ256mk, 0 }, + { X86::VFMADDSUB213PSZ256rkz, X86::VFMADDSUB213PSZ256mkz, 0 }, + { X86::VFMADDSUB213PSZrk, X86::VFMADDSUB213PSZmk, 0 }, + { X86::VFMADDSUB213PSZrkz, X86::VFMADDSUB213PSZmkz, 0 }, + { X86::VFMADDSUB231PDZ128rk, X86::VFMADDSUB231PDZ128mk, 0 }, + { X86::VFMADDSUB231PDZ128rkz, X86::VFMADDSUB231PDZ128mkz, 0 }, + { X86::VFMADDSUB231PDZ256rk, X86::VFMADDSUB231PDZ256mk, 0 }, + { X86::VFMADDSUB231PDZ256rkz, X86::VFMADDSUB231PDZ256mkz, 0 }, + { X86::VFMADDSUB231PDZrk, X86::VFMADDSUB231PDZmk, 0 }, + { X86::VFMADDSUB231PDZrkz, X86::VFMADDSUB231PDZmkz, 0 }, + { X86::VFMADDSUB231PSZ128rk, X86::VFMADDSUB231PSZ128mk, 0 }, + { X86::VFMADDSUB231PSZ128rkz, X86::VFMADDSUB231PSZ128mkz, 0 }, + { X86::VFMADDSUB231PSZ256rk, X86::VFMADDSUB231PSZ256mk, 0 }, + { X86::VFMADDSUB231PSZ256rkz, X86::VFMADDSUB231PSZ256mkz, 0 }, + { X86::VFMADDSUB231PSZrk, X86::VFMADDSUB231PSZmk, 0 }, + { X86::VFMADDSUB231PSZrkz, X86::VFMADDSUB231PSZmkz, 0 }, + { X86::VFMSUB132PDZ128rk, X86::VFMSUB132PDZ128mk, 0 }, + { X86::VFMSUB132PDZ128rkz, X86::VFMSUB132PDZ128mkz, 0 }, + { X86::VFMSUB132PDZ256rk, X86::VFMSUB132PDZ256mk, 0 }, + { X86::VFMSUB132PDZ256rkz, X86::VFMSUB132PDZ256mkz, 0 }, + { X86::VFMSUB132PDZrk, X86::VFMSUB132PDZmk, 0 }, + { X86::VFMSUB132PDZrkz, X86::VFMSUB132PDZmkz, 0 }, + { X86::VFMSUB132PSZ128rk, X86::VFMSUB132PSZ128mk, 0 }, + { X86::VFMSUB132PSZ128rkz, X86::VFMSUB132PSZ128mkz, 0 }, + { X86::VFMSUB132PSZ256rk, X86::VFMSUB132PSZ256mk, 0 }, + { X86::VFMSUB132PSZ256rkz, X86::VFMSUB132PSZ256mkz, 0 }, + { X86::VFMSUB132PSZrk, X86::VFMSUB132PSZmk, 0 }, + { X86::VFMSUB132PSZrkz, X86::VFMSUB132PSZmkz, 0 }, + { X86::VFMSUB132SDZr_Intk, X86::VFMSUB132SDZm_Intk, TB_NO_REVERSE }, + { X86::VFMSUB132SDZr_Intkz, X86::VFMSUB132SDZm_Intkz, TB_NO_REVERSE }, + { X86::VFMSUB132SSZr_Intk, X86::VFMSUB132SSZm_Intk, TB_NO_REVERSE }, + { X86::VFMSUB132SSZr_Intkz, X86::VFMSUB132SSZm_Intkz, TB_NO_REVERSE }, + { X86::VFMSUB213PDZ128rk, X86::VFMSUB213PDZ128mk, 0 }, + { X86::VFMSUB213PDZ128rkz, X86::VFMSUB213PDZ128mkz, 0 }, + { X86::VFMSUB213PDZ256rk, X86::VFMSUB213PDZ256mk, 0 }, + { X86::VFMSUB213PDZ256rkz, X86::VFMSUB213PDZ256mkz, 0 }, + { X86::VFMSUB213PDZrk, X86::VFMSUB213PDZmk, 0 }, + { X86::VFMSUB213PDZrkz, X86::VFMSUB213PDZmkz, 0 }, + { X86::VFMSUB213PSZ128rk, X86::VFMSUB213PSZ128mk, 0 }, + { X86::VFMSUB213PSZ128rkz, X86::VFMSUB213PSZ128mkz, 0 }, + { X86::VFMSUB213PSZ256rk, X86::VFMSUB213PSZ256mk, 0 }, + { X86::VFMSUB213PSZ256rkz, X86::VFMSUB213PSZ256mkz, 0 }, + { X86::VFMSUB213PSZrk, X86::VFMSUB213PSZmk, 0 }, + { X86::VFMSUB213PSZrkz, X86::VFMSUB213PSZmkz, 0 }, + { X86::VFMSUB213SDZr_Intk, X86::VFMSUB213SDZm_Intk, TB_NO_REVERSE }, + { X86::VFMSUB213SDZr_Intkz, X86::VFMSUB213SDZm_Intkz, TB_NO_REVERSE }, + { X86::VFMSUB213SSZr_Intk, X86::VFMSUB213SSZm_Intk, TB_NO_REVERSE }, + { X86::VFMSUB213SSZr_Intkz, X86::VFMSUB213SSZm_Intkz, TB_NO_REVERSE }, + { X86::VFMSUB231PDZ128rk, X86::VFMSUB231PDZ128mk, 0 }, + { X86::VFMSUB231PDZ128rkz, X86::VFMSUB231PDZ128mkz, 0 }, + { X86::VFMSUB231PDZ256rk, X86::VFMSUB231PDZ256mk, 0 }, + { X86::VFMSUB231PDZ256rkz, X86::VFMSUB231PDZ256mkz, 0 }, + { X86::VFMSUB231PDZrk, X86::VFMSUB231PDZmk, 0 }, + { X86::VFMSUB231PDZrkz, X86::VFMSUB231PDZmkz, 0 }, + { X86::VFMSUB231PSZ128rk, X86::VFMSUB231PSZ128mk, 0 }, + { X86::VFMSUB231PSZ128rkz, X86::VFMSUB231PSZ128mkz, 0 }, + { X86::VFMSUB231PSZ256rk, X86::VFMSUB231PSZ256mk, 0 }, + { X86::VFMSUB231PSZ256rkz, X86::VFMSUB231PSZ256mkz, 0 }, + { X86::VFMSUB231PSZrk, X86::VFMSUB231PSZmk, 0 }, + { X86::VFMSUB231PSZrkz, X86::VFMSUB231PSZmkz, 0 }, + { X86::VFMSUB231SDZr_Intk, X86::VFMSUB231SDZm_Intk, TB_NO_REVERSE }, + { X86::VFMSUB231SDZr_Intkz, X86::VFMSUB231SDZm_Intkz, TB_NO_REVERSE }, + { X86::VFMSUB231SSZr_Intk, X86::VFMSUB231SSZm_Intk, TB_NO_REVERSE }, + { X86::VFMSUB231SSZr_Intkz, X86::VFMSUB231SSZm_Intkz, TB_NO_REVERSE }, + { X86::VFMSUBADD132PDZ128rk, X86::VFMSUBADD132PDZ128mk, 0 }, + { X86::VFMSUBADD132PDZ128rkz, X86::VFMSUBADD132PDZ128mkz, 0 }, + { X86::VFMSUBADD132PDZ256rk, X86::VFMSUBADD132PDZ256mk, 0 }, + { X86::VFMSUBADD132PDZ256rkz, X86::VFMSUBADD132PDZ256mkz, 0 }, + { X86::VFMSUBADD132PDZrk, X86::VFMSUBADD132PDZmk, 0 }, + { X86::VFMSUBADD132PDZrkz, X86::VFMSUBADD132PDZmkz, 0 }, + { X86::VFMSUBADD132PSZ128rk, X86::VFMSUBADD132PSZ128mk, 0 }, + { X86::VFMSUBADD132PSZ128rkz, X86::VFMSUBADD132PSZ128mkz, 0 }, + { X86::VFMSUBADD132PSZ256rk, X86::VFMSUBADD132PSZ256mk, 0 }, + { X86::VFMSUBADD132PSZ256rkz, X86::VFMSUBADD132PSZ256mkz, 0 }, + { X86::VFMSUBADD132PSZrk, X86::VFMSUBADD132PSZmk, 0 }, + { X86::VFMSUBADD132PSZrkz, X86::VFMSUBADD132PSZmkz, 0 }, + { X86::VFMSUBADD213PDZ128rk, X86::VFMSUBADD213PDZ128mk, 0 }, + { X86::VFMSUBADD213PDZ128rkz, X86::VFMSUBADD213PDZ128mkz, 0 }, + { X86::VFMSUBADD213PDZ256rk, X86::VFMSUBADD213PDZ256mk, 0 }, + { X86::VFMSUBADD213PDZ256rkz, X86::VFMSUBADD213PDZ256mkz, 0 }, + { X86::VFMSUBADD213PDZrk, X86::VFMSUBADD213PDZmk, 0 }, + { X86::VFMSUBADD213PDZrkz, X86::VFMSUBADD213PDZmkz, 0 }, + { X86::VFMSUBADD213PSZ128rk, X86::VFMSUBADD213PSZ128mk, 0 }, + { X86::VFMSUBADD213PSZ128rkz, X86::VFMSUBADD213PSZ128mkz, 0 }, + { X86::VFMSUBADD213PSZ256rk, X86::VFMSUBADD213PSZ256mk, 0 }, + { X86::VFMSUBADD213PSZ256rkz, X86::VFMSUBADD213PSZ256mkz, 0 }, + { X86::VFMSUBADD213PSZrk, X86::VFMSUBADD213PSZmk, 0 }, + { X86::VFMSUBADD213PSZrkz, X86::VFMSUBADD213PSZmkz, 0 }, + { X86::VFMSUBADD231PDZ128rk, X86::VFMSUBADD231PDZ128mk, 0 }, + { X86::VFMSUBADD231PDZ128rkz, X86::VFMSUBADD231PDZ128mkz, 0 }, + { X86::VFMSUBADD231PDZ256rk, X86::VFMSUBADD231PDZ256mk, 0 }, + { X86::VFMSUBADD231PDZ256rkz, X86::VFMSUBADD231PDZ256mkz, 0 }, + { X86::VFMSUBADD231PDZrk, X86::VFMSUBADD231PDZmk, 0 }, + { X86::VFMSUBADD231PDZrkz, X86::VFMSUBADD231PDZmkz, 0 }, + { X86::VFMSUBADD231PSZ128rk, X86::VFMSUBADD231PSZ128mk, 0 }, + { X86::VFMSUBADD231PSZ128rkz, X86::VFMSUBADD231PSZ128mkz, 0 }, + { X86::VFMSUBADD231PSZ256rk, X86::VFMSUBADD231PSZ256mk, 0 }, + { X86::VFMSUBADD231PSZ256rkz, X86::VFMSUBADD231PSZ256mkz, 0 }, + { X86::VFMSUBADD231PSZrk, X86::VFMSUBADD231PSZmk, 0 }, + { X86::VFMSUBADD231PSZrkz, X86::VFMSUBADD231PSZmkz, 0 }, + { X86::VFNMADD132PDZ128rk, X86::VFNMADD132PDZ128mk, 0 }, + { X86::VFNMADD132PDZ128rkz, X86::VFNMADD132PDZ128mkz, 0 }, + { X86::VFNMADD132PDZ256rk, X86::VFNMADD132PDZ256mk, 0 }, + { X86::VFNMADD132PDZ256rkz, X86::VFNMADD132PDZ256mkz, 0 }, + { X86::VFNMADD132PDZrk, X86::VFNMADD132PDZmk, 0 }, + { X86::VFNMADD132PDZrkz, X86::VFNMADD132PDZmkz, 0 }, + { X86::VFNMADD132PSZ128rk, X86::VFNMADD132PSZ128mk, 0 }, + { X86::VFNMADD132PSZ128rkz, X86::VFNMADD132PSZ128mkz, 0 }, + { X86::VFNMADD132PSZ256rk, X86::VFNMADD132PSZ256mk, 0 }, + { X86::VFNMADD132PSZ256rkz, X86::VFNMADD132PSZ256mkz, 0 }, + { X86::VFNMADD132PSZrk, X86::VFNMADD132PSZmk, 0 }, + { X86::VFNMADD132PSZrkz, X86::VFNMADD132PSZmkz, 0 }, + { X86::VFNMADD132SDZr_Intk, X86::VFNMADD132SDZm_Intk, TB_NO_REVERSE }, + { X86::VFNMADD132SDZr_Intkz, X86::VFNMADD132SDZm_Intkz, TB_NO_REVERSE }, + { X86::VFNMADD132SSZr_Intk, X86::VFNMADD132SSZm_Intk, TB_NO_REVERSE }, + { X86::VFNMADD132SSZr_Intkz, X86::VFNMADD132SSZm_Intkz, TB_NO_REVERSE }, + { X86::VFNMADD213PDZ128rk, X86::VFNMADD213PDZ128mk, 0 }, + { X86::VFNMADD213PDZ128rkz, X86::VFNMADD213PDZ128mkz, 0 }, + { X86::VFNMADD213PDZ256rk, X86::VFNMADD213PDZ256mk, 0 }, + { X86::VFNMADD213PDZ256rkz, X86::VFNMADD213PDZ256mkz, 0 }, + { X86::VFNMADD213PDZrk, X86::VFNMADD213PDZmk, 0 }, + { X86::VFNMADD213PDZrkz, X86::VFNMADD213PDZmkz, 0 }, + { X86::VFNMADD213PSZ128rk, X86::VFNMADD213PSZ128mk, 0 }, + { X86::VFNMADD213PSZ128rkz, X86::VFNMADD213PSZ128mkz, 0 }, + { X86::VFNMADD213PSZ256rk, X86::VFNMADD213PSZ256mk, 0 }, + { X86::VFNMADD213PSZ256rkz, X86::VFNMADD213PSZ256mkz, 0 }, + { X86::VFNMADD213PSZrk, X86::VFNMADD213PSZmk, 0 }, + { X86::VFNMADD213PSZrkz, X86::VFNMADD213PSZmkz, 0 }, + { X86::VFNMADD213SDZr_Intk, X86::VFNMADD213SDZm_Intk, TB_NO_REVERSE }, + { X86::VFNMADD213SDZr_Intkz, X86::VFNMADD213SDZm_Intkz, TB_NO_REVERSE }, + { X86::VFNMADD213SSZr_Intk, X86::VFNMADD213SSZm_Intk, TB_NO_REVERSE }, + { X86::VFNMADD213SSZr_Intkz, X86::VFNMADD213SSZm_Intkz, TB_NO_REVERSE }, + { X86::VFNMADD231PDZ128rk, X86::VFNMADD231PDZ128mk, 0 }, + { X86::VFNMADD231PDZ128rkz, X86::VFNMADD231PDZ128mkz, 0 }, + { X86::VFNMADD231PDZ256rk, X86::VFNMADD231PDZ256mk, 0 }, + { X86::VFNMADD231PDZ256rkz, X86::VFNMADD231PDZ256mkz, 0 }, + { X86::VFNMADD231PDZrk, X86::VFNMADD231PDZmk, 0 }, + { X86::VFNMADD231PDZrkz, X86::VFNMADD231PDZmkz, 0 }, + { X86::VFNMADD231PSZ128rk, X86::VFNMADD231PSZ128mk, 0 }, + { X86::VFNMADD231PSZ128rkz, X86::VFNMADD231PSZ128mkz, 0 }, + { X86::VFNMADD231PSZ256rk, X86::VFNMADD231PSZ256mk, 0 }, + { X86::VFNMADD231PSZ256rkz, X86::VFNMADD231PSZ256mkz, 0 }, + { X86::VFNMADD231PSZrk, X86::VFNMADD231PSZmk, 0 }, + { X86::VFNMADD231PSZrkz, X86::VFNMADD231PSZmkz, 0 }, + { X86::VFNMADD231SDZr_Intk, X86::VFNMADD231SDZm_Intk, TB_NO_REVERSE }, + { X86::VFNMADD231SDZr_Intkz, X86::VFNMADD231SDZm_Intkz, TB_NO_REVERSE }, + { X86::VFNMADD231SSZr_Intk, X86::VFNMADD231SSZm_Intk, TB_NO_REVERSE }, + { X86::VFNMADD231SSZr_Intkz, X86::VFNMADD231SSZm_Intkz, TB_NO_REVERSE }, + { X86::VFNMSUB132PDZ128rk, X86::VFNMSUB132PDZ128mk, 0 }, + { X86::VFNMSUB132PDZ128rkz, X86::VFNMSUB132PDZ128mkz, 0 }, + { X86::VFNMSUB132PDZ256rk, X86::VFNMSUB132PDZ256mk, 0 }, + { X86::VFNMSUB132PDZ256rkz, X86::VFNMSUB132PDZ256mkz, 0 }, + { X86::VFNMSUB132PDZrk, X86::VFNMSUB132PDZmk, 0 }, + { X86::VFNMSUB132PDZrkz, X86::VFNMSUB132PDZmkz, 0 }, + { X86::VFNMSUB132PSZ128rk, X86::VFNMSUB132PSZ128mk, 0 }, + { X86::VFNMSUB132PSZ128rkz, X86::VFNMSUB132PSZ128mkz, 0 }, + { X86::VFNMSUB132PSZ256rk, X86::VFNMSUB132PSZ256mk, 0 }, + { X86::VFNMSUB132PSZ256rkz, X86::VFNMSUB132PSZ256mkz, 0 }, + { X86::VFNMSUB132PSZrk, X86::VFNMSUB132PSZmk, 0 }, + { X86::VFNMSUB132PSZrkz, X86::VFNMSUB132PSZmkz, 0 }, + { X86::VFNMSUB132SDZr_Intk, X86::VFNMSUB132SDZm_Intk, TB_NO_REVERSE }, + { X86::VFNMSUB132SDZr_Intkz, X86::VFNMSUB132SDZm_Intkz, TB_NO_REVERSE }, + { X86::VFNMSUB132SSZr_Intk, X86::VFNMSUB132SSZm_Intk, TB_NO_REVERSE }, + { X86::VFNMSUB132SSZr_Intkz, X86::VFNMSUB132SSZm_Intkz, TB_NO_REVERSE }, + { X86::VFNMSUB213PDZ128rk, X86::VFNMSUB213PDZ128mk, 0 }, + { X86::VFNMSUB213PDZ128rkz, X86::VFNMSUB213PDZ128mkz, 0 }, + { X86::VFNMSUB213PDZ256rk, X86::VFNMSUB213PDZ256mk, 0 }, + { X86::VFNMSUB213PDZ256rkz, X86::VFNMSUB213PDZ256mkz, 0 }, + { X86::VFNMSUB213PDZrk, X86::VFNMSUB213PDZmk, 0 }, + { X86::VFNMSUB213PDZrkz, X86::VFNMSUB213PDZmkz, 0 }, + { X86::VFNMSUB213PSZ128rk, X86::VFNMSUB213PSZ128mk, 0 }, + { X86::VFNMSUB213PSZ128rkz, X86::VFNMSUB213PSZ128mkz, 0 }, + { X86::VFNMSUB213PSZ256rk, X86::VFNMSUB213PSZ256mk, 0 }, + { X86::VFNMSUB213PSZ256rkz, X86::VFNMSUB213PSZ256mkz, 0 }, + { X86::VFNMSUB213PSZrk, X86::VFNMSUB213PSZmk, 0 }, + { X86::VFNMSUB213PSZrkz, X86::VFNMSUB213PSZmkz, 0 }, + { X86::VFNMSUB213SDZr_Intk, X86::VFNMSUB213SDZm_Intk, TB_NO_REVERSE }, + { X86::VFNMSUB213SDZr_Intkz, X86::VFNMSUB213SDZm_Intkz, TB_NO_REVERSE }, + { X86::VFNMSUB213SSZr_Intk, X86::VFNMSUB213SSZm_Intk, TB_NO_REVERSE }, + { X86::VFNMSUB213SSZr_Intkz, X86::VFNMSUB213SSZm_Intkz, TB_NO_REVERSE }, + { X86::VFNMSUB231PDZ128rk, X86::VFNMSUB231PDZ128mk, 0 }, + { X86::VFNMSUB231PDZ128rkz, X86::VFNMSUB231PDZ128mkz, 0 }, + { X86::VFNMSUB231PDZ256rk, X86::VFNMSUB231PDZ256mk, 0 }, + { X86::VFNMSUB231PDZ256rkz, X86::VFNMSUB231PDZ256mkz, 0 }, + { X86::VFNMSUB231PDZrk, X86::VFNMSUB231PDZmk, 0 }, + { X86::VFNMSUB231PDZrkz, X86::VFNMSUB231PDZmkz, 0 }, + { X86::VFNMSUB231PSZ128rk, X86::VFNMSUB231PSZ128mk, 0 }, + { X86::VFNMSUB231PSZ128rkz, X86::VFNMSUB231PSZ128mkz, 0 }, + { X86::VFNMSUB231PSZ256rk, X86::VFNMSUB231PSZ256mk, 0 }, + { X86::VFNMSUB231PSZ256rkz, X86::VFNMSUB231PSZ256mkz, 0 }, + { X86::VFNMSUB231PSZrk, X86::VFNMSUB231PSZmk, 0 }, + { X86::VFNMSUB231PSZrkz, X86::VFNMSUB231PSZmkz, 0 }, + { X86::VFNMSUB231SDZr_Intk, X86::VFNMSUB231SDZm_Intk, TB_NO_REVERSE }, + { X86::VFNMSUB231SDZr_Intkz, X86::VFNMSUB231SDZm_Intkz, TB_NO_REVERSE }, + { X86::VFNMSUB231SSZr_Intk, X86::VFNMSUB231SSZm_Intk, TB_NO_REVERSE }, + { X86::VFNMSUB231SSZr_Intkz, X86::VFNMSUB231SSZm_Intkz, TB_NO_REVERSE }, + // GFNI masked instructions. { X86::VGF2P8AFFINEINVQBZ128rrik, X86::VGF2P8AFFINEINVQBZ128rmik, 0 }, { X86::VGF2P8AFFINEINVQBZ256rrik, X86::VGF2P8AFFINEINVQBZ256rmik, 0 }, @@ -4995,20 +5523,6 @@ X86InstrInfo::X86InstrInfo(X86Subtarget &STI) // Index 4, folded load Entry.Flags | TB_INDEX_4 | TB_FOLDED_LOAD); } - for (I = X86InstrFMA3Info::rm_begin(); I != E; ++I) { - if (I.getGroup()->isKMasked()) { - // Intrinsics need to pass TB_NO_REVERSE. - if (I.getGroup()->isIntrinsic()) { - AddTableEntry(RegOp2MemOpTable4, MemOp2RegOpTable, - I.getRegOpcode(), I.getMemOpcode(), - TB_ALIGN_NONE | TB_INDEX_4 | TB_FOLDED_LOAD | TB_NO_REVERSE); - } else { - AddTableEntry(RegOp2MemOpTable4, MemOp2RegOpTable, - I.getRegOpcode(), I.getMemOpcode(), - TB_ALIGN_NONE | TB_INDEX_4 | TB_FOLDED_LOAD); - } - } - } } void