diff options
author | Dan Gohman <gohman@apple.com> | 2007-06-26 16:19:08 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2007-06-26 16:19:08 +0000 |
commit | 4d2a0f5bd69f42e6313ae92a0470f8ef968e4c94 (patch) | |
tree | 3b054bfe6164b72a1855ae6f03d2e3dd5db98e91 | |
parent | 25aceacb29899b7dff02c657da97469314c9cdd1 (diff) | |
download | external_llvm-4d2a0f5bd69f42e6313ae92a0470f8ef968e4c94.zip external_llvm-4d2a0f5bd69f42e6313ae92a0470f8ef968e4c94.tar.gz external_llvm-4d2a0f5bd69f42e6313ae92a0470f8ef968e4c94.tar.bz2 |
Replace ?: with if statements, for clarity.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37735 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Target/TargetLowering.h | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h index 24b0540..085387f 100644 --- a/include/llvm/Target/TargetLowering.h +++ b/include/llvm/Target/TargetLowering.h @@ -148,9 +148,8 @@ public: } LegalizeAction getTypeAction(MVT::ValueType VT) const { - return !MVT::isExtendedValueType(VT) ? - (LegalizeAction)((ValueTypeActions[VT>>4] >> ((2*VT) & 31)) & 3) : - Expand; + if (MVT::isExtendedValueType(VT)) return Expand; + return (LegalizeAction)((ValueTypeActions[VT>>4] >> ((2*VT) & 31)) & 3); } void setTypeAction(MVT::ValueType VT, LegalizeAction Action) { assert(!MVT::isExtendedValueType(VT)); @@ -251,9 +250,8 @@ public: /// expanded to some other code sequence, or the target has a custom expander /// for it. LegalizeAction getOperationAction(unsigned Op, MVT::ValueType VT) const { - return !MVT::isExtendedValueType(VT) ? - (LegalizeAction)((OpActions[Op] >> (2*VT)) & 3) : - Expand; + if (MVT::isExtendedValueType(VT)) return Expand; + return (LegalizeAction)((OpActions[Op] >> (2*VT)) & 3); } /// isOperationLegal - Return true if the specified operation is legal on this @@ -268,9 +266,8 @@ public: /// expanded to some other code sequence, or the target has a custom expander /// for it. LegalizeAction getLoadXAction(unsigned LType, MVT::ValueType VT) const { - return !MVT::isExtendedValueType(VT) ? - (LegalizeAction)((LoadXActions[LType] >> (2*VT)) & 3) : - Expand; + if (MVT::isExtendedValueType(VT)) return Expand; + return (LegalizeAction)((LoadXActions[LType] >> (2*VT)) & 3); } /// isLoadXLegal - Return true if the specified load with extension is legal @@ -285,9 +282,8 @@ public: /// expanded to some other code sequence, or the target has a custom expander /// for it. LegalizeAction getStoreXAction(MVT::ValueType VT) const { - return !MVT::isExtendedValueType(VT) ? - (LegalizeAction)((StoreXActions >> (2*VT)) & 3) : - Expand; + if (MVT::isExtendedValueType(VT)) return Expand; + return (LegalizeAction)((StoreXActions >> (2*VT)) & 3); } /// isStoreXLegal - Return true if the specified store with truncation is @@ -302,9 +298,8 @@ public: /// for it. LegalizeAction getIndexedLoadAction(unsigned IdxMode, MVT::ValueType VT) const { - return !MVT::isExtendedValueType(VT) ? - (LegalizeAction)((IndexedModeActions[0][IdxMode] >> (2*VT)) & 3) : - Expand; + if (MVT::isExtendedValueType(VT)) return Expand; + return (LegalizeAction)((IndexedModeActions[0][IdxMode] >> (2*VT)) & 3); } /// isIndexedLoadLegal - Return true if the specified indexed load is legal @@ -320,9 +315,8 @@ public: /// for it. LegalizeAction getIndexedStoreAction(unsigned IdxMode, MVT::ValueType VT) const { - return !MVT::isExtendedValueType(VT) ? - (LegalizeAction)((IndexedModeActions[1][IdxMode] >> (2*VT)) & 3) : - Expand; + if (MVT::isExtendedValueType(VT)) return Expand; + return (LegalizeAction)((IndexedModeActions[1][IdxMode] >> (2*VT)) & 3); } /// isIndexedStoreLegal - Return true if the specified indexed load is legal |