mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-24 12:36:30 +00:00
Generate more efficient code for casting booleans to integers (no sign extension required)
llvm-svn: 13439
This commit is contained in:
parent
8ccfc21a0f
commit
d18c637a37
@ -3051,7 +3051,7 @@ void ISel::emitCastOperation(MachineBasicBlock *BB,
|
|||||||
{ X86::MOVZX16rr8, X86::MOVZX32rr8, X86::MOVZX32rr16, X86::MOV32rr } // u
|
{ 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,
|
BuildMI(*BB, IP, Opc[isUnsigned][SrcClass + DestClass - 1], 1,
|
||||||
DestReg).addReg(SrcReg);
|
DestReg).addReg(SrcReg);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user