diff options
author | Evan Cheng <evan.cheng@apple.com> | 2012-12-06 19:13:27 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2012-12-06 19:13:27 +0000 |
commit | 2766a47310b05228e9bbc536d9f3a593fc31cd12 (patch) | |
tree | fbdb8dd88694372123249f79cc6780a61b2c77fa /include | |
parent | d3a056392b2a3e4abecaf304f9e452be6584b259 (diff) | |
download | llvm-2766a47310b05228e9bbc536d9f3a593fc31cd12.tar.gz llvm-2766a47310b05228e9bbc536d9f3a593fc31cd12.tar.bz2 llvm-2766a47310b05228e9bbc536d9f3a593fc31cd12.tar.xz |
Replace r169459 with something safer. Rather than having computeMaskedBits to
understand target implementation of any_extend / extload, just generate
zero_extend in place of any_extend for liveouts when the target knows the
zero_extend will be implicit (e.g. ARM ldrb / ldrh) or folded (e.g. x86 movz).
rdar://12771555
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169536 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Target/TargetLowering.h | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h index 2cdc05096b..1cef274c34 100644 --- a/include/llvm/Target/TargetLowering.h +++ b/include/llvm/Target/TargetLowering.h @@ -935,16 +935,6 @@ public: const SelectionDAG &DAG, unsigned Depth = 0) const; - /// computeMaskedBitsForAnyExtend - Since each target implement ANY_EXTEND - /// and ExtLoad nodes specifically, let the target determine which of the bits - /// specified in Mask are known to be either zero or one and return them in - /// the KnownZero/KnownOne bitsets. - virtual void computeMaskedBitsForAnyExtend(const SDValue Op, - APInt &KnownZero, - APInt &KnownOne, - const SelectionDAG &DAG, - unsigned Depth = 0) const; - /// ComputeNumSignBitsForTargetNode - This method can be implemented by /// targets that want to expose additional information about sign bits to the /// DAG Combiner. @@ -1723,6 +1713,13 @@ public: return false; } + /// isZExtFree - Return true if zero-extending the specific node Val to type + /// VT2 is free (either because it's implicitly zero-extended such as ARM + /// ldrb / ldrh or because it's folded such as X86 zero-extending loads). + virtual bool isZExtFree(SDValue Val, EVT VT2) const { + return isZExtFree(Val.getValueType(), VT2); + } + /// isFNegFree - Return true if an fneg operation is free to the point where /// it is never worthwhile to replace it with a bitwise operation. virtual bool isFNegFree(EVT) const { |