[llvm-commits] [release_20] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp

Tanya Lattner tonic at nondot.org
Thu May 17 23:00:06 PDT 2007



Changes in directory llvm/lib/Target/X86:

X86ISelLowering.cpp updated: 1.399 -> 1.399.2.1
---
Log message:

Merging from mainline.


---
Diffs of the changes:  (+4 -3)

 X86ISelLowering.cpp |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)


Index: llvm/lib/Target/X86/X86ISelLowering.cpp
diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.399 llvm/lib/Target/X86/X86ISelLowering.cpp:1.399.2.1
--- llvm/lib/Target/X86/X86ISelLowering.cpp:1.399	Thu May  3 11:52:29 2007
+++ llvm/lib/Target/X86/X86ISelLowering.cpp	Fri May 18 00:59:52 2007
@@ -4725,18 +4725,19 @@
   case 'I':
     if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(Op)) {
       if (C->getValue() <= 31)
-        return Op;
+        return DAG.getTargetConstant(C->getValue(), Op.getValueType());
     }
     return SDOperand(0,0);
   case 'N':
     if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(Op)) {
       if (C->getValue() <= 255)
-        return Op;
+        return DAG.getTargetConstant(C->getValue(), Op.getValueType());
     }
     return SDOperand(0,0);
   case 'i': {
     // Literal immediates are always ok.
-    if (isa<ConstantSDNode>(Op)) return Op;
+    if (ConstantSDNode *CST = dyn_cast<ConstantSDNode>(Op))
+      return DAG.getTargetConstant(CST->getValue(), Op.getValueType());
 
     // If we are in non-pic codegen mode, we allow the address of a global (with
     // an optional displacement) to be used with 'i'.






More information about the llvm-commits mailing list