[llvm-commits] [llvm] r54803 - /llvm/trunk/lib/Target/X86/X86ISelLowering.cpp

Dan Gohman gohman at apple.com
Thu Aug 14 15:53:18 PDT 2008


Author: djg
Date: Thu Aug 14 17:53:18 2008
New Revision: 54803

URL: http://llvm.org/viewvc/llvm-project?rev=54803&view=rev
Log:
Also avoid pinsrw and pinsrb with a variable insertelement index.

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

Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=54803&r1=54802&r2=54803&view=diff

==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Thu Aug 14 17:53:18 2008
@@ -4143,7 +4143,8 @@
   SDValue N1 = Op.getOperand(1);
   SDValue N2 = Op.getOperand(2);
 
-  if ((EVT.getSizeInBits() == 8) || (EVT.getSizeInBits() == 16)) {
+  if ((EVT.getSizeInBits() == 8 || EVT.getSizeInBits() == 16) &&
+      isa<ConstantSDNode>(N2)) {
     unsigned Opc = (EVT.getSizeInBits() == 8) ? X86ISD::PINSRB
                                                   : X86ISD::PINSRW;
     // Transform it so it match pinsr{b,w} which expects a GR32 as its second





More information about the llvm-commits mailing list