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

Chris Lattner lattner at cs.uiuc.edu
Sun May 9 17:29:00 PDT 2004


Changes in directory llvm/lib/Target/X86:

InstSelectSimple.cpp updated: 1.247 -> 1.248

---
Log message:

Generate more efficient code for casting booleans to integers (no sign extension required)


---
Diffs of the changes:  (+1 -1)

Index: llvm/lib/Target/X86/InstSelectSimple.cpp
diff -u llvm/lib/Target/X86/InstSelectSimple.cpp:1.247 llvm/lib/Target/X86/InstSelectSimple.cpp:1.248
--- llvm/lib/Target/X86/InstSelectSimple.cpp:1.247	Fri May  7 16:18:15 2004
+++ llvm/lib/Target/X86/InstSelectSimple.cpp	Sun May  9 17:28:45 2004
@@ -3051,7 +3051,7 @@
       { X86::MOVZX16rr8, X86::MOVZX32rr8, X86::MOVZX32rr16, X86::MOV32rr }  // u
     };
     
-    bool isUnsigned = SrcTy->isUnsigned();
+    bool isUnsigned = SrcTy->isUnsigned() || SrcTy == Type::BoolTy;
     BuildMI(*BB, IP, Opc[isUnsigned][SrcClass + DestClass - 1], 1,
         DestReg).addReg(SrcReg);
 





More information about the llvm-commits mailing list