diff options
| author | Chris Lattner <sabre@nondot.org> | 2004-05-09 22:28:45 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2004-05-09 22:28:45 +0000 |
| commit | 1542a98e7b3d58c47a82dd22a4693d8d104df1f1 (patch) | |
| tree | 6abbf04145cbd844ccf6098b8d7741bcaac57ba9 /llvm/lib/Target/X86/InstSelectSimple.cpp | |
| parent | f719a52088ebc49cf36df43a40716ee8196ef980 (diff) | |
| download | bcm5719-llvm-1542a98e7b3d58c47a82dd22a4693d8d104df1f1.tar.gz bcm5719-llvm-1542a98e7b3d58c47a82dd22a4693d8d104df1f1.zip | |
Generate more efficient code for casting booleans to integers (no sign extension required)
llvm-svn: 13439
Diffstat (limited to 'llvm/lib/Target/X86/InstSelectSimple.cpp')
| -rw-r--r-- | llvm/lib/Target/X86/InstSelectSimple.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/InstSelectSimple.cpp b/llvm/lib/Target/X86/InstSelectSimple.cpp index eb41077dc53..62002e7dc74 100644 --- a/llvm/lib/Target/X86/InstSelectSimple.cpp +++ b/llvm/lib/Target/X86/InstSelectSimple.cpp @@ -3051,7 +3051,7 @@ void ISel::emitCastOperation(MachineBasicBlock *BB, { 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); |

