[llvm-commits] [llvm-gcc-4.2] r103918 - /llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp

Eric Christopher echristo at apple.com
Sun May 16 18:29:18 PDT 2010


Author: echristo
Date: Sun May 16 20:29:18 2010
New Revision: 103918

URL: http://llvm.org/viewvc/llvm-project?rev=103918&view=rev
Log:
Fix divide by 8 thinko in palignr128 expansion.  It's there in the
mmx version.

Modified:
    llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp

Modified: llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp?rev=103918&r1=103917&r2=103918&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp Sun May 16 20:29:18 2010
@@ -664,7 +664,9 @@
   }
   case IX86_BUILTIN_PALIGNR128: {
     if (ConstantInt *Elt = dyn_cast<ConstantInt>(Ops[2])) {
-      unsigned shiftVal = cast<ConstantInt>(Ops[2])->getZExtValue();
+      
+      // In the header we multiply by 8, correct that back now.
+      unsigned shiftVal = (cast<ConstantInt>(Ops[2])->getZExtValue())/8;
 
       // If palignr is shifting the pair of input vectors less than 17 bytes,
       // emit a shuffle instruction.





More information about the llvm-commits mailing list