[llvm] r229566 - Add comment to explain a non-obvious setting; NFC.

Sanjay Patel spatel at rotateright.com
Tue Feb 17 14:09:54 PST 2015


Author: spatel
Date: Tue Feb 17 16:09:54 2015
New Revision: 229566

URL: http://llvm.org/viewvc/llvm-project?rev=229566&view=rev
Log:
Add comment to explain a non-obvious setting; NFC.

This is paraphrased from Simon Pilgrim's comment in:
http://reviews.llvm.org/D7492


Modified:
    llvm/trunk/lib/Target/X86/X86InstrInfo.cpp

Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.cpp?rev=229566&r1=229565&r2=229566&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86InstrInfo.cpp Tue Feb 17 16:09:54 2015
@@ -657,6 +657,12 @@ X86InstrInfo::X86InstrInfo(X86Subtarget
     { X86::VTESTPSYrr,      X86::VTESTPSYrm,          0 },
 
     // AVX2 foldable instructions
+
+    // VBROADCASTS{SD}rr register instructions were an AVX2 addition while the
+    // VBROADCASTS{SD}rm memory instructions were available from AVX1.
+    // TB_NO_REVERSE prevents unfolding from introducing an illegal instruction
+    // on AVX1 targets. The VPBROADCAST instructions are all AVX2 instructions
+    // so they don't need an equivalent limitation.
     { X86::VBROADCASTSSrr,  X86::VBROADCASTSSrm,      TB_NO_REVERSE },
     { X86::VBROADCASTSSYrr, X86::VBROADCASTSSYrm,     TB_NO_REVERSE },
     { X86::VBROADCASTSDYrr, X86::VBROADCASTSDYrm,     TB_NO_REVERSE },





More information about the llvm-commits mailing list