mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-04-02 07:41:38 +00:00
Port the fix for the select operator from instcombine's
ComputeNumSignBits to SelectionDAG's ComputeNumSignBits. llvm-svn: 51348
This commit is contained in:
parent
287e750e64
commit
d545f5b229
@ -1690,9 +1690,9 @@ unsigned SelectionDAG::ComputeNumSignBits(SDOperand Op, unsigned Depth) const{
|
|||||||
return std::min(Tmp, Tmp2);
|
return std::min(Tmp, Tmp2);
|
||||||
|
|
||||||
case ISD::SELECT:
|
case ISD::SELECT:
|
||||||
Tmp = ComputeNumSignBits(Op.getOperand(0), Depth+1);
|
Tmp = ComputeNumSignBits(Op.getOperand(1), Depth+1);
|
||||||
if (Tmp == 1) return 1; // Early out.
|
if (Tmp == 1) return 1; // Early out.
|
||||||
Tmp2 = ComputeNumSignBits(Op.getOperand(1), Depth+1);
|
Tmp2 = ComputeNumSignBits(Op.getOperand(2), Depth+1);
|
||||||
return std::min(Tmp, Tmp2);
|
return std::min(Tmp, Tmp2);
|
||||||
|
|
||||||
case ISD::SETCC:
|
case ISD::SETCC:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user