mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-04 17:58:22 +00:00
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
This commit is contained in:
parent
cb3ad01833
commit
96e3b426d5
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user