mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-26 14:25:18 +00:00
Fix operator precedence bug caught by VC++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24318 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
88f6c46cb9
commit
06d9b4ab24
@ -967,8 +967,8 @@ SDOperand DAGCombiner::visitAND(SDNode *N) {
|
||||
// fold (and (sign_extend_inreg x, i16 to i32), 1) -> (and x, 1)
|
||||
if (N1C && N0.getOpcode() == ISD::SIGN_EXTEND_INREG) {
|
||||
unsigned ExtendBits =
|
||||
MVT::getSizeInBits(cast<VTSDNode>(N0.getOperand(1))->getVT());
|
||||
if (ExtendBits == 64 || (N1C->getValue() & (~0ULL << ExtendBits) == 0))
|
||||
MVT::getSizeInBits(cast<VTSDNode>(N0.getOperand(1))->getVT());
|
||||
if (ExtendBits == 64 || ((N1C->getValue() & (~0ULL << ExtendBits)) == 0))
|
||||
return DAG.getNode(ISD::AND, VT, N0.getOperand(0), N1);
|
||||
}
|
||||
// fold (and (or x, 0xFFFF), 0xFF) -> 0xFF
|
||||
|
Loading…
x
Reference in New Issue
Block a user