summaryrefslogtreecommitdiff
path: root/include/llvm/Target/TargetLowering.h
diff options
context:
space:
mode:
authorPatrik Hagglund <patrik.h.hagglund@ericsson.com>2012-12-19 10:09:26 +0000
committerPatrik Hagglund <patrik.h.hagglund@ericsson.com>2012-12-19 10:09:26 +0000
commit9c5ab9355e00686e120e12952908ea8ad981d776 (patch)
treeeb62859fd22ed17b212ee026b82f25db709df84f /include/llvm/Target/TargetLowering.h
parent6424a783add6f00e5a8e5ddbe0289dfe3e271c8b (diff)
downloadllvm-9c5ab9355e00686e120e12952908ea8ad981d776.tar.gz
llvm-9c5ab9355e00686e120e12952908ea8ad981d776.tar.bz2
llvm-9c5ab9355e00686e120e12952908ea8ad981d776.tar.xz
Change TargetLowering::getCondCodeAction to take an MVT, instead of
EVT. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170522 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target/TargetLowering.h')
-rw-r--r--include/llvm/Target/TargetLowering.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h
index 78d4e49117..012d908832 100644
--- a/include/llvm/Target/TargetLowering.h
+++ b/include/llvm/Target/TargetLowering.h
@@ -509,16 +509,15 @@ public:
/// either it is legal, needs to be expanded to some other code sequence,
/// or the target has a custom expander for it.
LegalizeAction
- getCondCodeAction(ISD::CondCode CC, EVT VT) const {
+ getCondCodeAction(ISD::CondCode CC, MVT VT) const {
assert((unsigned)CC < array_lengthof(CondCodeActions) &&
- (unsigned)VT.getSimpleVT().SimpleTy < sizeof(CondCodeActions[0])*4 &&
+ (unsigned)VT.SimpleTy < sizeof(CondCodeActions[0])*4 &&
"Table isn't big enough!");
/// The lower 5 bits of the SimpleTy index into Nth 2bit set from the 64bit
/// value and the upper 27 bits index into the second dimension of the
/// array to select what 64bit value to use.
LegalizeAction Action = (LegalizeAction)
- ((CondCodeActions[CC][VT.getSimpleVT().SimpleTy >> 5]
- >> (2*(VT.getSimpleVT().SimpleTy & 0x1F))) & 3);
+ ((CondCodeActions[CC][VT.SimpleTy >> 5] >> (2*(VT.SimpleTy & 0x1F))) & 3);
assert(Action != Promote && "Can't promote condition code!");
return Action;
}
@@ -526,8 +525,9 @@ public:
/// isCondCodeLegal - Return true if the specified condition code is legal
/// on this target.
bool isCondCodeLegal(ISD::CondCode CC, EVT VT) const {
- return getCondCodeAction(CC, VT) == Legal ||
- getCondCodeAction(CC, VT) == Custom;
+ return
+ getCondCodeAction(CC, VT.getSimpleVT()) == Legal ||
+ getCondCodeAction(CC, VT.getSimpleVT()) == Custom;
}