aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/X86/InstSelectSimple.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-05-09 22:28:45 +0000
committerChris Lattner <sabre@nondot.org>2004-05-09 22:28:45 +0000
commit96e3b426d5cab4a7ea4bb3c51facf7bb5362e0e5 (patch)
tree2b768d266b3c638dcf010565b1c810508c517b91 /lib/Target/X86/InstSelectSimple.cpp
parentcb3ad018334a0a6b961fd89c6b62cff7a0ff3988 (diff)
Generate more efficient code for casting booleans to integers (no sign extension required)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13439 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/InstSelectSimple.cpp')
-rw-r--r--lib/Target/X86/InstSelectSimple.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/X86/InstSelectSimple.cpp b/lib/Target/X86/InstSelectSimple.cpp
index eb41077dc5..62002e7dc7 100644
--- a/lib/Target/X86/InstSelectSimple.cpp
+++ b/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);