[PATCH] D28744: [X86][AVX] Remove "OptForSize" condition from some memory foldings.

Ayman Musa via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 18 05:22:40 PST 2017

aymanmus marked 3 inline comments as done.
aymanmus added inline comments.

Comment at: lib/Target/X86/X86InstrInfo.cpp:1928
+    { X86::VRCP14SSrr,        X86::VRCP14SSrm,          TB_NO_REVERSE },
+    { X86::VRSQRT14SSrr,      X86::VRSQRT14SSrm,        TB_NO_REVERSE },
     { X86::VSHUFPDZrri,       X86::VSHUFPDZrmi,         0 },
RKSimon wrote:
> Isn't it only the _Int variants that need TB_NO_REVERSE ?
TB_NO_REVERSE is used when the load size of the memory form is smaller than the register's size of the register form. In that case the unfolding is not legal since it will produce a load with the registers size.

Comment at: lib/Target/X86/X86InstrInfo.cpp:1932
+    { X86::VSQRTSSZr,         X86::VSQRTSSZm,           0 },
+    { X86::VSQRTSDZr,         X86::VSQRTSDZm,           0 },
     { X86::VSUBPDZrr,         X86::VSUBPDZrm,           0 },
RKSimon wrote:
> All these changes to X86InstrInfo.cpp should probably be split off - add them to the stack-folding-*.ll tests
Do you mean these changes should be in a separate patch?
If I understand you correctly, I think the changes in X86InstrInfo.cpp is relevant to the patch since the main change here is to enable the folding of few instructions. Adding these entries does exactly that.


More information about the llvm-commits mailing list