[llvm-commits] [dragonegg] r104442 - /dragonegg/trunk/x86/llvm-target.cpp

Duncan Sands baldrick at free.fr
Sat May 22 04:48:29 PDT 2010


Author: baldrick
Date: Sat May 22 06:48:29 2010
New Revision: 104442

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

Modified:
    dragonegg/trunk/x86/llvm-target.cpp

Modified: dragonegg/trunk/x86/llvm-target.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/x86/llvm-target.cpp?rev=104442&r1=104441&r2=104442&view=diff
==============================================================================
--- dragonegg/trunk/x86/llvm-target.cpp (original)
+++ dragonegg/trunk/x86/llvm-target.cpp Sat May 22 06:48:29 2010
@@ -1320,7 +1320,9 @@
   }
   IX86_BUILTIN_PALIGNR128: {
     if (isa<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