diff options
author | Chris Lattner <sabre@nondot.org> | 2006-04-02 06:15:09 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-04-02 06:15:09 +0000 |
commit | e6025525fb94ee4560d8f74bd761d2946a97041f (patch) | |
tree | c50103c83675e9661b573985f07de3822397689f /llvm/lib/Target/TargetLowering.cpp | |
parent | 4993249a04bf59a0c142077f75525b30e4f40b7b (diff) | |
download | bcm5719-llvm-e6025525fb94ee4560d8f74bd761d2946a97041f.tar.gz bcm5719-llvm-e6025525fb94ee4560d8f74bd761d2946a97041f.zip |
Allow targets to compute masked bits for intrinsics.
llvm-svn: 27357
Diffstat (limited to 'llvm/lib/Target/TargetLowering.cpp')
-rw-r--r-- | llvm/lib/Target/TargetLowering.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/llvm/lib/Target/TargetLowering.cpp b/llvm/lib/Target/TargetLowering.cpp index f1e36be494d..9a2c9a19fb6 100644 --- a/llvm/lib/Target/TargetLowering.cpp +++ b/llvm/lib/Target/TargetLowering.cpp @@ -619,9 +619,10 @@ bool TargetLowering::SimplifyDemandedBits(SDOperand Op, uint64_t DemandedMask, } case ISD::ADD: case ISD::SUB: - // Just use ComputeMaskedBits to compute output bits, there are no - // simplifications that can be done here, and sub always demands all input - // bits. + case ISD::INTRINSIC_WO_CHAIN: + case ISD::INTRINSIC_W_CHAIN: + case ISD::INTRINSIC_VOID: + // Just use ComputeMaskedBits to compute output bits. ComputeMaskedBits(Op, DemandedMask, KnownZero, KnownOne, Depth); break; } @@ -916,8 +917,12 @@ void TargetLowering::ComputeMaskedBits(SDOperand Op, uint64_t Mask, } default: // Allow the target to implement this method for its nodes. - if (Op.getOpcode() >= ISD::BUILTIN_OP_END) + if (Op.getOpcode() >= ISD::BUILTIN_OP_END) { + case ISD::INTRINSIC_WO_CHAIN: + case ISD::INTRINSIC_W_CHAIN: + case ISD::INTRINSIC_VOID: computeMaskedBitsForTargetNode(Op, Mask, KnownZero, KnownOne); + } return; } } |