mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01:00
[ARMTargetLowering] ARMISD::{SUB,ADD}{C,E} second result is a boolean implying that upper bits are always 0.
llvm-svn: 184231
This commit is contained in:
parent
dde9797dc2
commit
5a5656f17d
@ -10184,9 +10184,19 @@ void ARMTargetLowering::computeMaskedBitsForTargetNode(const SDValue Op,
|
|||||||
APInt &KnownOne,
|
APInt &KnownOne,
|
||||||
const SelectionDAG &DAG,
|
const SelectionDAG &DAG,
|
||||||
unsigned Depth) const {
|
unsigned Depth) const {
|
||||||
KnownZero = KnownOne = APInt(KnownOne.getBitWidth(), 0);
|
unsigned BitWidth = KnownOne.getBitWidth();
|
||||||
|
KnownZero = KnownOne = APInt(BitWidth, 0);
|
||||||
switch (Op.getOpcode()) {
|
switch (Op.getOpcode()) {
|
||||||
default: break;
|
default: break;
|
||||||
|
case ARMISD::ADDC:
|
||||||
|
case ARMISD::ADDE:
|
||||||
|
case ARMISD::SUBC:
|
||||||
|
case ARMISD::SUBE:
|
||||||
|
// These nodes' second result is a boolean
|
||||||
|
if (Op.getResNo() == 0)
|
||||||
|
break;
|
||||||
|
KnownZero |= APInt::getHighBitsSet(BitWidth, BitWidth - 1);
|
||||||
|
break;
|
||||||
case ARMISD::CMOV: {
|
case ARMISD::CMOV: {
|
||||||
// Bits are known zero/one if known on the LHS and RHS.
|
// Bits are known zero/one if known on the LHS and RHS.
|
||||||
DAG.ComputeMaskedBits(Op.getOperand(0), KnownZero, KnownOne, Depth+1);
|
DAG.ComputeMaskedBits(Op.getOperand(0), KnownZero, KnownOne, Depth+1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user